Grok-MCP-Claude
Click on "Deploy 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-ClaudeGenerate an image of a sunset over mountains"
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-Claude
Grok MCP server optimized for Claude Desktop — clean, single-file implementation using xAI's Grok for real-time web/X search and image generation.
Concept
Claude thinks, Grok searches.
Claude Desktop handles conversation, memory, and reasoning. Grok provides what Claude can't — real-time web search, X (Twitter) search, and image/video generation.

Related MCP server: openai-agents-mcp
Features
Tool | Description |
| Real-time web and X (Twitter) search |
| Chat with vision, file, and code execution support |
| Multi-tool agent combining search, code execution, files, and images |
| Image generation with img2img support |
| Video generation with img2video and video2video support |
| Upload, list, retrieve, and delete files on xAI |
Requirements
Python 3.10+
Claude Desktop
Installation
git clone https://github.com/yourname/grok-mcp-claude.git
cd grok-mcp-claude
pip install -r requirements.txtConfiguration
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"grok": {
"command": "python",
"args": ["/path/to/grok-mcp-claude/grok.py"],
"env": {
"XAI_API_KEY": "your-api-key-here"
}
}
}
}Tool Reference
grok_search
Real-time search via web or X (Twitter).
Parameter | Default | Description |
| required | Search query |
|
|
|
|
| Model to use |
|
| Whitelist of domains (web) or handles (X) |
|
| Blacklist of domains (web) or handles (X) |
|
| Start date |
|
| End date |
|
| Return inline citations |
grok_chat
General-purpose chat with optional vision, file, and code execution.
Parameter | Default | Description |
| required | User message |
|
| Model to use |
|
| System prompt |
|
| xAI file IDs to attach |
|
| Local image paths |
|
| Image URLs |
|
| Previous response ID for stateful chat |
|
| Enable code execution |
grok_agent
Multi-tool agent. Combine web search, X search, code execution, files, and images freely.
Parameter | Default | Description |
| required | User message |
|
| Model to use |
|
| Enable web search |
|
| Enable X search |
|
| Enable code execution |
|
| Whitelist of domains or handles |
|
| Blacklist of domains or handles |
|
| xAI file IDs to attach |
|
| Local image paths |
|
| Image URLs |
|
| System prompt |
|
| Return inline citations |
|
| Max search iterations |
generate_image
Generate images. Pass image_path or image_url for img2img.
Parameter | Default | Description |
| required | Generation prompt |
|
| Model to use |
|
| Number of images |
|
| Local image for img2img |
|
| Image URL for img2img |
|
| e.g. |
generate_video
Generate videos from text, image, or video.
Parameter | Default | Description |
| required | Generation prompt |
|
| Model to use |
|
| Source image for img2video |
|
| Source video for video2video |
|
| Duration in seconds |
|
| Aspect ratio |
|
| Resolution |
manage_files
Manage files on xAI.
Action | Required params | Description |
|
| Upload a file |
| — | List uploaded files |
|
| Get file metadata |
|
| Get file content |
|
| Delete a file |
Models
DEFAULT_CHAT_MODEL = "grok-4-1-fast-non-reasoning"
DEFAULT_SEARCH_MODEL = "grok-4-1-fast-reasoning"
DEFAULT_IMAGE_MODEL = "grok-imagine-image"
DEFAULT_VIDEO_MODEL = "grok-imagine-video"License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
MCP server for Grok Imagine AI video generation
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceMCP server that enables Claude to control your computer, similar to Anthropic's computer use but easy to set up locally.2,577 npm388MIT
- AlicenseAqualityDmaintenanceMCP server that bridges OpenAI's Agents SDK with Claude Code, enabling web search, file search, and computer use capabilities directly in your development environment.29 npm1MIT
- FlicenseDqualityDmaintenanceA local MCP server providing free network access capabilities including HTTP requests, web search, webpage content extraction, and optional screenshots, designed for integration with Claude Desktop or Claude Code.6-
- FlicenseNot gradedqualityDmaintenanceAn MCP server that adds real-time web research to Claude Desktop using Gemini 2.5 Flash with native Google Search grounding.-