Skip to main content
Glama
lllli223

codex-workspace-codegraph-mcp

by lllli223

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CWMCP_HOSTNoMCP HTTP 监听地址127.0.0.1
CWMCP_SANDBOXNo沙箱模式workspace-write
CWMCP_MCP_PORTNoMCP HTTP 端口8765
CWMCP_WEB_HOSTNoWebUI 监听地址127.0.0.1
CWMCP_WEB_PORTNoWebUI 端口8766
CWMCP_TRANSPORTNostdio 或 httpstdio
CWMCP_WORKSPACENo允许访问的工作区根目录当前目录
CWMCP_CLOUDFLAREDNocloudflared 可执行文件自动查找
CWMCP_ACCESS_TOKENNoHTTP MCP 和 WebUI 访问令牌随机值
CODEGRAPH_MCP_TOOLSNoCodeGraph MCP 工具列表完整列表
CWMCP_MAX_READ_BYTESNo单文件读取上限2097152
CWMCP_TUNNEL_VERBOSENo设为 1 输出子进程详细日志0
CWMCP_ALLOWED_ORIGINSNo额外允许的浏览器 Origin,逗号分隔;默认仅接受同源和本机 Origin
CWMCP_APPROVAL_POLICYNo审批策略on-request
CWMCP_MAX_OUTPUT_BYTESNostdout/stderr 输出上限1048576
CWMCP_CODEGRAPH_COMMANDNoCodeGraph 可执行文件codegraph
CWMCP_DISABLE_CODEGRAPHNo设为 1 禁用 CodeGraph0
CWMCP_COMMAND_TIMEOUT_MSNo普通命令超时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

CapabilityDetails
tools
{
  "listChanged": false
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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 file (a path or basename) with no symbol and it returns that file's current on-disk source with line numbers, exactly the shape Read gives you (<n>\t<line>, safe to Edit from), narrowable with offset/limit just like Read — PLUS a one-line note of which files depend on it. Same bytes as Read, faster (served from the index), with the blast radius attached. Use it whenever you would Read a source file. (2) ONE SYMBOL you can name — its location, signature, verbatim source (includeCode=true) and caller/callee trail in one call, so before changing it you see what calls it and what your edit would break. For an AMBIGUOUS name it returns EVERY matching definition's body in one call (so you never Read a file to find the right overload); pass file/line to pin one. Use codegraph_explore for several related symbols or the full flow.

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

NameDescription
codex_workspace_workflow独立于 Codex 服务的本地代码检索、编辑、验证和交互反馈工作流。

Resources

Contextual data attached and managed by the client

NameDescription
Codex 风格工作流指令
交互反馈策略

Latest Blog Posts

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