home / mcp / calva backseat driver mcp server

Calva Backseat Driver MCP Server

MCP server bridging AI assistants to your Clojure REPL for interactive evaluation and editing.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "betterthantomorrow-calva-backseat-driver": {
      "command": "node",
      "args": [
        "<absolute path to calva-mcp-server.js in user-home-config directory>",
        "1664"
      ]
    }
  }
}

Calva Backseat Driver exposes an MCP server that bridges AI assistants to your Clojure REPL. It enables interactive programming by letting a model evaluate code in your runtime, inspect data, and perform structural edits through a controlled, per-workspace socket connection. This setup keeps you in control while you gain an AI partner that understands your actual code and environment.

How to use

Connect Calva Backseat Driver to your Clojure/ClojureScript project from your MCP client. The server provides a per-workspace MCP endpoint that you can configure in your AI client. Once connected, you can reference tools by their short names in chat, for example: #clojure-eval, #replace-top-level-form, #insert-top-level-form, #balance-brackets, #clojure-create-file, #append-code, #clojure-symbol, #clojuredocs, #calva-output.

Getting practical results with the AI partner

- Enable the REPL-powered tools in your AI client to evaluate code, inspect data, and run tests against your running application. The AI can execute code in your actual REPL and receive results, which helps it reason about data shapes and function behavior with real context.

Configuration and workflow notes

The MCP bridge uses a per-workspace setup. You will typically run a local MCP server process that listens on a socket and write a port reference to a workspace file. Your MCP client then connects via a stdio wrapper command. When the server starts, you’ll be able to copy the exact command to launch the wrapper for your environment.

Available tools

clojure-eval

Evaluate Clojure code in your actual REPL to see runtime results and shapes of data.

clojure-create-file

Create new Clojure files with automatic bracket balancing and initial content scaffolding.

append-code

Append code to an existing Clojure file while maintaining bracket balance and formatting.

replace-top-level-form

Structural editing of the top-level form with formatting, bracket balancing, and linting.

insert-top-level-form

Insert a new top-level form with structural editing support, including formatting and balancing.

balance-brackets

Bracket balancing helper powered by Parinfer to keep code syntactically valid.

clojure-symbol

Lookup symbol info, including docstrings and argument details, from your codebase.

clojuredocs_lookup

Query clojuredocs.org for docs, examples, and see-also information about Clojure core symbols.