MCP

Install AgentRouter in Claude, Cursor, Codex, and other MCP-compatible clients

View as Markdown

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

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:

$export AGENTIC_API_KEY=aak_...

Then add the remote MCP server:

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

Get your AgentRouter API key

Create or copy your AgentRouter API key from:

https://www.agentrouter.to/agentic-api/install
2

Install the hosted endpoint

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:

$npx add-mcp https://mcp.agentrouter.to
3

Authenticate with AgentRouter

Hosted remote MCP expects a Bearer token.

If your client lets you configure request headers, send:

1Authorization: Bearer aak_...

For local stdio, pass the same key through AGENTIC_API_KEY.

4

Use explicit capability tools first

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.

5

Use discovery tools for exploration or repair

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:

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:

1{
2 "tool": "geo_time_convert_execute",
3 "arguments": {
4 "routeKey": "geo.time.convert.abstract-timezone.mpp",
5 "provider": "abstract-timezone",
6 "fromLocation": "Los Angeles, CA",
7 "toLocation": "Tokyo, Japan",
8 "datetime": "2026-05-08 09:30:00",
9 "allowFallback": false
10 }
11}

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

1{
2 "tool": "execute_capability",
3 "arguments": {
4 "domain": "geo",
5 "capabilityId": "time-convert",
6 "input": {
7 "routeKey": "geo.time.convert.abstract-timezone.mpp",
8 "provider": "abstract-timezone",
9 "fromLocation": "Los Angeles, CA",
10 "toLocation": "Tokyo, Japan",
11 "datetime": "2026-05-08 09:30:00",
12 "allowFallback": false
13 }
14 }
15}

Media Example: fal Image Generation

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

1{
2 "tool": "media_image_generate_execute",
3 "arguments": {
4 "routeKey": "media.image.generate.fal.mpp",
5 "provider": "fal",
6 "prompt": "Create a clean launch hero image for an AI developer tool",
7 "aspectRatio": "16:9",
8 "allowFallback": false
9 }
10}

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

1{
2 "tool": "execute_capability",
3 "arguments": {
4 "domain": "media",
5 "capabilityId": "image-generate",
6 "input": {
7 "routeKey": "media.image.generate.fal.mpp",
8 "provider": "fal",
9 "prompt": "Create a clean launch hero image for an AI developer tool",
10 "aspectRatio": "16:9",
11 "allowFallback": false
12 }
13 }
14}

Text Analysis Example: Diffbot NL Recommend

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

1{
2 "tool": "text_analyze_recommend",
3 "arguments": {
4 "provider": "diffbot-nl",
5 "content": "AgentRouter routes text analysis through Diffbot NL.",
6 "fields": "entities,sentiment,language",
7 "optimizationPreferences": ["quality"]
8 }
9}

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

1{
2 "tool": "recommend_capability_route",
3 "arguments": {
4 "domain": "text",
5 "capabilityId": "analyze",
6 "input": {
7 "provider": "diffbot-nl",
8 "content": "AgentRouter routes text analysis through Diffbot NL.",
9 "fields": "entities,sentiment,language",
10 "optimizationPreferences": ["quality"]
11 }
12 }
13}

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:

1{
2 "tool": "enrichment_people_enrich_execute",
3 "arguments": {
4 "routeKey": "enrichment.people.enrich.diffbot.mpp",
5 "fullName": "Sam Altman",
6 "companyName": "OpenAI",
7 "allowFallback": false
8 }
9}

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

1{
2 "tool": "execute_capability",
3 "arguments": {
4 "domain": "enrichment",
5 "capabilityId": "company-enrich",
6 "input": {
7 "routeKey": "enrichment.company.enrich.diffbot.mpp",
8 "companyName": "OpenAI",
9 "domain": "openai.com",
10 "allowFallback": false
11 }
12 }
13}

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:

1{
2 "tool": "travel_airport_operations_recommend",
3 "arguments": {
4 "iataCode": "JFK",
5 "mode": "departures",
6 "limit": 1
7 }
8}

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

1{
2 "tool": "execute_capability",
3 "arguments": {
4 "domain": "travel",
5 "capabilityId": "airport-operations",
6 "input": {
7 "routeKey": "travel.airport.operations.flightapi.mpp",
8 "provider": "flightapi",
9 "allowFallback": false,
10 "iataCode": "JFK",
11 "mode": "departures",
12 "limit": 1
13 }
14 }
15}

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:

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:

$npx -y @agentrouter/mcp-server

Provide:

$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.