Skip to main content
Glama
userouter-mcp

userouter-mcp

Official
by userouter

Contents

Related MCP server: WarungCyber MCP Server

Overview

Userouter is an OpenAI-compatible inference API that puts Qwen, DeepSeek, GLM, Claude and hundreds of other models behind a single key. This server connects that API to your AI assistant over the Model Context Protocol, so the assistant can choose and call other models on its own.

Capability

What it gives your assistant

Model delegation

Send a long summary to a fast, low-cost model, or ask a second model to review a result.

Side-by-side comparison

Run the same prompt on several models and compare the answers in one conversation.

Cost awareness

Every reply reports its token count and exact USD cost; balance and usage are one call away.

Confidential inference

Fetch the signed enclave receipt for any tee/… response and verify where it ran.

Launchpad models

Discover community models launched on Userouter and call the live ones by their launch/… id.

Quick start

1. Create an API key at userouter.xyz/account. Keys start with sk-userouter-.

2. Add the server to Claude Code:

claude mcp add userouter -e USEROUTER_API_KEY=sk-userouter-... -- npx -y userouter-mcp

3. Ask your assistant:

"List the DeepSeek models on Userouter with their prices."

"Ask qwen/qwen3.8-flash and z-ai/glm-5.3-flash to explain this function, then compare the answers."

"Which launchpad models are live right now?"

"How much have I spent on Userouter today?"

No installation step is needed: npx downloads and runs the latest published version. Node.js 20 or later is required.

Client setup

Every client uses the same command, npx -y userouter-mcp, with your key in the USEROUTER_API_KEY environment variable.

claude mcp add userouter -e USEROUTER_API_KEY=sk-userouter-... -- npx -y userouter-mcp

Open Settings → Developer → Edit Config and add to claude_desktop_config.json:

{
  "mcpServers": {
    "userouter": {
      "command": "npx",
      "args": ["-y", "userouter-mcp"],
      "env": { "USEROUTER_API_KEY": "sk-userouter-..." }
    }
  }
}

Restart Claude Desktop after saving.

Add to ~/.cursor/mcp.json, or to .cursor/mcp.json for a single project:

{
  "mcpServers": {
    "userouter": {
      "command": "npx",
      "args": ["-y", "userouter-mcp"],
      "env": { "USEROUTER_API_KEY": "sk-userouter-..." }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "userouter": {
      "command": "npx",
      "args": ["-y", "userouter-mcp"],
      "env": { "USEROUTER_API_KEY": "sk-userouter-..." }
    }
  }
}

Add to .vscode/mcp.json:

{
  "servers": {
    "userouter": {
      "command": "npx",
      "args": ["-y", "userouter-mcp"],
      "env": { "USEROUTER_API_KEY": "sk-userouter-..." }
    }
  }
}

Any client that supports stdio servers works. Configure:

  • Command: npx

  • Arguments: -y userouter-mcp

  • Environment: USEROUTER_API_KEY=sk-userouter-...

Tools

Tool

Description

Key

list_models

Available models with context length, vision and tool support, and USD price per 1M tokens.

—

list_launches

Community models on the Userouter launchpad, with status, token and price.

—

chat

Run a prompt or a full conversation on any model; returns the reply, tokens and cost.

✓

get_balance

Credit balance and free daily allowance.

✓

get_usage

Most recent billed requests, newest first.

✓

get_tee_receipt

Signed enclave receipt for a confidential (tee/…) response.

✓

All tools except chat are read-only.

list_models

Parameter

Type

Description

search

string, optional

Case-insensitive match on model id or name, e.g. qwen or deepseek.

2 model(s):
- deepseek/deepseek-v4.1-flash (1049k ctx, vision, tools) $0.051 in / $0.567 out per 1M
- deepseek/deepseek-v4.1-flash:batch (1049k ctx, vision, tools) $0.050 in / $0.150 out per 1M

list_launches

Parameter

Type

Description

limit

integer, optional

Number of launches, 1–50. Default 20.

Statuses are bonding, graduated, live, paused and delisted. Live launches include the model id to pass to chat.

chat

Parameter

Type

Description

model

string

Model id from list_models or list_launches. Optional when USEROUTER_DEFAULT_MODEL is set.

prompt

string

A single user message.

system

string, optional

System prompt, used together with prompt.

messages

array, optional

A full conversation of { role, content } objects. Takes precedence over prompt.

max_tokens

integer, optional

Maximum tokens to generate.

temperature

number, optional

Sampling temperature, 0–2.

Pass either prompt or messages. The reply is followed by a footer such as:

model: qwen/qwen3.8-flash · tokens: 412 in / 96 out · cost: $0.000071

get_balance

No parameters. Returns the account balance in USD and the free daily allowance, when one applies.

get_usage

Parameter

Type

Description

limit

integer, optional

Number of requests, 1–100. Default 20.

get_tee_receipt

Parameter

Type

Description

id

string

Receipt id from the x-userouter-tee-receipt response header.

Configuration

Variable

Default

Description

USEROUTER_API_KEY

—

Your API key. Without it, only list_models and list_launches are available.

USEROUTER_DEFAULT_MODEL

—

Model used by chat when none is given, e.g. qwen/qwen3.8-flash.

USEROUTER_BASE_URL

https://api.userouter.xyz/api/v1

API endpoint. Must use https; plain http is accepted for localhost only.

USEROUTER_TIMEOUT_MS

120000

Per-request timeout in milliseconds, at least 1000.

Invalid configuration stops the server at startup with a message that says what to fix.

How it works

flowchart LR
    A["MCP client<br/>Claude · Cursor · VS Code"] -- "stdio (JSON-RPC)" --> B["userouter-mcp<br/>runs on your machine"]
    B -- "HTTPS + API key" --> C["api.userouter.xyz"]
    C --> D["400+ models<br/>ZDR · TEE · launchpad"]

The server is a thin, local translation layer. Your client starts it as a child process and talks to it over stdio; the server turns each tool call into a request to the Userouter API and returns a readable result.

Privacy and security

  • Your API key is sent only to USEROUTER_BASE_URL, over HTTPS, and is never logged or written to disk.

  • The server opens no network ports and keeps no state between calls.

  • Prompts and replies pass straight through; the server stores nothing.

  • Every input is validated before a request is made, and API errors return as readable tool errors instead of crashing the server.

See SECURITY.md to report a vulnerability.

Troubleshooting

Symptom

Fix

USEROUTER_API_KEY is not set

Add the key to the env block of your client config and restart the client.

USEROUTER_API_KEY must start with "sk-userouter-"

Copy the full key again from userouter.xyz/account.

HTTP 402 / insufficient balance

Top up your balance on userouter.xyz.

HTTP 429

The API allows 120 requests per minute per key. Wait a moment and retry.

The server does not appear in the client

Run npx -y userouter-mcp in a terminal to see startup errors, and check that Node.js is 20 or later.

Development

git clone https://github.com/userouter/userouter-mcp.git
cd userouter-mcp
npm install
npm test          # unit and protocol tests
npm run build     # compile to dist/

Try the tools interactively with the MCP Inspector:

npx @modelcontextprotocol/inspector node dist/index.js
src/
├── index.ts     # stdio entry point
├── server.ts    # MCP server setup
├── tools.ts     # tool definitions and input schemas
├── client.ts    # typed Userouter API client
├── config.ts    # environment parsing and validation
└── format.ts    # human-readable tool output

Contributing

Issues and pull requests are welcome. Please read CONTRIBUTING.md first, and open an issue to discuss anything larger than a small fix.

License

Released under the MIT License. © Userouter

Available Tools

6 tools
chatRun inference on UserouterA

Send a prompt to a model on Userouter and return its reply. Billed to the configured API key. Pass prompt for a single turn, or messages for a full conversation. Call list_models to pick a model id.

Inputs: model, prompt, system, messages, +2 more.

get_balanceUserouter balanceA
Read-only

Show the USD credit balance and the free daily allowance for the configured API key.

Inputs: no named parameters.

get_tee_receiptConfidential inference receiptA
Read-only

Fetch the signed TEE receipt for one of your confidential (tee/…) responses, to verify it ran inside the enclave.

Inputs: id (required).

get_usageUserouter usageA
Read-only

List the most recent requests billed to the configured API key, newest first, with model, tokens and cost.

Inputs: limit.

list_launchesUserouter launchpadA
Read-only

List models launched on the Userouter LLM launchpad: Hugging Face repo, status (bonding, graduated, live, paused, delisted), token address and price. Live launches can be passed to chat by their launch/… model id.

Inputs: limit.

list_modelsList Userouter modelsA
Read-only

List models available on Userouter with context length and USD price per 1M tokens. Use search to filter by id or name.

Inputs: search.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 6 tools

    Disambiguation4/5

    Most tools are cleanly separated by resource: chat, balance, usage, TEE receipts, model catalog, launchpad catalog. The only mild overlap is between list_models and list_launches, both 'list' operations over catalogs, though the descriptions (context length/pricing vs Hugging Face repo/bonding status/token address) make the boundary clear enough.

    Naming Consistency4/5

    Five of six tools follow a clean verb_noun snake_case pattern (list_models, get_balance, get_usage, get_tee_receipt, list_launches). The single bare verb `chat` is the only deviation, but it's a natural and unambiguous name for the primary action.

    Tool Count5/5

    Six tools is tightly scoped to the domain: catalog discovery, inference, billing visibility, verification, and launchpad access. Each tool maps to a distinct capability with no filler.

    Completeness4/5

    Core workflow is fully covered: discover models/launches, chat with either, check balance and usage, and verify confidential responses via TEE receipt. Minor gaps exist around key/account management and single-model detail lookup, but agents can work around these via list_models with search.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Connects Claude Desktop, Cursor, or any MCP-compatible client to 36+ frontier LLMs with automatic per-token payments in USDC on Solana.
      5
      MIT
    • A
      license
      Not graded
      quality
      C
      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
      A
      quality
      B
      maintenance
      Connects MCP clients such as Claude Desktop, Cursor and Claude Code to an OpenAI- and Anthropic-compatible AI gateway, enabling chat with Claude, GPT, Gemini, Grok and Kimi models, listing available models, and looking up per-million-token pricing. It also sends one prompt to several models in parallel and returns each answer with token usage, latency and estimated cost.
      4
      MIT