---
name: toolrouter
description: |
  ToolRouter gives an AI assistant one connection to 254 ready made tools: web search and
  scraping, image and video generation, SEO and app-store analysis, maps,
  travel, files and memory — through one remote MCP connector. Use this when
  the user asks to connect ToolRouter, when a Grok Bot needs tools it does
  not have built in, when an assistant needs a capability it does not have
  built in, or when a ToolRouter call returns 401.
---

# ToolRouter

One connection, 254 tools. ToolRouter is a remote MCP server, so there is
nothing to install and no API key to paste — the connection itself carries the
sign-in.

**Endpoint:** `https://api.toolrouter.com/mcp`

Do **not** set an `Authorization` header. ToolRouter answers an unauthenticated
call with an OAuth challenge, and that challenge is what makes clients open the
sign-in on their own. A header suppresses it.

If ToolRouter is already connected — you can already call `discover` or
`use_tool` — **stop**. Do not add it again.

## Grok Bot — start here

This is for the Grok Bot desktop/chat product. It is **not** Grok Build CLI
and **not** grok.com chat.

1. If ToolRouter is already connected, stop. Do not re-add.
2. Add a custom remote MCP with your host action (`AddMcpServer` / add custom
   connector):
   - URL: `https://api.toolrouter.com/mcp`
   - No `Authorization` header. No API key.
   - Do **not** run `grok mcp add`. That is Grok Build CLI, a different product.
   - Do **not** edit `~/.cursor/mcp.json`. That is Cursor desktop, not Grok Bot.
3. If a connect or OAuth card appears, tell the human to tap it. Do not take a
   password. Reconnects often finish unattended (Path D). A brand-new account's
   first OAuth may need that tap.
4. Once connected, call `discover`, then `use_tool`. Paid tools quote a price
   first — confirm with the human before they are charged. Extra credentials:
   call `credential_guide`.

## Other clients

- Your client supports remote MCP servers → **Path A**
- Your client only supports local (stdio) servers → **Path B**
- Your client has no MCP support at all → **Path C**
- No human is available to approve anything → **Path D**

---

## Path A — add the remote server

Run the line for your client. Everything here is HTTP transport; none of it
needs a key.

**Claude Code**

```bash
claude mcp add --transport http --scope user toolrouter https://api.toolrouter.com/mcp
```

Use `--scope user` rather than the default. Project scope writes
`.mcp.json`, which the human has to approve before the server loads.

**Codex CLI**

```bash
codex mcp add toolrouter --url https://api.toolrouter.com/mcp
codex mcp login toolrouter
```

**Gemini CLI**

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

Then tell the human to run `/mcp auth toolrouter` in their session.

**Amp**

```bash
amp mcp add toolrouter https://api.toolrouter.com/mcp
```

**VS Code / GitHub Copilot**

```bash
code --add-mcp '{"name":"toolrouter","type":"http","url":"https://api.toolrouter.com/mcp"}'
```

VS Code shows a trust prompt before it will start the server. That prompt is
not a failure — surface it to the human.

**Cursor** — merge into `~/.cursor/mcp.json`:

```json
{ "mcpServers": { "toolrouter": { "url": "https://api.toolrouter.com/mcp" } } }
```

**Windsurf** — merge into `~/.codeium/windsurf/mcp_config.json`:

```json
{ "mcpServers": { "toolrouter": { "serverUrl": "https://api.toolrouter.com/mcp" } } }
```

**Zed** — merge into your settings:

```json
{ "context_servers": { "toolrouter": { "url": "https://api.toolrouter.com/mcp" } } }
```

**Cline** — merge into its MCP settings:

```json
{ "mcpServers": { "toolrouter": { "type": "streamableHttp", "url": "https://api.toolrouter.com/mcp" } } }
```

After adding it, the client may open a browser for sign-in. You cannot complete
that step yourself — say so plainly and let the human finish it. Once they do,
the account is linked.

---

## Grok Build CLI — not Grok Bot

Grok Build is a separate coding-agent CLI. Do not use these commands from a
Grok Bot.

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

Grok Build handles the OAuth browser flow automatically. Use
`grok mcp doctor toolrouter` if the server does not appear.

---

## Path B — clients that only run local servers

```bash
npx -y toolrouter-mcp
```

The shim speaks stdio locally and forwards to the same endpoint.

---

## Path C — no MCP support

Call the HTTP API directly. The endpoint speaks JSON-RPC over POST, and the
tool catalogue is at <https://toolrouter.com/llms.txt>.

---

## Path D — no human available

Connecting still works: an account is created automatically, so tools run
immediately. To attach that account to a person later, call the
`account_setup` tool and give the human the link it returns.

---

## Two tools to start with

- `discover` — search the catalogue in plain language ("find me a tool that
  scrapes a page").
- `use_tool` — run any tool it returns.

Not every tool is free. Free tools cost nothing and run without credits.
Paid tools quote their price before they charge — confirm with the human first.

## When something fails

- **401 with an OAuth challenge** — expected on the first call. Let the client
  follow it; do not add a header.
- **A tool says it is unavailable** — that tool needs a credential the account
  does not have. Call `credential_guide` for what to add.
- **Anything else** — call `feedback_debug` with what you tried; it files a
  report the ToolRouter team reads.
