MCP

MCP is how Grok Code connects extra tool surfaces into the runtime.

Local MCP Definitions

Use the CLI when you want to add or remove definitions:

bash
grok mcp add demo -- echo hi
grok mcp list
grok mcp remove demo

Remote MCP Definitions

Use:

bash
grok mcp remote add docs https://docs.x.ai/api/mcp
grok mcp remote list
grok mcp remote remove docs

Scope

  • global entries live in ~/.grok/config.toml
  • project entries live in .grok/config.toml

TUI Inspection

Use /mcp when you want server health and currently available tools, not just config rows.

Was this page helpful? Report issues on GitHub.