-
Notifications
You must be signed in to change notification settings - Fork 1
Setup
hrco edited this page Mar 21, 2026
·
8 revisions
Get xBridge MCP running in 2 minutes. Three options: pip, Docker, or source.
- xAI API Key — Get one free at x.ai/api (xAI gives you free credits to start)
- xBridge Key (optional) — Get a free key at xbridgemcp.com/#pricing for rate-limited access, or go Pro for unlimited
- Python 3.10+ (for pip install) or Docker (for container)
pip install xbridge-mcpRun it:
export XAI_API_KEY=your_xai_key
export XBRIDGE_KEY=your_xbridge_key # optional
xbridge-mcpdocker pull hrco/xbridge-mcp:latest
docker run -e XAI_API_KEY=your_xai_key -e XBRIDGE_KEY=your_xbridge_key hrco/xbridge-mcp:latestOr with docker-compose, create a .env file:
XAI_API_KEY=your_xai_key
XBRIDGE_KEY=your_xbridge_key
Then:
docker compose up -dgit clone git@github.com:hrco/xbridge-mcp.git
cd xbridge-mcp
pip install -e ".[dev]"
XAI_API_KEY=your_key xbridge-mcpAdd this to your Claude Code MCP config (~/.claude/settings.json or project .mcp.json):
{
"mcpServers": {
"xbridge": {
"command": "xbridge-mcp",
"env": {
"XAI_API_KEY": "your_xai_key",
"XBRIDGE_KEY": "your_xbridge_key"
}
}
}
}Restart Claude Code. All 19 tools are now available.
Pro tip: Claude can do this for you. Just paste the JSON above into your chat and say "add this MCP server" — Claude will find the right config file and set it up.
| Variable | Required | Description |
|----------|----------|-------------|
| XAI_API_KEY | Yes | Your xAI API key from x.ai/api |
| XBRIDGE_KEY | No | Your xBridge access key (free or Pro) |
Once connected to Claude Code, try:
-
"Ask Grok what's trending on X right now" — tests
grok-x-search -
"Use Grok to search the web for MCP servers" — tests
grok-web-search -
"Chat with Grok about Python best practices" — tests
grok-chat
If you see responses, you're good.
| Problem | Fix |
|---------|-----|
| XAI_API_KEY not set | Export the variable or add it to your .env file |
| Tools not showing in Claude | Restart Claude Code after adding MCP config |
| Connection refused | Make sure xbridge-mcp process is running |
| 401 Unauthorized | Check your xAI API key is valid at x.ai/api |
- Tools Reference — all 19 tools with parameters and examples
- $XBRDG Loyalty — hold $XBRDG for perks
- Product Site — pricing and demos
Independent project. Not affiliated with xAI. "Grok" is a trademark of xAI.