grok-api-mcp

grok-api-mcp

An MCP server that provides comprehensive xAI/Grok API documentation, allowing AI assistants to search bundled guides, fetch live documentation, and browse API endpoints or model specifications.

Category
Visit Server

README

grok-api-mcp

MCP server that provides xAI/Grok API documentation to AI assistants. Includes 75 bundled documentation files covering all xAI API features, models, and endpoints.

Features

  • Bundled documentation - 75 markdown files with complete xAI API coverage
  • Live fetch - Pull fresh docs from docs.x.ai when needed
  • Semantic search - Find relevant documentation by keyword
  • API reference - 44 endpoints across 12 categories
  • Model reference - 12 Grok models with specs and pricing

Installation

npm install
npm run build

Usage

With Claude Desktop

Add to your Claude Desktop configuration (~/.config/claude/claude_desktop_config.json):

{
  "mcpServers": {
    "grok-api-docs": {
      "command": "node",
      "args": ["/path/to/grok-api-mcp/dist/index.js"]
    }
  }
}

With Claude Code

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "grok-api-docs": {
      "command": "node",
      "args": ["/path/to/grok-api-mcp/dist/index.js"]
    }
  }
}

Standalone

npm start

Available Tools

Tool Description
search_docs Search bundled documentation for API features, models, and guides
get_doc_page Fetch fresh documentation from docs.x.ai
list_api_endpoints List all 44 API endpoints, optionally filtered by category
list_models List all 13 Grok models with context lengths and capabilities

search_docs

Search the bundled documentation using keywords.

query: "function calling"

get_doc_page

Fetch a specific documentation page from docs.x.ai.

path: "guides/function-calling"

list_api_endpoints

List API endpoints. Filter by category: chat, images, videos, voice, models, files, batch, collections, api-keys, billing, team, audit.

category: "collections"  # optional

list_models

List all available Grok models with their specifications.

API Coverage

Endpoints (44 total)

Category Count API
Chat 4 Inference
Images 2 Inference
Videos 2 Inference
Voice 1 Inference
Models 3 Inference
Files 5 Inference
Batch 7 Inference
Collections 9 Management
API Keys 4 Management
Billing 3 Management
Team 3 Management
Audit 1 Management

Models (12 total)

Language models:

  • grok-4-1-fast-reasoning, grok-4-1-fast-non-reasoning
  • grok-4-fast-reasoning, grok-4-fast-non-reasoning
  • grok-code-fast-1, grok-4-0709
  • grok-3, grok-3-mini, grok-2-vision-1212

Image generation:

  • grok-imagine-image, grok-2-image-1212

Video generation:

  • grok-imagine-video

Documentation Topics

  • Chat completions and Responses API
  • Function calling and tool use
  • Built-in tools (web search, X search, code execution)
  • Collections (RAG/embeddings)
  • Voice API (real-time WebSocket)
  • Batch API
  • Image and video generation
  • Streaming and structured outputs
  • Error handling and rate limits
  • SDK guides (Python, TypeScript)

Development

npm run build    # Compile TypeScript + copy data files
npm run start    # Run the server
npm run dev      # Watch mode for development

Adding Documentation

  1. Add .md file to src/data/
  2. Run npm run build
  3. The file is automatically discoverable by search_docs

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured