README
🚀 Clojars MCP 服务器
Clojars MCP 服务器是一个基于模型上下文协议 (MCP) 的服务器,它能提供工具从Clojars(Cline、Roo Code、Cody、Claude Desktop 等 Cлопаре的社区 artifact 存储库)获取依赖信息,为相关开发工作提供便利。
🚀 快速开始
你可以按照以下不同方式安装并使用Clojars MCP服务器。
📦 安装指南
使用 npx 安装
运行 Clojars MCP Server 最简单的方法是通过 npx,执行以下命令:
npx clojars-deps-server
你也可以选择全局安装:
npm install -g clojars-deps-server
使用 Smithery 安装
要通过 Smithery 自动安装 Clojars 依赖服务器,可执行以下命令:
npx -y @smithery/cli install clojars-deps-server --client claude
手动安装
- 克隆此仓库:
git clone https://github.com/yourusername/clojars-deps-server.git
cd clojars-deps-server
- 安装依赖项:
npm install
- 构建服务器:
npm run build
- 将服务器添加到你的 Claude 配置中:
- 对于 VSCode Claude 插件,添加到
cline_mcp_settings.json(通常位于~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/在 macOS 上):
- 对于 VSCode Claude 插件,添加到
{
"mcpServers": {
"clojars-deps-server": {
"command": "node",
"args": ["/path/to/clojars-deps-server/build/index.js"]
}
}
}
- 对于 Claude 桌面应用程序,添加到 `claude_desktop_config.json`(通常位于 `~/Library/Application Support/Claude/` 在 macOS 上):
{
"mcpServers": {
"clojars-deps-server": {
"command": "node",
"args": ["/path/to/clojars-deps-server/build/index.js"]
}
}
}
在添加服务器配置后,Claude 在启动时会自动检测并连接到服务器。服务器的功能将在 Claude 的系统提示下列出于“Connected MCP Servers”部分,使其可供使用。
✨ 主要特性
- 获取最新版本:能够获取任何 Clojars 依赖项的最新版本。
- 版本检查:可以检查特定版本的依赖项是否存在。
- 响应专注:简单、专注于响应。
- 集成便捷:通过 MCP 与 Claude 集成容易。
📚 详细文档
工作原理
当此 MCP 服务器配置在 Claude 的设置中时,它会自动成为 Claude 的系统提示下“Connected MCP Servers”部分中的可用选项。这使 Claude 意识到服务器的功能,并允许它通过 use_mcp_tool 命令使用提供的工具。
服务器暴露了两个工具:
get_clojars_latest_version
{
"name": "get_clojars_latest_version",
"description": "获取 Clojars 依赖项的最新版本(Maven artifact)",
"inputSchema": {
"type": "object",
"properties": {
"dependency": {
"type": "string",
"description": "Clojars 依赖项名称,格式为 \"组/工件\"(例如 \"metosin/reitit\")"
}
},
"required": ["dependency"]
}
}
check_clojars_version_exists
{
"name": "check_clojars_version_exists",
"description": "检查特定版本的 Clojars 依赖项是否存在",
"inputSchema": {
"type": "object",
"properties": {
"dependency": {
"type": "string",
"description": "Clojars 依赖项名称,格式为 \"组/工件:version\"(例如 \"metosin/reitit:latest\" 或 \"org.example/library:1.0.0\")"
}
},
"required": ["dependency"]
}
}
当用户询问关于 Clojars 依赖项的问题时,Claude 可以根据以下内容识别这些工具是适当的:
- 工具名称明确指示其用途。
- 描述指定它们用于“Clojars 依赖项(Maven artifact)”。
- 示例格式显示典型的 Clojars 依赖项模式。
Scan to join WeChat group