原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Openrouter Admin

作者:oviron版本 0.7.3i★ –i在你的电脑上运行
注册名称io.github.oviron/openrouter-admin

安装

概览

作者提供的说明(英文原文)

MCP server for OpenRouter management API: credits, key CRUD, activity drill-down, dashboard.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 其他
  • 你需要填写:OPENROUTER_PROVISIONING_KEY

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: OPENROUTER_PROVISIONING_KEY, OPENROUTER_ADMIN_ALLOW_WRITE

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "openrouter-admin": {
      "command": "npx",
      "args": [
        "-y",
        "openrouter-admin-mcp"
      ],
      "env": {
        "OPENROUTER_PROVISIONING_KEY": "your-value",
        "OPENROUTER_ADMIN_ALLOW_WRITE": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add openrouter-admin --env OPENROUTER_PROVISIONING_KEY=your-value --env OPENROUTER_ADMIN_ALLOW_WRITE=your-value -- npx -y openrouter-admin-mcp

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "openrouter-admin": {
      "command": "npx",
      "args": [
        "-y",
        "openrouter-admin-mcp"
      ],
      "env": {
        "OPENROUTER_PROVISIONING_KEY": "your-value",
        "OPENROUTER_ADMIN_ALLOW_WRITE": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "openrouter-admin": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "openrouter-admin-mcp"
      ],
      "env": {
        "OPENROUTER_PROVISIONING_KEY": "your-value",
        "OPENROUTER_ADMIN_ALLOW_WRITE": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • OPENROUTER_PROVISIONING_KEY 机密 必填 env
    OpenRouter Provisioning API key — create at https://openrouter.ai/settings/provisioning. Distinct from inference keys: it can manage your account but cannot make completion calls.
  • OPENROUTER_ADMIN_ALLOW_WRITE env
    Set to '1' to enable destructive write tools (or_key_create, or_key_update, or_key_delete). Disabled by default — read-only tools (or_overview, or_credits, or_keys_list, or_key_get, or_activity, or_c…

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 oviron 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 32623 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 32623 个服务器的 7% 更新
  • 基础检查结果等于或优于此分类中其他 32623 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Openrouter Admin 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:OPENROUTER_PROVISIONING_KEY

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.7.3)于6个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Spec Driven Development, Remote Desktop Commander, Draugr

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Spec Driven Development

作者:formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

在你的电脑上运行★ 440MIT14个月前更新
安装

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

在云端运行★ 211前天更新
安装

Draugr

作者:draugr-dev

Security scanning for AI agents: SAST, SCA, secrets, IaC, DAST, ranked by real risk.

在你的电脑上运行今天更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

openrouter-admin-mcp

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) and expires_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, or by_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

Replace the placeholder sk-or-v1-... with your real key after install.

Manual

Run via npx (no install needed) or install globally:

npx -y openrouter-admin-mcp

or

npm install -g openrouter-admin-mcp

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):

{

"mcpServers": { "openrouter-admin": { "command": "npx", "args": ["-y", "openrouter-admin-mcp"], "env": { "OPENROUTER_PROVISIONING_KEY": "sk-or-v1-..." } } } }

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:

"env": {

"OPENROUTER_PROVISIONING_KEY": "sk-or-v1-...", "OPENROUTER_ADMIN_ALLOW_WRITE": "1" }

The server logs which mode it started in:

openrouter-admin-mcp running on stdio (write tools: ENABLED)

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)
ToolPurpose
or_overviewOne-shot dashboard: credits + active keys + today's burn by model.
or_creditsAccount balance: total purchased, total used, remaining.
or_current_keyMetadata of the Provisioning key the server is using.
or_keys_listAll inference keys with usage, limits, reset cadence, expiration.
or_key_getDetailed view of one key by hash.
or_activityUsage for the last 30 UTC days. Filters: date, api_key_hash, user_id. Aggregations: none, by_model, by_day, by_provider, by_key.
or_generationFetch a single inference call by its gen-… id (cost, tokens, latency, finish reason).
or_modelsModel catalog with per-1M pricing, context length, modalities. Filterable.
or_model_getFull details for one model id.
or_model_endpointsPer-provider endpoints for a model: pricing, uptime, status.
or_models_userModels filtered by your account's privacy/guardrail settings.
or_zdr_endpointsZDR-compliant endpoints for privacy-constrained workflows.
or_guardrails_listAll guardrails: limit_usd, reset, allow/block lists, ZDR.
or_guardrail_getFull details for one guardrail.
or_guardrails_assignmentsComposite — which keys/members are bound to which guardrail.
or_org_membersMembers of the OpenRouter organization (Management-key + org account).
Write (opt-in via OPENROUTER_ADMIN_ALLOW_WRITE=1)
ToolPurpose
or_key_createCreate a new inference key. Returns the one-time secret.
or_key_updateUpdate name / disabled / limit / limit_reset / expires_at.
or_key_deletePermanently delete a key.
or_guardrail_createCreate a guardrail.
or_guardrail_updateUpdate a guardrail.
or_guardrail_deleteDelete a guardrail.
or_guardrail_assign_keys / _unassign_keysBulk-(un)assign a guardrail to inference keys.
or_guardrail_assign_members / _unassign_membersBulk-(un)assign a guardrail to org members.
Example — create a daily-capped temporary key
> Create a key called "scratch" with a $0.50 daily limit that expires in 30 days.

[Claude calls or_key_create with: name="scratch", limit=0.50, limit_reset="daily", expires_at="2026-05-25T00:00:00Z"]

Created key scratch Hash: f7a3... Limit: $0.5 (resets daily) Expires: 2026-05-25T00:00:00Z

Secret: sk-or-v1-... ⚠️ This secret cannot be retrieved later — store it now.

Example — diagnose a cost spike
> Why did my OpenRouter spend jump yesterday?

[Claude calls or_activity with date="2026-04-24", aggregate="by_model"]

Activity: 47 rows | total $0.8570 | 305 req By model (top 5):

  • xiaomi/mimo-v2-flash $0.5240 | 178 req | 24 rows
  • anthropic/claude-haiku-4.5 $0.2105 | 39 req | 5 rows
  • ...
Example — bind a key to an account-wide guardrail
> Cap our prod-bot key at the daily-$50 guardrail.

[Claude calls or_guardrails_list, finds gr_prod_daily_50, then or_guardrail_assign_keys with id="gr_prod_daily_50", hashes=["…"]]

Assigned guardrail gr_prod_daily_50 to 1 key(s).

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_KEY environment variable and forwarded only to https://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

git clone https://github.com/oviron/openrouter-admin-mcp.git

cd openrouter-admin-mcp npm install npm run build # compile TypeScript + chmod +x build/index.js npm test # vitest, 84 unit tests, mocked fetch

Project layout:

src/

client.ts # OpenRouterClient — fetch wrapper, retry, in-session cache index.ts # MCP server entry — registers tool groups tools/ credits.ts # or_credits, or_current_key keys.ts # or_keys_list, _get, _create, _update, _delete activity.ts # or_activity (5 modes incl. by_key) overview.ts # or_overview composite generation.ts # or_generation models.ts # or_models, _model_get, _model_endpoints, _models_user, _zdr_endpoints guardrails.ts # or_guardrails_list/_get/CRUD/bulk-assign + composite assignments organization.ts # or_org_members test/ client.test.ts, credits.test.ts, keys.test.ts, activity.test.ts, overview.test.ts, generation.test.ts, models.test.ts, guardrails.test.ts, organization.test.ts, registration.test.ts, helpers.ts, smoke.test.ts

License

MIT — see LICENSE.

问 PopNx