> mcp tools
MCP (Model Context Protocol) servers extend Grok with external tools — Linear, GitHub, databases, and more. Register them with grok mcp add over stdio (local subprocess), http, or sse transports, or declare them in .grok/settings.json under mcpServers. grok mcp list, test, and remove manage them.
// mcp tools
6 commands$ grok mcp add my-server --transport stdio --command "bun" --args server.js$ grok mcp add my-server --transport http --url "http://localhost:3000"$ grok mcp add linear --transport sse --url "https://mcp.linear.app/sse"$ grok mcp add-json my-server '{"command": "bun", "args": ["server.js"], "env": {"API_KEY": "your-key"}}'$ grok mcp list$ .grok/settings.json// faq
How do I add an MCP server to Grok CLI?
Run grok mcp add <name> --transport <stdio|http|sse> with either --command and --args (stdio) or --url (http/sse). For example, grok mcp add linear --transport sse --url https://mcp.linear.app/sse. You can also paste a full config with grok mcp add-json, or edit .grok/settings.json directly.
What MCP transports does Grok CLI support?
Three: stdio (runs the server as a local subprocess — the most common), http (connects to a hosted HTTP endpoint), and sse (Server-Sent Events). The transport must match what the server actually speaks, or the connection fails.
How do I check whether an MCP server works?
grok mcp test <name> connects to the server and reports whether it responds and which tools it exposes. Run it right after grok mcp add to catch a bad command or unreachable URL before Grok tries to use the server. grok mcp list shows all configured servers.
Where are MCP servers stored?
In the project's .grok/settings.json under the mcpServers key — an object keyed by server name, each with a transport plus command and args or a url, and optional env. Because it is per-project, commit the file to share servers with your team, and reference secrets via env vars rather than hard-coding them.