# autorouter MCP server

> Reduces context window overhead by providing a single search tool to discover and call MCP tools, skills, and plugins on demand.

- Repository: https://github.com/Webb-Ventures/autorouter
- Page: https://hostedmcp.org/servers/webb-ventures/autorouter
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 0.3.1

## Install

### Claude Code

```sh
claude mcp add autorouter -- npx -y autorouter-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "autorouter": {
      "command": "npx",
      "args": [
        "-y",
        "autorouter-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "autorouter": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "autorouter-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"autorouter","type":"stdio","command":"npx","args":["-y","autorouter-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "autorouter": {
      "command": "npx",
      "args": [
        "-y",
        "autorouter-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add autorouter -- npx -y autorouter-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.autorouter]
command = "npx"
args = ["-y", "autorouter-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user autorouter npx -- -y autorouter-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "autorouter": {
      "command": "npx",
      "args": [
        "-y",
        "autorouter-mcp"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `AUTOROUTER_CONFIG` | no | no | Path to autorouter.json. Defaults to the standard lookup chain (./.autorouter.json, ~/.config/autorouter/config.json, …). |
| `AUTOROUTER_IMPORT` | no | no | Comma-separated harness configs to import: claude, codex, cursor, vscode, plugins. |
| `AUTOROUTER_SELECTOR_MODE` | no | no | Reranker backend: auto \| sampling \| cli \| api \| off. |
| `AUTOROUTER_SELECTOR_MODEL` | no | no | Model the selector reranks with, e.g. haiku. |

## FAQ

### How does autorouter save context tokens?

Instead of injecting every server's full tool schema into the system prompt, it hides them behind a search tool and only promotes tools into the active context when they are actually used.

### Is the 'adopt' command necessary?

Yes, the adopt command is required to move existing server configurations into the router so that the harness loads only the router instead of every individual server.

### What happens if I use a plugin with OAuth?

If the router cannot reach a plugin's MCP servers (common with OAuth where the harness holds the token), the plugin stays enabled to ensure the server continues to work.
