Grok MCP Server

MCP server for the xAI Grok API — chat, vision, search, and embeddings

Local serverstdio

What is the Grok MCP server?

Connect Grok to Claude, Cursor or any other MCP client and it stops being a tab you switch to. MCP server for the xAI Grok API — chat, vision, search, and embeddings. The grok mcp server is what makes that connection.

What the server does

An MCP (Model Context Protocol) server for the xAI Grok API. Built in Rust, exposes chat completions, vision, web/X search, embeddings, and model listing as MCP tools.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • chat — Send a chat completion request to Grok with optional multi-turn history, system prompt, structured output (JSON schema), model selection, and
  • chat_with_vision — Analyse an image with Grok's vision capabilities given an image URL and text prompt
  • chat_with_search — Chat with Grok using live web search and/or X (Twitter) search to ground responses
  • embedding — Generate text embeddings using Grok's embedding model
  • list_models — List all available Grok models and their IDs (cached for 5 minutes)

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

Credentials and setup notes

Where it fits

Among the AI and media services options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Grok's toolset — chat, chat_with_vision, chat_with_search and 2 more — is a fair guide to whether it matches your workflow. It is maintained by codeChap; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
chatSend a chat completion request to Grok with optional multi-turn history, system prompt, structured output (JSON schema), model selection, and multi-agent research
chat_with_visionAnalyse an image with Grok's vision capabilities given an image URL and text prompt
chat_with_searchChat with Grok using live web search and/or X (Twitter) search to ground responses
embeddingGenerate text embeddings using Grok's embedding model
list_modelsList all available Grok models and their IDs (cached for 5 minutes)

Configuration

Example prompts to try

  • Use Grok to chat.
  • Use Grok to chat with vision.
  • Use Grok to chat with search.

Frequently asked questions

It connects Grok to MCP-compatible AI assistants such as Claude and Cursor, exposing 5 tools (chat, chat_with_vision, chat_with_search, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Grok directly.