chat
standard chat completion with optional persistent history and multi-agent support.
How to use it
chat is exposed by the Grok MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the chat tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Grok MCP
claude mcp add grok-mcp -e XAI_API_KEY=your_api_key_here -- uv run --directory /path/to/Grok-MCP python main.pyOther tools in Grok MCP (21)
chat grounded on previously uploaded documents.
analyze local or remote images with a Grok vision model.
delete a session's local history file.
solve tasks by running Python in a sandbox.
delete a file by ID.
delete a stored response by ID.
extend an existing generated video with a follow-up prompt.
create or edit images with Grok Imagine (multi-reference editing supported).
text-to-video, image-to-video, or video editing with Grok Imagine.
get a session's full transcript.
fetch file metadata by ID.
download file content as text.
unified agent that mixes files, images, web search, X search, and code execution.
list saved sessions in chats/.
list uploaded files with sorting.
list all Grok language and image models with live pricing.
fetch a stored response by ID.
continue a server-side stored conversation via responseid.
upload a local document.
autonomous web research with domain filters and citations.
autonomous search over X (Twitter) posts, with handle and date filters.