Brooks Model 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., "@Brooks Model MCPAsk Claude to review this pull request changes"
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.
Brooks Model MCP
统一的 Codex、Claude 与 Grok 直接会话 MCP 服务,面向 VS Code、Claude Code 及其他支持 stdio MCP 的客户端。
设计
三个入口相互隔离:
mcp-codex:调用本机 Codex CLI,复用~/.codex中的认证、模型与思考强度;默认启用原生实时网页搜索。mcp-claude:调用本机 Claude Code CLI,复用~/.claude中的认证与模型;暴露按次思考强度并默认允许WebSearch/WebFetch。mcp-grok:调用 OpenAI 兼容的 Grok API;默认模型与思考强度由 server 环境配置,默认通过 Responses API 使用web_search。
Codex 和 Claude 使用上游 CLI 的原生 session/thread。Grok API 通常无服务端会话,本项目使用本机 SQLite 保存消息历史并提供可续接 session。
Related MCP server: CLI Agent MCP
对话、长文本与权限
三个首轮工具都返回
sessionId,后续分别传给codex_reply、claude_reply、grok_reply即可连续对话。Codex/Claude 的输入通过 stdin 传给 CLI,Grok 通过 HTTP JSON 发送;代码不按字符数静默截断输入。
当前响应是单次完整 MCP 结果,不是 token 流。超长输出宜分轮索取;需要产出大型文档时,只在明确授权写入后交给 Codex 保存到工作区。
Codex/Claude 的上下文管理由各自 CLI 负责。Grok 将本地 SQLite 中的完整消息历史随续聊请求重发,达到模型上下文上限后应开启新 session 或先请求压缩摘要。
默认权限是只读:Codex 默认
sandbox=read-only,Claude 固定permission-mode=plan且只开放读取和网页工具,Grok 不开放本地文件工具。只有 Codex 可在单次调用中显式指定
sandbox=workspace-write。不建议让多个外部模型并发修改同一工作区;更稳妥的模式是三者研究/审查,主代理统一落盘。三者的
web_search参数默认均为true,可按调用设为false。搜索能力仍受上游账号、组织策略及兼容 API endpoint 支持情况约束。
超时与取消
Codex/Claude 同时受总时限和无输出空闲时限约束。默认总时限为 900 秒,无输出空闲时限为 300 秒。
分别通过
MODEL_MCP_CLI_TIMEOUT_SECONDS和MODEL_MCP_CLI_IDLE_TIMEOUT_SECONDS调整;值必须为正数。CLI 有新输出时会刷新空闲计时,但不会突破总时限。达到任一阈值或 MCP 调用被取消时,server 会终止当前上游进程并清理管道;Windows 使用 Job Object 回收整个子进程树。
Grok 使用
GROK_TIMEOUT_SECONDS控制 HTTP connect/read/write/pool 超时,默认 180 秒。无响应超时不会自动重试;明确的临时 HTTP 状态或连接失败仍受GROK_MAX_RETRIES约束。超时只关闭当前无响应调用,不关闭 MCP server。后续仍可发起新 session;超时 turn 不应继续复用,避免上游历史处于不确定状态。
安全边界
API key、token、SQLite session、日志和本地配置不会进入 Git。
prompt 通过 stdin 传给 Codex/Claude,不拼接 shell 命令。
Codex/Claude 默认只读。
Grok key 只从 server 进程环境读取,不接受 MCP 工具参数传入,也不会在诊断结果中回显。
Conda 环境
Conda 仅用于开发、测试和发布前验收,不进入 MCP 客户端启动链:
conda env create -f environment.yml
conda activate mcpserver
pytest
ruff check .已有环境可更新:
conda activate mcpserver
python -m pip install -e ".[dev]"MCP 配置
客户端配置严格使用 uvx --from git+https://...,与 Claude Code 中现有 Git MCP 的配置方式一致。生产配置必须锁定 tag 或 commit:
{
"servers": {
"codex": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Brooks-Sem/mcpserver.git@v0.1.0",
"mcp-codex"
]
},
"claude": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Brooks-Sem/mcpserver.git@v0.1.0",
"mcp-claude"
]
},
"grok": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Brooks-Sem/mcpserver.git@v0.1.0",
"mcp-grok"
],
"env": {
"GROK_API_URL": "${input:grok-api-url}",
"GROK_API_KEY": "${input:grok-api-key}",
"GROK_MODEL": "grok-4",
"GROK_REASONING_EFFORT": "high"
}
}
}
}完整模板位于 configs/。新机器只需安装 Git、uv、Codex CLI 和 Claude Code CLI;uvx 会从 Git tag 创建并缓存隔离环境。
不要在长期配置中省略 @v0.1.0。直接跟随 main 会让未经本机验收的更新自动进入三个 MCP server。
Grok 配置
Grok 没有被本项目依赖的本地 CLI 会话层。server 从进程环境读取:
环境变量 | 说明 | 默认值 |
| OpenAI 兼容 API base URL | 必填 |
| API key,只允许本机配置 | 必填 |
| server 默认模型 |
|
| 默认思考强度:low/medium/high/xhigh/max |
|
| 兼容 endpoint 的请求字段;空值表示不发送 |
|
| 请求超时 |
|
| 可重试请求次数 |
|
grok / grok_reply 工具允许按次覆盖 model 与 reasoning_effort,但不接受 key 或 API URL 参数。Grok session 存储于本机 SQLite,不上传 Git。
验证
.\scripts\doctor.ps1
conda run -n mcpserver pytest
conda run -n mcpserver ruff check .发布后验证远程 tag:
uvx --from "git+https://github.com/Brooks-Sem/mcpserver.git@v0.1.0" mcp-doctorThis 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.
Latest Blog Posts
- 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/Brooks-Sem/mcpserver'
If you have feedback or need assistance with the MCP directory API, please join our Discord server