
Openrouter Admin
io.github.ovironPublished by GitHub account ovironv0.7.3Updated Oct 24, 2026
MCP server for OpenRouter management API: credits, key CRUD, activity drill-down, dashboard.
Overview
An MCP server that lets an assistant inspect and, when enabled, manage an OpenRouter account: credits, inference keys, guardrails, usage and model pricing.
- What you can do
- Read account credits, the current provisioning key, and all inference keys with limits and expiry, plus a one-shot overview dashboard of credits, active keys and today's burn by model. Drill into usage over the last 30 days with filters and aggregation by model, day, provider or key, and look up a single generation by its id. Browse the model catalog, per-model details, per-provider endpoints with pricing and uptime, and ZDR-compliant endpoints. List guardrails, their details and key/member assignments, and list organization members. When write tools are enabled, create, update and delete inference keys and guardrails, and bulk-assign or unassign guardrails to keys and members.
- When to use it
- Useful when you want to check OpenRouter spend, find which keys or models burned credits, compare model pricing and endpoints, or manage keys and spending guardrails from a chat client instead of the web dashboard.
- Requirements
- Runs locally over stdio via npx or a global npm install (Node.js required). Needs an OpenRouter Provisioning API key in the OPENROUTER_PROVISIONING_KEY environment variable; this key is distinct from inference keys. Write tools additionally require OPENROUTER_ADMIN_ALLOW_WRITE set to 1. Network access to the OpenRouter API over HTTPS.
Installation
In SourceWeft
- Open Openrouter Admin in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
openrouter-admin-mcp
[npm version] [npm downloads] [CI] [MCP Registry] [Node] [License: MIT]
MCP server for the OpenRouter management API — programmatic control of credits, inference keys, guardrails, organization members, and usage analytics from inside Claude Code, Claude Desktop, Cursor, or any MCP-compatible client.
Read-only by default. Destructive write operations are gated behind an opt-in env flag.
This is not an inference proxy. It uses an OpenRouter Provisioning API key, which can manage your account but cannot make completion calls.
Why
OpenRouter's UI is solid for one-off tweaks, but checking spend across keys, drilling into per-model/per-day usage, configuring account-wide guardrails, or rotating limits requires a lot of clicking. This server exposes those operations as MCP tools — Claude can answer "what burned my credits this week?", "create a temporary key with a $0.30 daily cap", or "bind the new prod key to our daily-$50 guardrail" in a single turn.
Features
26 tools wrapping the OpenRouter management API:
or_overview— one-shot dashboard: credits + active keys (with reset/expiration) + today's UTC burn by model.- Inference key CRUD including
limit_reset(daily/weekly/monthly) andexpires_at. - Guardrails CRUD — account-wide spending limits with provider/model allowlists, ZDR enforcement. Bulk-assign to keys or org members.
- Activity drill-down — aggregate
by_model,by_day,by_provider, orby_key. Token-level breakdown (prompt / completion / reasoning) per row. - Generation lookup — fetch any single inference call by
gen-…id (cost, tokens, latency, finish reason). - Model & endpoint discovery — current pricing per 1M tokens, per-provider uptime, ZDR-compliant endpoints.
Plumbing: HTTP retry on 429/5xx with Retry-After support, in-session GET cache, write invalidation. Returns raw fields — interpretation is left to the agent.
Install
One-click
[Install in VS Code] [Install in Cursor]
Replace the placeholder
sk-or-v1-...with your real key after install.
Manual
Run via npx (no install needed) or install globally:
Configuration
Create a Provisioning key at https://openrouter.ai/settings/provisioning, then add the server to your MCP client config.
Claude Code (~/.claude.json) or Claude Desktop (claude_desktop_config.json):
Restart your client to load the server. By default this gives read-only access — to enable key creation, mutation, and deletion, see Enabling write tools below.
Enabling write tools
Destructive operations (or_key_create, or_key_update, or_key_delete) are disabled by default to prevent accidental key mutation through prompt-injected tool calls. Add OPENROUTER_ADMIN_ALLOW_WRITE to your env block to enable them:
The server logs which mode it started in:
Read tools (or_overview, or_credits, or_current_key, or_keys_list, or_key_get, or_activity) are always available regardless of this flag.
Tools
Read (always available)
Write (opt-in via OPENROUTER_ADMIN_ALLOW_WRITE=1)
Example — create a daily-capped temporary key
Example — diagnose a cost spike
Example — bind a key to an account-wide guardrail
Design
The server returns raw API fields. It does not flag what's "near limit", what's an "anomaly", or what the agent should do — that's the agent's job. Composite tools (or_overview, or_guardrails_assignments) merge multiple endpoints into one workflow response, but they don't interpret. Rationale: production MCP servers (Stripe, GitHub, Linear) follow the same pattern.
Data handling
- The Provisioning key is read from the
OPENROUTER_PROVISIONING_KEYenvironment variable and forwarded only tohttps://openrouter.ai/api/v1/*over HTTPS. - The server is stateless across restarts. An in-session GET cache (60s TTL on
/credits,/key,/keys,/keys/{hash}) is held in memory only and dropped on shutdown. - The key never appears in error messages or tool output (verified by tests).
Development
Project layout:
License
MIT — see LICENSE.
Source: README.md at commit 66e660a
Tools
0Version history
1- v0.7.3LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts