claude-code-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-code-mcpRun Claude Code in /workspace/my-app to debug the failing test suite"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Claude Code(代码智能体)MCP(模型上下文协议)
该服务提供 run_claude 工具,接收 prompt 与 cwd 两个必填参数。
安装
安装 Python(编程语言)依赖:
python -m pip install -r requirements.txt再通过 NPM(包管理器)安装 Claude Code(代码智能体):
npm install -g @anthropic-ai/claude-code
claude --version服务不会写死用户目录。Windows(微软操作系统)会运行 npm prefix -g 得到全局安装目录,并调用其中的 claude.cmd;macOS(苹果操作系统)与 Linux(开源操作系统)直接调用 claude。若命令行工具位于自定义位置,可通过 CLAUDE_COMMAND 环境变量指定可执行文件的完整路径。
服务在每个工作目录首次成功执行后保存 Claude Code(克劳德代码代理)会话编号;同一工作目录的后续调用自动恢复该会话。会话映射保存在 claude_state/sessions.json,日志保存在 claude_logs。
Claude Code(克劳德代码代理)会在上下文接近上限时自动压缩。若恢复的旧会话已无法压缩且触发上下文长度错误,服务会自动创建新会话、更新该工作目录映射,并仅重试当前任务一次;首次失败的日志路径会随结果一并返回。
服务使用当前 Claude Code(代码智能体)的默认模型配置,并以 JSON(数据格式)返回 summary、changed_files、tests 与 blockers。在 Codex(代码智能体)全局配置中将入口设置为 claude_code_mcp.py 后,重启 Codex(代码智能体)。
Related MCP server: claudecode-mcp
Codex(代码智能体)配置
在 ~/.codex/config.toml 中添加:
[mcp_servers.claude_code]
command = "python"
args = ["/absolute/path/to/claude_code_mcp.py"]
startup_timeout_sec = 30
tool_timeout_sec = 21600
enabled_tools = ["run_claude"]
default_tools_approval_mode = "auto"
[mcp_servers.claude_code.env]
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE = "70"
# 仅当 Claude Code(代码智能体)命令不在标准 NPM(包管理器)目录时设置。
CLAUDE_COMMAND = "/custom/path/to/claude"Windows(微软操作系统)示例中的 Python(编程语言)入口可写为 D:\\Python\\python.exe,脚本路径使用双反斜杠;若不设置 CLAUDE_COMMAND,请保持 npm 可执行并完成上述全局安装。
推理强度
当前版本不会向 Claude Code(代码智能体)传入 --effort(推理强度参数),因此使用 Claude Code(代码智能体)当前默认值或恢复会话的既有设置。Claude Code(代码智能体)命令行工具支持 low(低)、medium(中)、high(高)、xhigh(超高) 和 max(最高) 五个请求档位。
原始 JSON(数据格式)日志中的 modelUsage(模型用量)可以显示实际模型,但不会返回 effort(推理强度)。run_claude 的返回值也不含推理强度,因此当前版本不能确认模型实际采用的内部推理量。
若未来为服务加入该配置,应将请求值以 requested_reasoning_effort(请求的推理强度)返回,例如:
[mcp_servers.claude_code.env]
CLAUDE_EFFORT = "high"这只能记录请求的档位;模型供应商通常不会公开实际内部推理词元。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server for managing Claude Code conversation sessions1248MIT
- AlicenseAqualityBmaintenanceLocal MCP server that wraps the headless Claude Code CLI as MCP tools, providing stateless access to Claude's coding capabilities through prompt-based interactions. It enables users to execute Claude Code commands with various prompt formats and structured outputs directly from MCP clients.3MIT
- AlicenseAqualityDmaintenanceThis MCP server enables remote control and management of Claude Code agents, allowing you to execute missions, configure agent personalities, and integrate with other MCP tools.7361MIT
- AlicenseAqualityCmaintenanceAn MCP server that enables coding agents to run Claude Agent SDK sessions as asynchronous sub-agents, with tools for starting, continuing, and checking status of Claude sessions.3241MIT
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/guheng-re/claude-code-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server