codex-workspace-codegraph-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CWMCP_HOST | No | MCP HTTP 监听地址 | 127.0.0.1 |
| CWMCP_SANDBOX | No | 沙箱模式 | workspace-write |
| CWMCP_MCP_PORT | No | MCP HTTP 端口 | 8765 |
| CWMCP_WEB_HOST | No | WebUI 监听地址 | 127.0.0.1 |
| CWMCP_WEB_PORT | No | WebUI 端口 | 8766 |
| CWMCP_TRANSPORT | No | stdio 或 http | stdio |
| CWMCP_WORKSPACE | No | 允许访问的工作区根目录 | 当前目录 |
| CWMCP_CLOUDFLARED | No | cloudflared 可执行文件 | 自动查找 |
| CWMCP_ACCESS_TOKEN | No | HTTP MCP 和 WebUI 访问令牌 | 随机值 |
| CODEGRAPH_MCP_TOOLS | No | CodeGraph MCP 工具列表 | 完整列表 |
| CWMCP_MAX_READ_BYTES | No | 单文件读取上限 | 2097152 |
| CWMCP_TUNNEL_VERBOSE | No | 设为 1 输出子进程详细日志 | 0 |
| CWMCP_ALLOWED_ORIGINS | No | 额外允许的浏览器 Origin,逗号分隔;默认仅接受同源和本机 Origin | 空 |
| CWMCP_APPROVAL_POLICY | No | 审批策略 | on-request |
| CWMCP_MAX_OUTPUT_BYTES | No | stdout/stderr 输出上限 | 1048576 |
| CWMCP_CODEGRAPH_COMMAND | No | CodeGraph 可执行文件 | codegraph |
| CWMCP_DISABLE_CODEGRAPH | No | 设为 1 禁用 CodeGraph | 0 |
| CWMCP_COMMAND_TIMEOUT_MS | No | 普通命令超时 | 120000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| workspace_infoA | 返回工作区根目录、沙箱模式、审批策略和服务状态。 |
| workspace_instructionsA | 按照 Codex 风格,从工作区根目录到目标目录逐层加载 AGENTS.override.md 或 AGENTS.md。修改代码前应先调用。 |
| read_fileB | 读取工作区内文本文件,可指定行范围并返回行号。 |
| read_many_filesA | 一次读取多个工作区文本文件。单次最多 20 个。 |
| list_directoryB | 列出工作区目录的直接子项。 |
| file_metadataB | 返回文件或目录的类型、大小、修改时间和权限。 |
| find_filesA | 按路径片段和扩展名递归查找文件;自动跳过常见构建目录。 |
| search_textB | 在工作区搜索文本。优先使用 ripgrep,缺失时使用 Node 回退实现。 |
| write_fileA | 以原子替换方式创建或完整写入文本文件。已有文件默认允许覆盖;精确修改优先使用 edit_file 或 apply_patch。 |
| edit_fileA | 仅在 old_text 出现次数与 expected_occurrences 完全一致时替换,避免误改。 |
| apply_patchA | 应用以 *** Begin Patch / *** End Patch 包裹的 Add、Delete、Update、Move 文件补丁。路径只能相对工作区;所有操作先验证,失败时尝试回滚。 |
| create_directoryA | 递归创建工作区目录。 |
| move_pathA | 在工作区内移动或重命名文件/目录。覆盖目标时需要用户在 interactive_feedback 中批准。 |
| delete_pathA | 删除工作区内文件或目录。始终通过 interactive_feedback 请求批准。禁止删除工作区根目录。 |
| exec_commandA | 在工作区执行前台命令。优先传 argv 数组;字符串命令通过系统 shell 执行。高风险命令通过 interactive_feedback 审批。 |
| git_statusA | 返回 git status --short --branch。 |
| git_diffB | 返回工作树或暂存区差异,可限制路径。 |
| git_logC | 返回最近提交日志。 |
| git_showB | 查看指定提交或对象,可限制文件路径。 |
| update_planA | 维护 Codex 风格任务计划。未全部完成时必须且只能有一个 in_progress;完成后所有步骤为 completed。 |
| get_planA | 返回当前内存中的执行计划。 |
| interactive_feedbackA | 在最终回答前通过唯一沟通渠道向用户展示工作摘要并等待反馈。timeout 固定为 172800 秒。每次回答结束前都要调用 interactive_feedback 与用户进行交流 这是你与用户之间的唯一沟通渠道。 |
| codegraph_project_initC | 在工作区或其子目录执行 codegraph init .,建立本地代码知识图谱索引。 |
| codegraph_project_syncB | 在指定目录执行 codegraph sync,同步已有索引。 |
| codegraph_project_statusC | 执行 codegraph status,并返回 MCP 子进程状态。 |
| integration_statusB | 返回本地工作区、反馈 Web UI 和 CodeGraph 集成状态。 |
| codegraph_searchA | Quick symbol search by name. Returns locations only (no code). Use codegraph_explore instead to get the actual source / understand an area in one call. |
| codegraph_callersA | List functions that call . For the full flow, use codegraph_explore. |
| codegraph_calleesA | List functions that calls. For the full flow, use codegraph_explore. |
| codegraph_impactA | List symbols affected by changing . Use before a refactor. |
| codegraph_nodeA | Two modes. (1) READ A FILE — use INSTEAD of the Read tool: pass |
| codegraph_exploreA | PRIMARY TOOL — call FIRST for almost any question OR before an edit: how does X work, architecture, a bug, where/what is X, surveying an area, or the symbols you are about to change. Returns the verbatim source of the relevant symbols grouped by file in ONE capped call (Read-equivalent — treat the shown source as already Read; do NOT re-open those files), plus the call path among them. Query can be a natural-language question OR a bag of symbol/file names. Usually the ONLY call you need — more accurate context, in far fewer tokens and round-trips than a search/Read/Grep loop. |
| codegraph_statusA | Index health check (files / nodes / edges). Skip unless debugging. |
| codegraph_filesA | Indexed file tree with language + symbol counts. Faster than Glob for project layout. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| codex_workspace_workflow | 独立于 Codex 服务的本地代码检索、编辑、验证和交互反馈工作流。 |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Codex 风格工作流指令 | |
| 交互反馈策略 |
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/lllli223/codex-workspace-codegraph-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server