About Basilisp nREPL MCP Bridge
Basilisp nREPL MCP Bridge connects Claude Code to a Basilisp REPL, and can work with other nREPL servers. It provides tools for evaluating code and inspecting namespaces and symbols.
Key features
- 01Evaluate code with formatted results
- 02Look up symbol documentation
- 03List namespaces
- 04Find namespace variables
- 05Check nREPL connectivity
Use cases
- 01Run Basilisp code from Claude Code
- 02Inspect available namespaces and variables
- 03Look up documentation while working in a REPL
MCP support
It bridges MCP clients to Basilisp's nREPL server, exposing code evaluation and REPL inspection tools. It may also work with other nREPL servers.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEBasilisp nREPL MCP Bridge
This project provides a bridge between Anthropic's Model Control Protocol (MCP) and Basilisp's nREPL server, allowing Claude Code to interact directly with a Basilisp REPL. Actually, it should work with any nREPL, but the current prompts are Basilisp focused.
Features
- Execute code and receive pretty-printed, syntax-highlighted results
- Get documentation for symbols
- List all available namespaces
- Find all variables in a namespace
- Check nREPL server connectivity
- Basilisp: Python interop with proper syntax for attribute access and method calls
- Enhanced error reporting and formatting
Requirements
- uv
- basilisp
Usage
-
Start a Basilisp nREPL server:
basilisp nrepl-server --port 36915 -
Add the MCP bridge to Claude Code:
claude mcp add /home/a/subjective/snr/basilisp_mcp_bridge.py -
Connect with Claude and use the available tools:
eval_code(code)- Evaluate Basilisp codeget_docs(symbol)- Get documentation for a symbolfind_namespace_vars(namespace)- List variables in a namespacelist_namespaces()- List all available namespacescheck_connection()- Verify nREPL connectivity
Python Interop Examples
;; Import a module
(import [math :as math])
;; Access an attribute
(. math -pi) ;; or (.-pi math)
;; Call a method
(.sin math 0)
;; Create Python data structures
#py{"key" "value"}
Future Improvements
- Implement a proper bencode parser (beyond regex)
- Add session management for multiple REPLs
- Add auto-completion support
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.