grok-mcp
Click on "Deploy 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., "@grok-mcp review the code in src/utils.ts"
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.
grok-mcp
把本机 Grok Build 的 grok-bridge.mjs 暴露为 MCP stdio server,任意支持 MCP 的 code agent(Claude Code / OpenCode / …)可调用。
MCP client
│ stdio
▼
grok-mcp
│
▼
grok-bridge.mjs → grok headless不是 Claude Code 插件本体;不打包 slash commands / hooks。只包 bridge CLI。
工具
Tool | Bridge | 说明 |
|
| 就绪探测(node / grok / auth) |
|
| 主路径; |
|
| 列表或指定 run |
|
| 状态/结果 |
|
| 取消 |
| — | 解析到的 bridge 路径 |
审阅类任务:write=false(默认),需要改文件时再 write=true。
Related MCP server: grok-mcp
前置
Node ≥ 18
本机已装
grokCLI 并登录(grok/ bridgecheck通过)可找到
grok-bridge.mjs(见路径解析)
安装
cd ~/karson_ubuntu/grok-mcp
npm install
npm run build路径解析(GROK_BRIDGE)
按顺序找 grok-bridge.mjs:
环境变量
GROK_BRIDGE~/github_repo/grok-build-plugin-cc/plugins/grok-build/scripts/grok-bridge.mjs~/.claude/plugins/cache/xai-grok-build/grok-build/<ver>/scripts/grok-bridge.mjs(最新 ver)$CLAUDE_PLUGIN_ROOT/scripts/grok-bridge.mjs
接入 Claude Code
claude mcp add grok -s user \
-e GROK_BRIDGE=$HOME/github_repo/grok-build-plugin-cc/plugins/grok-build/scripts/grok-bridge.mjs \
-- node $HOME/karson_ubuntu/grok-mcp/dist/index.js前台
grok_run默认超时 15 分钟(timeout_ms可改)。background=true:只等 bridge 入队并返回 jobId(默认最长 60s),不跑满 agent;完成靠
grok_show/ 报告文件。Prompt 经
--prompt-file写在 tmpdir(不污染项目 cwd)。
重启 Claude Code 后 /mcp 应见 grok。工具名形如 mcp__grok__grok_check。
接入 OpenCode
在 ~/.config/opencode/opencode.json 的 mcp 段增加等价 stdio 配置(command/args/env 同上)。
multi-model-review
skill 的 Grok 路:优先 MCP grok_run(background=true, write=false, model=grok-4.5);无 MCP 时回退 Bash 调 bridge。
开发
npm run typecheck
npm run build
node dist/index.js # stdio MCP;不要手动交互跑手动验 bridge(不经 MCP):
node "$GROK_BRIDGE" check --jsonAvailable Tools
6 toolsgrok_bridge_pathA
Resolve which grok-bridge.mjs path this MCP server will use.
Inputs: no named parameters.
grok_checkA
Probe whether Grok Build bridge + CLI are ready (node, grok binary, auth). Returns {rows: [{label, ok, detail}]} envelope; the raw bridge JSON is preserved in the 'bridge output' row's detail for callers that parsed the old shape.
Inputs: cwd.
grok_runA
Run a Grok Build task via bridge (run). background=true: bridge enqueues detached worker and exits; this tool only waits for that enqueue JSON (jobId), default max 60s — not the full agent run. Poll grok_show / report files for completion. write=false default (read-only). Prompt via --prompt-file under tmpdir. Foreground default timeout 900000ms (15 min). Pass cwd for project paths.
Inputs: prompt (required), cwd, fresh, model, +5 more.
grok_runsC
List tracked Grok bridge runs, or one run by id (runs).
Inputs: all, cwd, run_id.
grok_showC
Show status/result of a Grok bridge run (show).
Inputs: cwd, run_id.
grok_stopC
Stop a running Grok bridge job (stop).
Inputs: cwd, run_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: check readiness, run a task, list runs, show status, stop a job, and resolve bridge path. No overlap or ambiguity.
All tools follow a consistent 'grok_' prefix with descriptive verb/noun names (check, run, runs, show, stop, bridge_path). No mixing of conventions.
Six tools is ideal for the domain, covering readiness, execution, listing, status, stopping, and configuration. Each tool earns its place without excess.
The tool surface covers the full lifecycle of Grok build runs: check (readiness), run (create), runs (list), show (read), stop (delete/stop), plus configuration (bridge_path). No obvious gaps.
Related MCP Connectors
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Build, test, publish, and run Kovca workflows from AI agents over remote MCP.
Related MCP Servers
- AlicenseCqualityDmaintenanceExposes the local Gemini CLI as an MCP stdio server, providing tools for prompting, web search, file operations, and MCP management, enabling AI clients like Codex CLI and Claude Code to interact with Gemini.227MIT
- AlicenseAqualityCmaintenanceA minimal local MCP server that lets Claude Desktop or Claude Code delegate coding tasks to Grok Build running headless as a subagent.551 npm1MIT
- FlicenseBqualityBmaintenanceLocal stdio MCP bridge that delegates coding work to the Grok CLI agent via isolated git worktrees and typed receipts. Provides MCP tools for interacting with the Grok CLI across stdio, WebSocket, and legacy transports.242-
- AlicenseNot gradedqualityCmaintenanceExposes OpenClaw gateway tools to MCP clients like Claude Code and Codex, enabling local tool calls, file operations, and subagent session management through a stdio MCP server.959 npmMIT