grok-mcp

grok-mcp

Exposes local Grok Build bridge as MCP stdio server, enabling code agents like Claude Code to run Grok models, check status, and manage runs.

Category
Visit Server

README

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 说明
grok_check check --json 就绪探测(node / grok / auth)
grok_run run … 主路径;background / write / model / effort
grok_runs runs --json 列表或指定 run
grok_show show --json 状态/结果
grok_stop stop --json 取消
grok_bridge_path — 解析到的 bridge 路径

审阅类任务:write=false(默认),需要改文件时再 write=true。

前置

  • Node ≥ 18
  • 本机已装 grok CLI 并登录(grok / bridge check 通过)
  • 可找到 grok-bridge.mjs(见路径解析)

安装

cd ~/karson_ubuntu/grok-mcp
npm install
npm run build

路径解析(GROK_BRIDGE)

按顺序找 grok-bridge.mjs:

  1. 环境变量 GROK_BRIDGE
  2. ~/github_repo/grok-build-plugin-cc/plugins/grok-build/scripts/grok-bridge.mjs
  3. ~/.claude/plugins/cache/xai-grok-build/grok-build/<ver>/scripts/grok-bridge.mjs(最新 ver)
  4. $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 --json

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured