nREPL MCP 服务器
专为 MCP 客户端(例如Claude Desktop或 VSCode 中的CLine )设计的模型上下文协议 (MCP)服务器。此服务器与 CLine 配合使用时,可与任何 LLM 配合使用。此服务器支持与正在运行的Clojure nREPL 实例进行交互,从而允许通过 MCP 执行 Clojure 代码评估、检查命名空间以及其他实用程序。
特征
- 通过指定主机和端口连接到正在运行的 nREPL 服务器。
- 在给定的命名空间或当前命名空间中评估 Clojure 代码。
- 使用
tools.namespace
列出项目命名空间。 - 检索 nREPL 连接状态,包括主机、端口和会话详细信息。
- 检查任何 Clojure 命名空间中的公共变量,显示元数据,例如文档字符串和值。
安装和设置
在 CLine (VSCode) 或 Claude Desktop 中安装
要将此服务器与CLine或Claude Desktop一起使用,请按照以下步骤操作:
- 在 VSCode 或Claude Desktop中打开CLine 。
- 导航至MCP 设置。
- 添加一个新的 MCP 服务器,配置如下:
- 保存并重新启动客户端以应用更改。
这将允许客户端通过标准输入/输出与 nREPL MCP 服务器通信。
通过npx
安装
要快速运行服务器而不克隆存储库:
手动安装
- 克隆存储库
- 安装依赖项
- 构建项目(将 TypeScript 转换为 JavaScript)
- 运行服务器
- 生产模式:从编译输出运行。
- 开发模式:使用 ts-node 进行实时更改。
- 生产模式:从编译输出运行。
这将启动服务器,并在STDIO上监听 MCP 请求。Mcp 客户端将自动启动服务器。
行动
连接到 nREPL
允许通过指定主机和端口建立与 nREPL 服务器的连接。
评估 Clojure 代码
在默认命名空间或指定命名空间中执行任��� Clojure 表达式。
检索命名空间信息
使用tools.namespace
列出当前项目目录中的所有命名空间。
检查公共变量
获取指定命名空间中所有公共变量的元数据和当前值。
获取 nREPL 连接状态
提供有关当前 nREPL 连接的详细信息,包括主机、端口、会话 ID 和最后一个错误(如果有)。
资源
nrepl://status
提供有关当前 nREPL 连接的信息,包括:
- 主机和端口
- 连接状态
- 活动会话 ID
nrepl://namespaces
列出在项目目录中检测到的所有命名空间。
贡献
欢迎贡献!如果您有功能建议或错误报告,请提交问题或拉取请求。
执照
本项目遵循MIT 许可证。请根据其条款随意修改和分发。
Related MCP Servers
- AsecurityAlicenseAqualityMCP Server for the Notion API, enabling Claude to interact with Notion workspaces.Last updated -181,299794TypeScriptMIT License
- -securityAlicense-qualityConnects Reaper projects to an MCP client like Claude Desktop, allowing users to ask questions and retrieve parsed information about the projects using natural language.Last updated -45PythonMIT License
- -securityFlicense-qualityAn MCP server that connects to your Notion knowledge base, allowing you to query and retrieve information directly from VSCode using the Cline extension.Last updated -Python
- AsecurityAlicenseAqualityAn MCP server that provides seamless integration with the Neo N3 blockchain, allowing Claude to interact with blockchain data, manage wallets, transfer assets, and invoke smart contracts.Last updated -674MIT License