Skip to main content
Glama

OffRouter MCP

An MCP server for OffRouter, private inference for agents.

Every model on OffRouter runs inside a GPU TEE (Intel TDX plus an NVIDIA confidential GPU). Nothing is cached or logged, and every answer comes back with a signed receipt. This server goes one step further: it encrypts your prompt on your own machine, to a key the enclave proves it holds, before anything goes over the network. OffRouter's gateway sits in the middle and only ever sees ciphertext.

That is the main reason to run this locally instead of using the hosted endpoint at https://offrouter.org/mcp. A remote MCP server has to read your prompt to build the request. This one never sends it in the clear.

Quick start

You don't need an account to try it. With no configuration it uses OffRouter's free demo (one model, a few calls a day). It runs straight from this repository; the first start takes a minute while it builds.

Claude Code

claude mcp add offrouter -- npx -y github:offrouter/mcp

Claude Desktop, Cursor, Windsurf and other clients

{
  "mcpServers": {
    "offrouter": {
      "command": "npx",
      "args": ["-y", "github:offrouter/mcp"],
      "env": {
        "OFFROUTER_API_KEY": "off_sk_..."
      }
    }
  }
}

Then ask your agent something like "use offrouter to verify the enclave" or "ask deepseek-v4-flash on offrouter to review this contract".

Nothing to install. If you'd rather not run anything locally, add the hosted server at https://offrouter.org/mcp with your key as an Authorization: Bearer off_sk_... header. It has the same models, but your prompt reaches the gateway in the clear, and it can't pay per call from a wallet.

Related MCP server: sir

Three ways to pay

Pick one by setting an environment variable. If you set both, the key is used.

Setup

How it pays

Good for

nothing

Free demo, limited to one model and 5 calls a day

Trying it out

OFFROUTER_API_KEY

A prepaid key, billed per token

Everyday use

OFFROUTER_WALLET_KEY

Pay per call with x402 from your own wallet

Agents that hold their own funds

Prepaid key. Sign in with a wallet at offrouter.org/dashboard, fund a key, and copy the off_sk_... value. Each call is charged the exact token cost.

Wallet. Every call is paid on its own with a signed USDC transfer on Base, or USDG on Robinhood Chain. The private key stays in this process and is only used to sign the payment. OffRouter quotes each call as a ceiling (your whole input plus max_tokens of output) and refunds the unused part to the same wallet afterwards. This server won't sign anything above OFFROUTER_MAX_USD, whatever the server asks for. Use a dedicated wallet with a small balance, not your main one.

Configuration

Variable

Default

What it does

OFFROUTER_API_KEY

Prepaid key, starts with off_sk_

OFFROUTER_WALLET_KEY

Private key of a wallet to pay per call from

OFFROUTER_MAX_USD

0.10

Most a single wallet payment can be, in USD

OFFROUTER_NETWORK

both

Only pay on base or only on robinhood

OFFROUTER_MAX_TOKENS

2048

Output budget when the agent doesn't set one

OFFROUTER_E2EE

on

Set to off to send prompts to the gateway in the clear

OFFROUTER_BASE_URL

https://offrouter.org

API to talk to

Tools

  • list_models lists the models with context length and price per million tokens.

  • ask sends a prompt to one model and returns the answer, what it cost, and a link to its signed receipt.

  • compare runs the same prompt on 2 to 4 models in parallel, so you can see the answers and costs side by side.

  • account shows the key balance and recent spend, the wallet address and cap, or what's left on the demo.

  • verify_enclave checks the enclave from your machine right now and shows the key your prompts are encrypted to.

  • list_agents lists the agents published on OffRouter Studio: what each does, its model, how its runs have gone and whether it has a ready standing. Filter by a search term or to ready agents only.

  • get_agent shows one Studio agent in full: its example tasks, latest evaluation, wallet and config hash.

The same calls are on the client, listAgents() and getAgent(id), and need no key or wallet: the Studio directory is public.

How the encryption works

Before the first call, the server fetches an attestation report for a random nonce it just generated and checks it with the enclave gateway's reference verifier:

  1. The Intel TDX quote verifies all the way up to Intel's root certificate.

  2. The report covers our nonce, so it was made just now and is not a replay, and it binds the enclave's key set.

  3. The boot log replays to the measured launch file, which pins the open source enclave gateway at a specific commit.

If any of these fail, nothing is sent. If they pass, each message is encrypted to the enclave's X25519 key (HKDF-SHA256, then AES-256-GCM, with a fresh ephemeral key for every field). Each ciphertext is bound to the request's nonce and timestamp and to the model, so it can't be replayed or redirected to a different model. The answer comes back encrypted to a one-time key this server made for that request, and it's decrypted here. If the answer doesn't decrypt, it wasn't made by the enclave for your request, and the server throws it away.

The verified key is cached until shortly before it expires. If the enclave rejects a request, usually because its key rotated, the server checks the enclave again and retries once.

What stays visible

To be clear about what this does and doesn't hide:

  • The gateway can't read your messages or the answers.

  • The gateway still sees which model you picked, settings like max_tokens and temperature, the size of the ciphertext, the token counts the enclave reports, timing, your IP address, and who paid.

  • With a wallet, the payment itself is a normal onchain transfer, so it's public.

  • Your MCP client (Claude, Cursor and so on) sees the prompt and the answer, because that's where they come from and go to. This server protects the hop from your machine to the model.

Development

npm install
npm test
npm run build
OFFROUTER_API_KEY=off_sk_... npm run dev

Requires Node 20 or newer.

License

MIT

Available Tools

5 tools
accountAccountA
Read-only

Show how this server pays for calls: the prepaid key balance and recent spend, the wallet address and per call cap, or what is left on the free demo.

NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds genuinely useful behavioral context beyond that: it discloses the categories of data returned (balance, recent spend, wallet address, cap, demo credit), which matters because no output schema exists. It stops short of noting auth requirements or what happens when no key is configured.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single compact sentence that front-loads the purpose and then enumerates the return categories. Every clause carries content, though the opening framing is slightly wordier than needed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no parameters, the description must convey the return surface, and it does so by listing the possible account views. The one residual gap is that the 'or' framing implies mutually exclusive views without explaining how a caller selects among them, which is left unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters and the schema has no properties, so there is no parameter semantics to explain. Baseline of 4 applies; the description correctly spends no words on parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description supplies a concrete verb ('Show') and enumerates the resources returned: prepaid key balance, recent spend, wallet address, per-call cap, and free demo balance. This clearly separates it from siblings like compare, verify_enclave, list_models, and ask, though the opening phrase 'how this server pays for calls' is slightly abstract compared to the concrete account-status content that follows.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer this is the tool to check balance/spend, but there is no explicit 'use this when…' statement, no prerequisites (e.g., whether an API key is needed), and no named alternative or exclusion. Sibling tools don't obviously overlap, but the guidance is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

askAsk a private modelA

Send a prompt to an OffRouter model and get the answer back. It runs inside a GPU TEE and is not logged, so it is a good fit for sensitive material, a second opinion, or cheap bulk work.

NameRequiredDescriptionDefault
modelYesModel id from list_models, like "gemma-4-31b".
promptYesThe user message.
systemNoOptional system prompt.
max_tokensNoCap on output tokens. Reasoning models need a generous budget.
temperatureNo

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds real behavioral context beyond the sparse annotations: execution inside a GPU TEE, no logging, and cheap bulk usage. However, it stays silent on latency, cost specifics, error/timeout behavior, and does not reconcile with readOnlyHint=false (a non-mutating generation call presented as not read-only).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences: the action first, then the differentiators and use cases. No filler or repetition of schema content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter generation call with no output schema, the description conveys what comes back ("the answer") and the privacy model. It could say more about response shape or failure modes, but nothing an agent needs to invoke it is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 80%, so model, prompt, system, and max_tokens are already documented in the schema. The description adds no parameter-level guidance, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ("Send a prompt to an OffRouter model and get the answer back") and adds the distinguishing traits (GPU TEE, not logged). It does not explicitly contrast with siblings like compare or list_models, but the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete use cases: sensitive material, a second opinion, and cheap bulk work. It does not name an alternative or state when NOT to use it (e.g. use compare for multi-model benchmarking), so routing is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

compareCompare modelsA

Run the same prompt on 2 to 4 models in parallel and get every answer with its cost side by side.

NameRequiredDescriptionDefault
modelsYesModel ids from list_models.
promptYesThe user message.
systemNoOptional system prompt.
max_tokensNoCap on output tokens. Reasoning models need a generous budget.

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations cover the safety profile (readOnlyHint=false, openWorldHint=true), and the description adds genuinely new behavioral facts beyond them: fan-out across multiple models, parallel execution, and that each answer carries a billed cost. It stops short of saying what happens when one model in the batch fails or is rate-limited.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; the parallel-execution and cost aspects — the two things an agent most needs to know — land immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter tool with full schema coverage and no output schema, the description is sufficient: it conveys breadth (N models), concurrency, and that results and their costs are returned together. Only partial-failure behavior remains unstated, which is a minor omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters are already documented, including the 2–4 bounds and the models/prompt distinction. The description reinforces but does not extend this — nothing is said about how 'system' or 'max_tokens' apply across a heterogeneous model set, which would be the genuinely additive detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb ('Run the same prompt') and resource scope ('2 to 4 models in parallel') plus the return shape ('every answer with its cost side by side'). It implicitly sets itself apart from the single-model sibling 'ask', but never names that sibling or otherwise makes the distinction explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the '2 to 4 models' framing and the side-by-side cost output suggest it is for A/B or cost/quality trade-off comparisons. There is no explicit 'use this instead of ask when...' routing, and no mention that 'list_models' should be called first, which is a real prerequisite since model ids must come from somewhere.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_modelsList modelsA
Read-only

List the private models on OffRouter with their context length and price in USD per million tokens. Use it to find a model id for ask or compare.

NameRequiredDescriptionDefault
searchNoFilter on the model id, like "qwen" or "deepseek".

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=true), so the description's job is incremental — and it delivers by disclosing what the results contain (context length, price) and the pricing unit convention (USD per million tokens). Pagination behavior and result size limits are not mentioned, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences: the first defines content and scope, the second gives purpose. Zero filler and the resource description is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly fills the gap by naming the returned attributes and units, and the single parameter is fully documented in schema. Only the absence of any list-size or pagination note keeps it from being fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The sole `search` parameter has 100% schema description coverage with a concrete example ("qwen", "deepseek"), so the schema carries the semantics. The description adds nothing about the filter beyond implying the tool lists models.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

A specific verb ("List") on a specific resource ("private models on OffRouter"), with the exact fields returned (context length, USD price per million tokens) stated up front. This is clearly distinct from compare, ask, and account, though the description never explicitly contrasts itself with those siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Use it to find a model id for ask or compare" gives concrete downstream context that tells the agent when this tool is the right first step. It doesn't state when NOT to use it or what to do instead, but the positive routing cue is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

verify_enclaveVerify the enclaveA
Read-only

Check the enclave right now from this machine: the Intel TDX quote, that the report is fresh, and that it booted the published code. Returns the key prompts are encrypted to.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say readOnly and openWorld; the description adds substantive context beyond that — it performs a live network attestation against a remote enclave and returns the encryption key. It omits failure semantics (what a failed quote check returns, error shape), which matters for an attestation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences: the first front-loads what is checked, the second front-loads the return value. No filler and nothing repeated from the schema or annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and does name the key return. It leaves the success/failure result shape implicit, which is the one gap for an attestation call an agent must branch on.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero parameters, so there is nothing to disambiguate and the baseline applies. The description correctly implies no input is required because the machine context is implicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (check/verify) and resource (the enclave) plus the exact three things being validated: the Intel TDX quote, report freshness, and that it booted the published code. None of the siblings (compare, account, list_models, ask) overlap, so an agent can route unambiguously.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Right now from this machine' gives a real usage condition — a live, local verification rather than a cached or remote one. It stops short of naming when-not-to-use or a fallback path, but no sibling competes for this job.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observedaccount
    • First observedask
    • First observedcompare
    • First observedlist_models
    • First observedverify_enclave

TDQS

A4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: list_models discovers models, ask executes a single prompt, compare executes across multiple models, account reports billing/payment state, and verify_enclave checks attestation. The ask/compare overlap is explicitly clarified by compare's parallel multi-model comparison behavior.

Naming Consistency3/5

The set mixes verb_noun snake_case tools (list_models, verify_enclave) with simple verbs (ask, compare) and a noun-like tool (account). It remains readable, but there is no single predictable pattern across all five names.

Tool Count5/5

Five tools is well-scoped for an inference router: discovery, single query, comparison, billing, and attestation cover the core surface without excess. Each tool appears to earn its place.

Completeness4/5

The surface covers model discovery, prompt execution, multi-model comparison, account/billing status, and enclave verification, which are the key workflows for a private model router. Minor gaps might include richer model details or usage history, but agents can work around these.

Maintenance

ActivityMaintained
ResponsivenessOutdated data

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables self-hosted AI gateway and agent control plane with governed MCP tools, virtual-key budgets, caching, and audit, supporting OpenAI, Anthropic, Gemini, MCP, and A2A protocols. It provides deterministic prompt enhancement and governed execution with a zero-credential first run.
    10
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables users to discover and query multiple AI models, request second opinions or bulk completions, inspect balance and usage, manage referrals and wallet-based keys, and generate configuration for various coding tools.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP clients to browse a live catalog of 100+ models with pricing, rankings and measured uptime, check credits and spend, and send chat completions through an OAuth-authenticated, per-connection key capped by a spend limit. Read tools are free, and paid calls are priced and approved before any credit is used.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI clients to discover, inspect, and run 2,000+ AI models and data APIs—including LLMs, image, video, and audio generation—through a single authenticated local bridge with per-call pricing shown before execution. It also supports run status tracking, account balance checks, and rollback from one browser sign-in.
    556,724 npm
    MIT