> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.agentrouter.to/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.agentrouter.to/_mcp/server.

# MCP

AgentRouter MCP exposes the AgentRouter capability catalog to MCP-compatible runtimes through one hosted remote endpoint:

```text
https://mcp.agentrouter.to
```

## URL Model

AgentRouter intentionally splits the MCP experience into two public surfaces:

* docs page: `https://docs.agentrouter.to/integrations/mcp`
* hosted MCP endpoint and detail page: `https://mcp.agentrouter.to`

Humans can open `https://mcp.agentrouter.to` in a browser, and MCP clients can install the same URL.

## Install Commands

Use the Claude CLI command when you are installing directly into Claude. If your client supports a generic MCP installer flow, the hosted endpoint is the same.

Set your API key in the shell first:

```bash
export AGENTIC_API_KEY=aak_...
```

Then add the remote MCP server:

```bash
claude mcp add \
  --transport http \
  --scope user \
  --header "Authorization: Bearer $AGENTIC_API_KEY" \
  agentrouter \
  https://mcp.agentrouter.to
```

```bash
npx add-mcp https://mcp.agentrouter.to
```

```bash
export AGENTIC_API_BASE_URL=https://api.agentrouter.to/api/agentic-api
export AGENTIC_API_KEY=aak_...
npx -y @agentrouter/mcp-server
```

## Recommended Setup

Create or copy your AgentRouter API key from:

```text
https://www.agentrouter.to/agentic-api/install
```

If you are in Claude CLI, use the explicit `claude mcp add` command above.

If you are in a client with a generic MCP installer flow, use:

```bash
npx add-mcp https://mcp.agentrouter.to
```

Hosted remote MCP expects a Bearer token.

If your client lets you configure request headers, send:

```http
Authorization: Bearer aak_...
```

For local stdio, pass the same key through `AGENTIC_API_KEY`.

Prefer tools like `models_chat_complete_execute`, `models_list_execute`, `geo_time_current_execute`, `geo_time_convert_execute`, `text_analyze_recommend`, `search_answer_recommend`, `web_extract_execute`, or `broadcast_message_quote_execute` when they are available.

Use `list_domains`, `list_capability_tools`, and `get_capability_contract` when the agent needs to inspect the catalog or recover from validation failures.

## Tool Model

The preferred MCP abstraction is:

```text
one capability operation = one tool
```

Examples:

* `email_send_recommend`
* `email_send_execute`
* `broadcast_message_quote_execute`
* `broadcast_message_send_recommend`
* `models_chat_complete_execute`
* `models_code_complete_execute`
* `models_list_execute`
* `geo_time_current_execute`
* `geo_time_convert_execute`
* `text_analyze_recommend`
* `translation_text_rephrase_execute`
* `media_image_generate_execute`
* `media_image_edit_execute`
* `search_answer_recommend`
* `web_scrape_execute`
* `web_extract_execute`
* `enrichment_people_enrich_execute`
* `enrichment_company_enrich_execute`

Generic fallback tools still exist:

* `recommend_capability_route`
* `execute_capability`

But explicit capability tools are the better default because agents fill them more reliably.

For broadcast, quote is the safe default tool. As of May 1, 2026, `broadcast.message.send` should remain a recommend-or-review step because one live execute creates a real public post and the latest observed send challenge was about `$40.96`.

For translation, `translation_text_rephrase_execute` is the live DeepL Write path after the May 5, 2026 paid route-by-route retest. Use route context so the MCP client sends `targetLanguage` and `tone` exactly as exposed.

For models, DeepSeek chat completion, code completion, and model listing are live through generated tools when the hosted catalog exposes the `models` domain. Use route context to choose supported model ids such as `deepseek-v4-flash`.

For geo time, Abstract Timezone current-time and convert-time are live through generated tools when the hosted catalog exposes the `geo` domain. Use route context before pinning `geo.time.current.abstract-timezone.mpp` or `geo.time.convert.abstract-timezone.mpp`; both routes charged 6 credits in the May 9, 2026 paid smoke.

For text analysis, use `text_analyze_recommend` or the generic `recommend_capability_route` path. Do not execute `text.analyze.diffbot-nl.mpp` until `canExecuteNow` is true and paid smoke evidence exists; direct Diffbot NL MPP wrapper checks returned HTTP 429 before payment on May 5, 2026.

For media, fal image generation and edit are live through `media.image.generate.fal.mpp` and `media.image.edit.fal.mpp`. Treat `media.video.generate.fal.mpp` as gated until route context reports `canExecuteNow=true`; the current blocker is upstream paymentauth 524 evidence reproduced outside AgentRouter.

For web extraction and Diffbot KG enrichment, use route context before pinning `web.extract.diffbot.mpp`, `enrichment.people.enrich.diffbot.mpp`, or `enrichment.company.enrich.diffbot.mpp`.

## Geo Example: Abstract Timezone Conversion

If your MCP client exposes generated geo tools from the live catalog, the execute tool will typically look like:

```json
{
  "tool": "geo_time_convert_execute",
  "arguments": {
    "routeKey": "geo.time.convert.abstract-timezone.mpp",
    "provider": "abstract-timezone",
    "fromLocation": "Los Angeles, CA",
    "toLocation": "Tokyo, Japan",
    "datetime": "2026-05-08 09:30:00",
    "allowFallback": false
  }
}
```

When a client does not expose the explicit generated tool, use the generic execute fallback:

```json
{
  "tool": "execute_capability",
  "arguments": {
    "domain": "geo",
    "capabilityId": "time-convert",
    "input": {
      "routeKey": "geo.time.convert.abstract-timezone.mpp",
      "provider": "abstract-timezone",
      "fromLocation": "Los Angeles, CA",
      "toLocation": "Tokyo, Japan",
      "datetime": "2026-05-08 09:30:00",
      "allowFallback": false
    }
  }
}
```

## Media Example: fal Image Generation

If your MCP client exposes generated media tools from the live catalog, the execute tool will typically look like:

```json
{
  "tool": "media_image_generate_execute",
  "arguments": {
    "routeKey": "media.image.generate.fal.mpp",
    "provider": "fal",
    "prompt": "Create a clean launch hero image for an AI developer tool",
    "aspectRatio": "16:9",
    "allowFallback": false
  }
}
```

When a client does not expose the explicit generated tool, use the generic execute fallback:

```json
{
  "tool": "execute_capability",
  "arguments": {
    "domain": "media",
    "capabilityId": "image-generate",
    "input": {
      "routeKey": "media.image.generate.fal.mpp",
      "provider": "fal",
      "prompt": "Create a clean launch hero image for an AI developer tool",
      "aspectRatio": "16:9",
      "allowFallback": false
    }
  }
}
```

## Text Analysis Example: Diffbot NL Recommend

If your MCP client exposes generated text tools from the catalog, the recommend tool will typically look like:

```json
{
  "tool": "text_analyze_recommend",
  "arguments": {
    "provider": "diffbot-nl",
    "content": "AgentRouter routes text analysis through Diffbot NL.",
    "fields": "entities,sentiment,language",
    "optimizationPreferences": ["quality"]
  }
}
```

When a client does not expose the explicit generated tool, use the generic recommendation fallback:

```json
{
  "tool": "recommend_capability_route",
  "arguments": {
    "domain": "text",
    "capabilityId": "analyze",
    "input": {
      "provider": "diffbot-nl",
      "content": "AgentRouter routes text analysis through Diffbot NL.",
      "fields": "entities,sentiment,language",
      "optimizationPreferences": ["quality"]
    }
  }
}
```

## Diffbot Example: Web Extract And KG Enrichment

If your MCP client exposes generated web and enrichment tools from the live catalog, the execute tool names will typically look like:

```json
{
  "tool": "enrichment_people_enrich_execute",
  "arguments": {
    "routeKey": "enrichment.people.enrich.diffbot.mpp",
    "fullName": "Sam Altman",
    "companyName": "OpenAI",
    "allowFallback": false
  }
}
```

When a client does not expose the explicit generated tool, use the generic execute fallback:

```json
{
  "tool": "execute_capability",
  "arguments": {
    "domain": "enrichment",
    "capabilityId": "company-enrich",
    "input": {
      "routeKey": "enrichment.company.enrich.diffbot.mpp",
      "companyName": "OpenAI",
      "domain": "openai.com",
      "allowFallback": false
    }
  }
}
```

## Travel Example: FlightAPI Airport Operations

If your MCP client exposes generated travel tools from the live catalog, the recommend tool for this capability will typically look like:

```json
{
  "tool": "travel_airport_operations_recommend",
  "arguments": {
    "iataCode": "JFK",
    "mode": "departures",
    "limit": 1
  }
}
```

When you need to pin execution to the live FlightAPI route, the generic execute fallback is the safest explicit form:

```json
{
  "tool": "execute_capability",
  "arguments": {
    "domain": "travel",
    "capabilityId": "airport-operations",
    "input": {
      "routeKey": "travel.airport.operations.flightapi.mpp",
      "provider": "flightapi",
      "allowFallback": false,
      "iataCode": "JFK",
      "mode": "departures",
      "limit": 1
    }
  }
}
```

FlightAPI airport operations passed a May 8, 2026 production smoke through `travel.airport.operations.flightapi.mpp`. Use route context first, then pin the route when the human chooses FlightAPI or asks for this concrete airport schedule path.

## Authentication Rules

### Hosted remote MCP

Use the hosted endpoint:

```text
https://mcp.agentrouter.to
```

Do not treat remote MCP as "put an API key into every tool payload". Authenticate the MCP connection itself.

### Local stdio fallback

When you need a local process instead of the hosted endpoint, use:

```bash
npx -y @agentrouter/mcp-server
```

Provide:

```bash
AGENTIC_API_KEY=aak_...
AGENTIC_API_BASE_URL=https://api.agentrouter.to/api/agentic-api
```

Use `@agentrouter/mcp-server` when you need the local stdio fallback instead of the hosted remote endpoint.

## Compatible Clients

The integration is designed for MCP-compatible clients such as:

* Claude Desktop
* Claude CLI
* Cursor
* Windsurf
* Codex CLI
* Gemini CLI
* Claude Code

## Practical Rule

Use the hosted remote MCP endpoint by default.

Use the local stdio package only when your client or operator workflow specifically requires a local MCP server process.