# MCP (/docs/mcp)

There are two [Model Context Protocol](https://modelcontextprotocol.io) servers:

| Server | URL | What it does | Auth |
| --- | --- | --- | --- |
| **TorBox API** | `https://api.torbox.app/mcp` | Acts on your account: add and manage downloads, read your list, and more | OAuth sign-in, or `Authorization: Bearer <api key>` |
| **TorBox Docs** | `https://api-docs.torbox.app/mcp` | Searches these docs and the API reference | none (read-only, rate limited) |

Both use the Streamable HTTP transport.

## TorBox API server [#torbox-api-server]

Adding `https://api.torbox.app/mcp` to a client that supports remote MCP servers starts the OAuth sign-in: you
confirm a code on [torbox.app/oauth/device](https://torbox.app/oauth/device) and the client receives your API key
as its token. Clients without OAuth can send the key as a header instead. Resetting your API key in the
[TorBox settings](https://torbox.app/settings) disconnects every client. If AI features are turned off in your
settings, the server answers `403`.

The tools are generated from the API's own routes, so they do exactly what the endpoints in the
[reference](/reference) do.

TorBox also publishes [AI skills](https://github.com/TorBox-App/ai-skills) that teach agents to use the API and
MCP well, and a guide on
[connecting your AI to TorBox](https://support.torbox.app/en/articles/18453973-how-to-connect-your-ai-to-torbox).

## TorBox Docs server [#torbox-docs-server]

Read-only tools for agents that write code against the API:

| Tool | |
| --- | --- |
| `search_docs(query)` | Full-text search over the guides and every API operation |
| `get_page(path)` | A guide or operation page as Markdown, e.g. `/docs/authentication` or `/operations/create_torrent` |
| `list_endpoints()` | Every operation: operation ID, method, path, summary |
| `get_endpoint(operation_id)` | One operation in full: parameters, body, responses |

## Configuration [#configuration]

<Tabs items={["Claude Code","Claude Desktop","Cursor"]}>
<Tab value="Claude Code">
```bash
# TorBox API, with OAuth sign-in
claude mcp add --transport http torbox https://api.torbox.app/mcp

# TorBox API, with an API key instead
claude mcp add --transport http torbox https://api.torbox.app/mcp --header "Authorization: Bearer $TORBOX_API_KEY"

# TorBox Docs
claude mcp add --transport http torbox-docs https://api-docs.torbox.app/mcp
```
</Tab>

<Tab value="Claude Desktop">
In **Settings → Connectors → Add custom connector**, add `https://api.torbox.app/mcp` (you'll be asked to sign
in) and `https://api-docs.torbox.app/mcp`.

Or in `claude_desktop_config.json`, through the `mcp-remote` bridge:

```json
{
  "mcpServers": {
    "torbox": { "command": "npx", "args": ["-y", "mcp-remote", "https://api.torbox.app/mcp"] },
    "torbox-docs": { "command": "npx", "args": ["-y", "mcp-remote", "https://api-docs.torbox.app/mcp"] }
  }
}
```
</Tab>

<Tab value="Cursor">
`~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project):

```json
{
  "mcpServers": {
    "torbox": { "url": "https://api.torbox.app/mcp" },
    "torbox-docs": { "url": "https://api-docs.torbox.app/mcp" }
  }
}
```

To use an API key instead of signing in:

```json
{
  "mcpServers": {
    "torbox": {
      "url": "https://api.torbox.app/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}
```
</Tab>
</Tabs>

## For LLMs [#for-llms]

These docs are also available as plain text: [/llms.txt](/llms.txt) (index of every page and API operation),
[/llms-full.txt](/llms-full.txt) (everything in one file), and any page as Markdown by adding `.md`, e.g.
[/docs/authentication.md](/docs/authentication.md).