claude-code-mcp
by KunihiroS·★ 34·综合分 44
一个通过stdio暴露代码分析工具的MCP服务器,连接能力较弱的LLM与Claude Code。
概述
claude-code-mcp服务器作为中介,通过模型上下文协议(Model Context Protocol)让其他应用能够利用Claude Code的功能。它通过stdio接收JSON格式请求,使用Base64编码处理特殊字符,执行适当的Claude Code命令,并返回结果。该实现使用Node.js和MCP SDK,专注于处理可能包含特殊字符的自然语言文本时的稳定性和灵活性。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您需要将 Claude Code 的分析能力集成到 MCP 兼容主机中而不直接使用 CLI 时,选择此 MCP 服务器。
什么时候不要选它
如果您需要直接访问 Claude Code CLI、不希望依赖 Claude Code 安装,或需要更全面的代码分析工具,请不要选择此方案。
此 server 暴露的工具
从 README 抽取出 7 个工具explain_codeProvides a detailed explanation of the given code.
review_codeReviews the given code.
fix_codeFixes bugs or issues in the given code.
edit_codeEdits the given code based on instructions.
test_codeGenerates tests for the given code.
simulate_commandSimulates the execution of a given command.
your_own_querySends a custom query with context.
可对比工具
安装
安装
**使用npx(推荐)**
npx @kunihiros/claude-code-mcp**全局安装**
npm install -g claude-code-mcp配置
添加到您的MCP主机设置(例如Claude Desktop):
"claude-code-server": {
"command": "npx",
"args": [
"-y",
"@kunihiros/claude-code-mcp"
],
"env": {
"CLAUDE_BIN": "/path/to/your/claude/executable",
"LOG_LEVEL": "info"
},
"disabled": false
}将CLAUDE_BIN环境变量设置为您的Claude CLI可执行文件的完整路径。
FAQ
- 这个MCP服务器的目的是什么?
- 它使能力较弱的LLM和应用程序能够通过MCP协议利用Claude Code的代码分析功能。
- 这个服务器是否与Claude Desktop兼容?
- 是的,它设计为与Claude Desktop和其他MCP主机兼容,通过stdio传输方法提供集成。
claude-code-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。