⚠️ Experimental: This MCP server is in an experimental state and may have rough edges. Please report any issues you encounter.
A comprehensive MCP (Model Context Protocol) server for Grok AI, providing access to chat, reasoning, live search, image understanding, and image generation capabilities through a clean, modular interface.
- 🤖 Chat Completions - Basic and history-managed conversations with Grok models
- 🧠 Reasoning - Step-by-step problem solving with access to thinking traces
- 🔍 Live Search - Real-time data from web, X (Twitter), news, and RSS feeds
- 👁️ Image Understanding - Analyze images with custom prompts
- 🎨 Image Generation - Create images from text descriptions
- Python 3.12-3.13
- xAI API key from https://console.x.ai
- uv package manager
# Clone the repository
git clone https://github.com/yourusername/pmind-grok-mcp.git
cd pmind-grok-mcp
# Install dependencies with uv
uv sync- Copy the example environment file:
cp .env.example .env- Edit
.envwith your settings:
# Required
XAI_API_KEY=your_api_key_here
# Optional
GROK_MODEL=grok-4
GROK_TIMEOUT=3600
DOWNLOADS_DIR=downloadsuv run pmind-grok-mcpThe server will start and be available for MCP clients to connect.
Use the following command to add the server:
claude mcp add pmind-grok-mcp -- uv run --directory /path/to/pmind-grok-mcp pmind-grok-mcpReplace /path/to/pmind-grok-mcp with the actual path where you cloned the repository.
The server provides tools for chat completions, reasoning, live search, image understanding, and image generation. Each tool is accessible through the MCP protocol with comprehensive parameter documentation.
- Ensure your API key is set in the environment or
.envfile - Verify the key at https://console.x.ai
- Increase
GROK_TIMEOUTfor reasoning models (default: 3600s) - Reasoning models require longer processing time
- Monitor your usage at https://console.x.ai
- Implement exponential backoff for high-volume requests