grok-bot-mcp
grok-bot-mcp
面向 Grok Bot 的 MCP 服务器 — 让任何 AI 代理控制你的机器人。
创建机器人、读取对话记录、发送消息、搜索历史记录并检查用量 — 全部通过 Model Context Protocol 实现。适用于 Claude Desktop、Cursor、Windsurf、Cline、VS Code Copilot 以及任何兼容 MCP 的客户端。
配套项目: gbu — Grok Bot 用量检查器
它能做什么
grok-bot-mcp 是一个 MCP 服务器,将 AI 代理(Claude、Cursor、Copilot 等)桥接到你本地运行的 Grok Bot 实例。安装后,任何兼容 MCP 的 AI 客户端都可以:
创建、列出、搜索和删除机器人 — 无需打开 Grok Bot 应用
向机器人发送消息并获取回复 — 直接在 AI 编辑器中完成
读取对话记录 — 任何机器人的完整历史
跨所有机器人消息搜索 — 在本地数据库中进行全文搜索
检查用量和计费 — 每周用量百分比、按需消费、重置时间
列出本地数据库 — 查看所有 agent store.db 文件及其大小
全部通过标准化的 MCP 工具接口实现。无需自定义 API 集成。
Related MCP server: Grok MCP
安装
一条命令(macOS / Linux):
gh repo clone Kargatharaakash/grok-bot-mcp && cd grok-bot-mcp && sh install.sh安装脚本会自动检测你已安装的 AI 代理,并为每个代理配置 MCP 服务器。安装后请重启你的 AI 代理。
它会配置的内容:
代理 | 配置路径 | 自动配置 |
Claude Desktop |
| 是 |
Cursor |
| 是 |
Windsurf |
| 是 |
Cline |
| 是 |
Continue |
| 是 |
VS Code (Copilot) | 工作区中的 | 手动 |
Claude Code (CLI) |
| 是 |
Zed |
| 手动 |
工具
MCP 服务器向任何连接的 AI 代理暴露以下工具:
代理管理
工具 | 功能 | 必需参数 |
| 列出所有 Grok Bot 代理 | 无 |
| 创建新机器人 |
|
| 按 ID 删除机器人 |
|
| 按名称/描述搜索机器人 |
|
消息
工具 | 功能 | 必需参数 |
| 向机器人发送消息并获取回复 |
|
| 读取机器人的对话历史 |
|
数据库
工具 | 功能 | 必需参数 |
| 列出所有本地代理数据库 | 无 |
| 从 store.db 读取原始对话条目 |
|
| 跨所有机器人对话进行全文搜索 |
|
用量
工具 | 功能 | 必需参数 |
| 检查每周用量和按需消费 | 无 |
工作原理
AI Agent (Claude / Cursor / Copilot / Windsurf / etc.)
│
│ MCP Protocol (JSON-RPC over stdio)
▼
grok-bot-mcp server
│
├── Grok Bot Gateway ──► http://127.0.0.1:<port>/api/<command>
│ ├── listAgents, createAgent, sendPrompt...
│ └── 100+ gateway commands
│
├── Local SQLite DBs ──► ~/.grokbot/agents/<id>/store.db (read-only)
│ └── transcript_entries, kv, blobs
│
└── Cursor Usage API ─► api2.cursor.sh (ConnectRPC)
└── GetSandUsageStatus, GetCurrentPeriodUsage服务器通过解密 gateway-descriptor.json 来发现 Grok Bot 网关(与 gbu 相同的 macOS Keychain 技术)。对于数据库查询,它直接以只读模式读取本地 SQLite 文件。
手动配置
如果你更倾向于手动配置,请将以下内容添加到你的 MCP 配置文件中:
{
"mcpServers": {
"grok-bot": {
"command": "node",
"args": ["~/.gbm/bin/grok-bot-mcp"]
}
}
}系统要求
Node.js 18+
已安装并运行 Grok Bot 应用(用于网关和钥匙串访问)
macOS(用于网关发现和钥匙串解密;只要文件存在,数据库读取可在任何操作系统上运行)
测试
测试使用模拟数据 — 不调用真实的 Grok Bot,不联网,不写入数据库:
node --test tests/*.test.mjs安全性
只读数据库访问 — 所有 SQLite 查询均使用
PRAGMA query_only = 1MCP 响应中不含机密信息 — 令牌永远不会返回给 AI 代理
网关令牌在启动时解密 — 从不写入磁盘
仅限本地 — stdio 传输,不暴露网络服务器
无遥测 — 除
127.0.0.1(网关)和api2.cursor.sh(用量)外零调用
卸载
rm -rf ~/.gbm然后从你的 AI 代理的 MCP 配置文件中删除 grok-bot 条目。
配套项目
gbu — Grok Bot 用量检查器 CLI。从终端进行多账户用量检查。相同的令牌管理,相同的 API,不同的界面(CLI 与 MCP)。
许可证
MIT
#GrokBot #MCP #ModelContextProtocol #Cursor #Claude #AI #DeveloperTools #Automation
⭐ 如果这能让你的 AI 代理控制你的机器人,请点个 Star。
免责声明
本项目是一个独立的、用于学习和研究目的的教育工具。它与 Cursor、Anysphere、Grok、Grok Bot、SpaceXAI、xAI、SpaceX 或任何其他公司、产品或实体均无关联、未经其认可、赞助或支持。
本仓库中提及的所有产品名称、徽标、商标和注册商标均归其各自所有者所有。使用任何名称或徽标仅用于识别和教育参考,不表示认可、合作或关联。
此工具使用你已拥有的凭据与本地运行的应用程序和公开可访问的 API 端点进行交互。它不会绕过身份验证、抓取受保护的内容或访问任何非公开系统。你需自行负责遵守使用此工具的任何平台的服务条款。
本项目的作者和贡献者不对因使用本软件而产生的任何损害、账户操作或后果承担任何责任。请自行斟酌使用。
This 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.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interaction with the Grok AI through an MCP server, supporting chat completions, text completions, embeddings, and model operations with streaming capabilities.5337MIT
- AlicenseAqualityAmaintenanceUse XAI's latest api functionalities with Grok MCP. It supports image understanding and generation, live search, latest models and more.2248MIT
- AlicenseNot gradedqualityAmaintenanceMCP server for xAI Grok API with 19 tools for chat, web and X search, session management, tool chaining, image and video generation, and documentation.2MIT
- FlicenseNot gradedqualityCmaintenanceAutomates Grok web interface to provide chat, web search, and conversation management via MCP, supporting multiple accounts and local/remote deployment.
Related MCP Connectors
Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Phone, SMS & email for AI agents — one remote MCP endpoint, OAuth login, zero install.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/Kargatharaakash/grok-bot-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server