
Grok-MCP
MCP server giving AI clients access to xAI's Grok models, search, vision and media tools
The repository was last updated 10 days ago and is published under MIT.
Grok-MCP is an open-source MCP server for design and media. It is available on CLI, API and Self-hosted.
- Pricing
- Open source
- Platforms
- CLI, API, Self-hosted
- What it can do
- Can delete data (2 tools)
- GitHub stars
- 57
- Last commit
Similar MCP servers
About Grok-MCP
Grok-MCP wraps xAI's Grok API as a Model Context Protocol server, so an MCP-compatible client can call Grok for chat, web and X search, image analysis, document questions and image or video creation without writing API glue code. Tools are exposed through the standard MCP interface and can be run over stdio, inside Docker, or tested with the MCP Inspector.
Beyond plain chat, the server bundles agentic tools such as web research with citations, X post search with handle and date filters, and a sandboxed Python executor. A unified agent tool can combine files, images, search and generation in one request. Generated media can be saved into a local images folder, and conversations can optionally be kept as JSON history files on disk.
It suits developers and power users who already work in an MCP client and want Grok available alongside other tools. Using it requires an xAI API key, and image or file input needs a filesystem MCP server to pass local paths.
Tools this server provides (22)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 2 of 22 tools delete data and 1 changes data; 10 names don't say.
From the server's own tool labels and tool names; not verified by us.
- chat
- Standard chat completion with optional persistent history, multi-agent support, service tier and guidelines.
- chat_with_vision
- Analyze local or remote images with a Grok vision model.
- chat_with_files
- Chat grounded on previously uploaded documents.
- stateful_chat
- Continue a server-side stored conversation via response_id.
- retrieve_stateful_responseName suggests: reads
- Fetch a stored response by ID.
- delete_stateful_responseName suggests: deletes
- Delete a stored response by ID.
- web_searchName suggests: reads
- Autonomous web research with domain filters and citations.
- x_searchName suggests: reads
- Autonomous search over X posts with handle and date filters.
- code_executor
- Solve tasks by running Python in a sandbox.
- grok_agent
- Unified agent mixing files, images, web search, X search, code execution and image generation.
- generate_image
- Create or edit images with Grok Imagine.
- generate_video
- Text-to-video, image-to-video or video editing with Grok Imagine.
- extend_video
- Extend an existing generated video with a follow-up prompt.
- upload_fileName suggests: changes
- Upload a local document.
- list_filesName suggests: reads
- List uploaded files with sorting.
- get_fileName suggests: reads
- Fetch file metadata by ID.
- get_file_contentName suggests: reads
- Download file content as text.
- delete_fileName suggests: deletes
- Delete a file by ID.
- list_chat_sessionsName suggests: reads
- List saved sessions in chats/.
- get_chat_historyName suggests: reads
- Get a session's full transcript.
- clear_chat_history
- Delete a session's local history file.
- list_modelsName suggests: reads
- List Grok language and image models with live pricing.
What it does
- Agentic web and X search
- Runs autonomous searches over the web and X posts, with domain and handle filters and citations.
- Image and video generation
- Creates, edits and extends images and videos with Grok Imagine, optionally saving outputs locally.
- Vision analysis
- Sends local or remote images to a Grok vision model for description and questions.
- File upload and chat
- Uploads documents to xAI and answers questions grounded on them.
- Stateful conversations
- Stores server-side responses that can be continued, retrieved or deleted by ID.
- Local chat history
- Saves optional session transcripts as JSON files for later review.
- Live model listing
- Lists available Grok language and image models along with current pricing.
Good for
- Research current web or X discussions from inside an MCP-enabled assistant
- Generate or edit images and short videos without leaving the chat client
- Ask questions about uploaded documents using Grok models
- Analyze screenshots or photos by passing their file paths to the vision tool
- Run small Python tasks in a sandbox as part of a multi-step request
Pricing
Open source
Free MIT-licensed server; xAI API usage is billed separately by xAI.
Grok-MCP FAQ
What do I need to run Grok-MCP?
Python 3.11 or higher, the uv tool, and an xAI API key set as XAI_API_KEY.
How do I connect Grok-MCP to Claude Desktop?
Add a server entry to the Claude Desktop configuration that runs uv with the project directory and main.py, passing your API key in the env block.
Can I run Grok-MCP in Docker?
Yes, the project includes a docker compose setup for running the server.
How are images and files passed in?
Paths to local files must be typed into chat, which works best alongside the optional Filesystem MCP server.
Is Grok-MCP free?
Yes. Grok-MCP is open source, so you can use and self-host it for free.
What are the best alternatives to Grok-MCP?
The closest alternatives to Grok-MCP are Grok Chat, Grok by xAI by UniversalMCP, MCP Grok, Grok Image and Grok Video.
Where this comes from
- Description: written from the project's README.
