peer-agents-mcp
Enables AI coding tools to call Grok and Antigravity CLIs as peer reviewers for code review, planning, debugging, and collaborative sessions.
README
peer-agents-mcp
MCP server that lets other AI coding tools (Codex, Claude, Cursor, etc.) call the Grok CLI and Antigravity CLI as peer reviewers and collaborators.
What it does
This server wraps the local grok and agy (Antigravity) CLIs behind a clean Model Context Protocol (MCP) interface.
Any MCP-capable agent can now:
- Send code changes, plans, errors, or questions to Grok or Antigravity
- Receive structured peer feedback
- Run multi-turn review/debug/planning sessions with session memory
- Get independent opinions by running both CLIs on the same task
The primary agent (Codex, Claude, etc.) stays in control. It simply delegates specific tasks to these peers when it wants a second (or different) opinion.
Core idea
Instead of one model doing everything, your main coding agent can use Grok and Antigravity as peers:
- Grok for most coding work (reviews, planning, debugging, implementation critique)
- Antigravity for large context, general knowledge, or multimodal tasks
Smart routing happens automatically based on the type of request.
Available tools
| Tool | Purpose | Routed to |
|---|---|---|
peer_review_diff |
Review a unified diff or patch | Grok (usually) |
peer_plan |
Create an implementation plan | Grok |
peer_debug |
Diagnose failures from logs/stack traces | Grok |
peer_verify |
Check test/build output for safety | Grok |
peer_ask |
General grounded Q&A | Antigravity |
peer_debate |
Independently compare Plan A vs Plan B | Grok |
peer_turn |
Continue a multi-turn peer session | Same peer |
peer_compare |
Low-level side-by-side call to both CLIs | Both |
Additional session tools: peer_summarize, peer_transcript, peer_list_sessions, peer_reset, and peer_health.
All routed tools accept full file contents via the files parameter and diffs via diff. Never send summaries — send the actual content.
How other agents use it
Codex, Claude, or any other MCP client connects to this server over stdio. Once connected, the agent can call the peer tools exactly like any other tool.
Typical flow:
- Your agent prepares a diff, error log, or task description.
- It calls
peer_review_diff,peer_plan,peer_debug, etc. - The server invokes the appropriate CLI(s) in headless mode.
- The peer response comes back with a
sessionId. - Your agent can follow up later with
peer_turnusing thatsessionId.
This gives you persistent, contextual peer conversations without the primary agent having to manage CLI invocation itself.
Prerequisites
- Node.js ≥ 18
- The
grokCLI (or setGROK_COMMAND) - The
agyCLI (Antigravity, or setANTIGRAVITY_COMMAND)
Both CLIs must be authenticated and working on your machine.
Installation & usage
git clone https://github.com/Rakeen70210/peer-agents-mcp
cd peer-agents-mcp
npm install
npm run build
Run directly:
node dist/index.js
MCP client configuration
Add it to your client's MCP servers config (example for a typical stdio setup):
{
"mcpServers": {
"peer-agents": {
"command": "node",
"args": ["/absolute/path/to/peer-agents-mcp/dist/index.js"],
"env": {
"GROK_COMMAND": "/home/you/.grok/bin/grok",
"ANTIGRAVITY_COMMAND": "/home/you/.local/bin/agy"
}
}
}
}
Environment variables
GROK_COMMAND— path to grok binary (default:grok)ANTIGRAVITY_COMMAND— path to agy binary (default:agy)GROK_ARGS/ANTIGRAVITY_ARGS— JSON array of extra CLI argsPEER_AGENTS_STORAGE_DIR— where sessions are persisted (default:~/.peer-agents/sessions)PEER_AGENTS_TURN_TIMEOUT_MS— per-turn timeout (default 120s for Grok, 300s for Antigravity)PEER_AGENTS_MAX_PROMPT_CHARS— safety limit on prompt size
Multi-turn peer sessions
Each routed call returns a sessionId. Use peer_turn to continue the conversation:
- Tell the peer what changed
- Attach new diffs or files
- Ask it to re-review or check your fixes
Sessions are persisted to disk, so they survive across restarts of the MCP server.
Design notes
- The server never modifies your repo itself — it only runs the CLIs you already have.
- User messages in session transcripts are labeled from the caller's perspective (commonly "Codex").
- Idempotency keys are supported so repeated calls with the same key are safe.
- Context quality hints are returned when the input looks too thin (missing files, diffs, etc.).
License
MIT (or as specified in the repo).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。