Skip to content

Connect ToolRouter to Grok Build

To connect Grok Build to ToolRouter, run grok mcp add --transport http toolrouter https://api.toolrouter.com/mcp, then confirm it with grok mcp doctor toolrouter. No key is pasted into the command — ToolRouter provisions an account on the first connect and free tools work immediately.

Add ToolRouter

bash
grok mcp add --transport http toolrouter https://api.toolrouter.com/mcp

xAI documents that servers requiring OAuth trigger a browser flow on first use, with tokens stored under ~/.grok/mcp_credentials.json. Complete the browser approval if one opens.

Verify the connection

bash
grok mcp list
grok mcp doctor toolrouter

doctor is the one that tells you why a server is not working, rather than just that it is configured.

Editing config.toml directly

Grok Build stores user MCP configuration in ~/.grok/config.toml, with one table per server:

toml
[mcp_servers.toolrouter]
url = "https://api.toolrouter.com/mcp"

Static headers can be added the same way you would on the command line, with --header "Authorization: Bearer ${TOKEN}". ToolRouter does not need one to start.

Team policy

If your organisation restricts which MCP servers Grok Build may reach, allow the public HTTPS endpoint https://api.toolrouter.com/mcp in the relevant policy. Teams can manage MCP policy and project configuration alongside the user-level file.

What you see on the first call

There is no sign-up step, which surprises people the first time. ToolRouter provisions an anonymous account the moment your client connects, so free tools work immediately, and the result of your very first tool call carries a short notice for the assistant to pass on: the account is anonymous and belongs to this session, free tools work as they are, signing in is only needed to pay for paid tools or to keep the account and its history — and here is the link to do that.

Until you use that link the account cannot buy credits, run paid tools, save provider credentials or create API keys, and its history is not recoverable after the session. Claiming it is free and takes about 30 seconds, or is instant if you are already signed in on toolrouter.com. See what is a ToolRouter claim link?.

A real example prompt and its result

Ask for something that needs live data, so you can tell a tool call apart from a plausible guess:

Use ToolRouter to get the current weather in London. Tell me which ToolRouter skill you called and show every field it returned.

The assistant should call discover to find the tool, then use_tool with weather-forecast and the current_weather skill. The result is a JSON detail record — on a live call on 5 September 2026 it carried eight fields:

json
{
  "location": "London, United Kingdom",
  "temperature": "17.95°C",
  "feels_like": "17.52°C",
  "condition": "Partly cloudy",
  "humidity": "66%",
  "wind": "12.96 km/h W",
  "cloud_cover": "33%",
  "visibility": "10000 m"
}

Values change; the shape does not. If the assistant answers with a temperature but cannot name the skill or show the fields, it has not called a tool.

Why the tool list stays short

The connection exposes a fixed 47 tool definitions — a measured 9,286 tokens — where discover searches the catalog and use_tool runs a named skill, so the 254 tools and 1,345 skills in the catalog as of 3 September 2026 cost nothing at connect time. The schema-weight benchmark has the method and the raw data.

What it costs in Grok Build

Free tools stay free and need no account. A paid call costs the tool's own price plus a flat $0.005 platform fee, so paid tools start at $0.005, and a paid call that fails is not charged. Subscriptions are optional: Lite is $9/mo and Plus is $19/mo, each including credits. See pricing and billing before running anything high-volume.

Grok Build MCP troubleshooting

`grok mcp doctor` reports the server as unreachable

The usual causes are a corporate proxy or an allowlist that does not include api.toolrouter.com. Confirm the host is reachable from the same shell before changing the configuration.

A browser window opened asking me to approve something

That is Grok Build's OAuth flow for remote HTTP servers. Complete it; tokens are stored under ~/.grok/mcp_credentials.json.

The coding agent describes a tool instead of running it

Ask for the job and the evidence in the same sentence — "use ToolRouter to audit https://example.com and show the returned fields." ToolRouter exposes discover to search the catalog and use_tool to run a skill, so the agent has to name one.

Is this the same as Grok chat or Grok Bot?

No. Grok Build is the coding agent. For grok.com use Connect to Grok; Grok Bot is a separate product with its own account-dependent MCP support, covered in Connect to Grok Bot; the API is Connect to the xAI API.

A paid tool is refused

Paid tools need a claimed account with credits. Use the claim link from the first-call notice, or ask the agent to run account_setup to produce it again.

Checked on 5 September 2026 against xAI's MCP servers documentation for the commands, config path and OAuth behaviour. A signed-in ToolRouter OAuth round trip inside Grok Build has not been exercised by ToolRouter; the command and authentication path are quoted from xAI's documentation. The weather result above is from a live call on the same day.