Grok MCP Server
Click on "Install 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 ServerSearch X for posts about AI safety"
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 Server
Search X.com in real-time with xAI's Grok API - directly from Claude
A Model Context Protocol server that brings real-time X/Twitter search to Claude. Powered by xAI's Live Search API, it provides instant access to posts, users, threads, and trending topics.
Why Grok MCP?
Real-time data - Access live X.com content, not cached or outdated information
Native Claude integration - Works seamlessly with Claude Desktop and Claude Code
Simple setup - One command to install, one config to add
Open source - MIT licensed, community-driven
Quick Start
1. Get an xAI API Key
Get your API key from console.x.ai
2. Install
uvx grok-mcp3. Configure Claude
For Claude Code - Add to .mcp.json in your project:
{
"mcpServers": {
"grok": {
"command": "uvx",
"args": ["grok-mcp"],
"env": {
"XAI_API_KEY": "your-api-key"
}
}
}
}For Claude Desktop - Add to your config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"grok": {
"command": "uvx",
"args": ["grok-mcp"],
"env": {
"XAI_API_KEY": "your-api-key"
}
}
}
}4. Use It
Ask Claude things like:
"Search X for posts about AI"
"What's trending on X right now?"
"Find tweets from @elonmusk about Tesla"
Available Tools
Tool | Description |
| Search posts with filters (handles, date range, analysis mode) |
| Find user profiles |
| Discover conversation threads |
| Get trending topics by location |
| Verify API connection |
Examples
Search Posts
Search X for posts about "AI safety" from the last weekFilter by User
Find recent posts from @anthropic about ClaudeGet Trends
What are the trending topics in tech right now?Development
# Clone
git clone https://github.com/guzus/grok-mcp.git
cd grok-mcp
# Install dependencies
uv sync --dev
# Run tests
uv run pytest
# Run locally
XAI_API_KEY=your-key uv run python -m grok_mcpArchitecture
src/grok_mcp/
├── server.py # MCP server implementation
├── grok_client.py # xAI Live Search API client
├── search_tools.py # Tool implementations
├── response_formatter.py
├── config.py
└── exceptions.pyContributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
MIT License - see LICENSE for details.
Links
Built with xAI Grok and Model Context Protocol
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/guzus/grok-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server