🎬 New — watch the 2-minute guide videos →

MCP for agents

BharatRouter is a native MCP server — agents don't need a wrapper to use it. Connect any MCP client (Claude Code, Claude Desktop, or your own) over streamable HTTP with a BharatRouter key as the bearer token:

claude mcp add --transport http bharatrouter https://api.bharatrouter.com/mcp \
  --header "Authorization: Bearer br-..."

The server is stateless (POST /mcp only). Machine-readable discovery: server card · llms.txt · openapi.json.

Tools

Read tools (any key)

ToolWhat it does
list_modelsThe catalog with INR pricing, residency and live health — lets an agent pick a model by constraint.
chatOne-shot completion (non-streaming); supports optimize, provider, data_policy, upstream_key.
healthGateway health snapshot.
get_balancePrepaid balance, low-balance threshold, 30-day spend. (org key)
list_keysOrg API keys with limits, budgets, last-used. (org key)
list_byok_keysSaved BYOK keys and available providers. (org key)
get_fallback_chainsYour org's saved fallback chains. (org key)
list_endpointsYour registered BYOE endpoints (keys masked). (org key)
test_endpointCompliance-test a BYOE config without saving it. (org key)
list_collectionsThe public collections registry. (org key)
get_collection_healthPer-step uptime/p95 latency for a monitored collection. (org key)
create_topup_linkReturns a dashboard link — the human pays; agents never move money. (org key)

Management (full-scope org keys only)

ToolWhat it does
save_byok_key / remove_byok_keyManage BYOK provider keys.
set_fallback_chain / clear_fallback_chainSave or remove a model's fallback chain.
register_endpoint / remove_endpointRegister or remove a BYOE endpoint (register runs the compliance test).
import_collectionImport a collection into your routing (fork-before-use).
set_monitoring / run_monitor_checkTurn monitoring on/off, or canary a collection's steps now.
set_monitor_alert / remove_monitor_alertAdd or remove an alert on error_rate/latency_p95.
set_key_budgetUpdate a key's monthly ₹ budget.

Plus create_ephemeral_key (below), available to any DB-backed org key. Every write tool requires an explicit user_confirmed: true argument — the contract is that the agent asks its human before changing org state. Payments are link-only by design.

Ephemeral keys for sub-agents

create_ephemeral_key mints a key that expires in 1–168 hours (default 24) with a daily cap of up to 1,000 requests (default 100). It is inference-only — it can call chat and list_models but none of the management tools — so an orchestrator can hand credentials to sub-agents or untrusted code without exposing the org key. Full details on API keys & limits.

Why route agents through BharatRouter?