
nRepl clojure mcp 服务器。支持与运行中的 Clojure nREPL 实例交互,允许通过 MCP 评估 Clojure 代码、命名空间检查及其他工具。
概览
一款为MCP客户端设计的模型上下文协议(MCP)服务器,如VSCode客户端。该服务器可与任何LLM配合CLine使用。该服务器支持与正在运行的 交互,允许通过MCP评估Clojure代码、命名空间检查及其他工具。 - 通过指定主机和端口,连接到运行中的nREPL服务器。- 在给定命名空间或当前命名空间中。- 使用tools.namespace。- ,包括主机、端口和会话细节。- 在任何Clojure命名空间中,显示如文档字符串和数值等元数据。 要使用该服务器,要配合或,请遵循以下步骤: 1. 在VSCode或 .2. 导航到.3. 添加一个配置如下的新MCP服务器:4. 保存并重启客户端以应用更改。 这将使客户端能够通过标准输入/输出与 nREPL MCP 服务器通信。 要快速运行服务器而不克隆仓库: 3. (将TypeScript转为JavaScript) - : 从编译输出运行。- : 使用ts节点进行实时更改。
概述(AI 翻译)
一款为MCP客户端设计的模型上下文协议(MCP)服务器,如VSCode中的Claude Desktop或CLine。该服务器可与任何LLM配合CLine使用。该服务器支持与运行中的Clojure nREPL实例交互,支持通过MCP评估Clojure代码、命名空间检查及其他工具。
特色
- 通过指定主机和端口连接运行中的nREPL服务器。
- 在给定命名空间或当前命名空间中评估Clojure代码。
- **使用
tools.namespace列表项目命名空间。 - 检索nREPL连接状态,包括主机、端口和会话详情。
- 检查任意Clojure命名空间中的公用vars,显示文档字符串和值等元数据。
安装与设置
在CLine(VSCode)或Claude Desktop中安装
要将此服务器与CLine或Claude桌面配合使用,请遵循以下步骤:
-
在VSCode或Claude Desktop中打开CLine**。
-
进入MCP设置。
-
添加一个配置如下的新MCP服务器:
-
保存并重启客户端以应用更改。
这将使客户端能够通过标准输入/输出与 nREPL MCP 服务器通信。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
nREPL MCP Server
A Model Context Protocol (MCP) server designed for MCP clients, such as Claude Desktop or CLine in VSCode. This server can be used with any LLM when used with CLine. This server enables interaction with a running Clojure nREPL instance, allowing evaluation of Clojure code, namespace inspection, and other utilities via MCP.
Features
- Connect to a running nREPL server by specifying host and port.
- Evaluate Clojure code in a given namespace or the current one.
- List project namespaces using
tools.namespace. - Retrieve nREPL connection status, including host, port, and session details.
- Inspect public vars in any Clojure namespace, displaying metadata such as docstrings and values.
Installation & Setup
Installing in CLine (VSCode) or Claude Desktop
To use this server with CLine or Claude Desktop, follow these steps:
- Open CLine in VSCode or Claude Desktop.
- Navigate to the MCP Settings.
- Add a new MCP server with the following configuration:
{ "mcpServers": { "nrepl-mcp-server": { "command": "npx", "args": [ "nrepl-mcp-server" ], "disabled": false, "autoApprove": [] } } } - Save and restart the client to apply changes.
This will allow the client to communicate with the nREPL MCP server via standard input/output.
Install via npx
To quickly run the server without cloning the repository:
npx nrepl-mcp-server
Manual Installation
-
Clone the repository
-
Install dependencies
npm install -
Build the project (transpiles TypeScript to JavaScript)
npm run build -
Run the server
- Production Mode: Runs from compiled output.
npm start - Development Mode: Uses ts-node for live changes.
npm run dev
- Production Mode: Runs from compiled output.
This starts the server, listening on STDIO for MCP requests. Mcp client will start the server for you.
Actions
Connecting to nREPL
Allows establishing a connection to an nREPL server by specifying a host and port.
Evaluating Clojure Code
Executes arbitrary Clojure expressions in either the default namespace or a specified namespace.
Retrieving Namespace Information
Lists all namespaces in the current project directory using tools.namespace.
Inspecting Public Vars
Fetches metadata and current values for all public vars in a specified namespace.
Fetching nREPL Connection Status
Provides details on the current nREPL connection, including host, port, session ID, and last error (if any).
Resources
nrepl://status
Provides information about the current nREPL connection, including:
- Host and port
- Connection status
- Active session ID
nrepl://namespaces
安装
npx nrepl-mcp-server配置
{
"mcpServers": {
"nrepl-mcp-server": {
"command": "npx",
"args": [
"nrepl-mcp-server"
],
"disabled": false,
"autoApprove": []
}
}
}