OpenRouter MCP by usefulapi
Read account credits, keys, guardrails and usage, and browse the model catalog in OpenRouter.
使うべきか
品質と安全性
検出事項(4)
- LOWopenrouter_get_generation_content 内
- LOWopenrouter_list_models_for_account 内
- LOWopenrouter_list_model_endpoints 内
- LOWopenrouter_list_embedding_models 内
ツール定義とプロトコルへの準拠に関する自動分析に基づいています。
コンテキストコスト
これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。
インストール
ワンクリックインストール
これを `claude_desktop_config.json` ファイルに追加してください:
{
"mcpServers": {
"openrouter": {
"url": "https://openrouter.usefulapi.io/mcp"
}
}
}リモートエンドポイント
https://openrouter.usefulapi.io/mcpstreamable-httpできること
ツール一覧
ツール(16)
🟢openrouter_get_current_key
Get the API key this connection uses: its label, spend and remaining limit, budgets, expiry, free-tier status and data regions. A good first call to check the connection. OpenRouter API: GET /key.
入力スキーマ
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_get_credits
Get the account's total credits purchased and used. Needs a MANAGEMENT key (a normal API key gets HTTP 401 or 403). OpenRouter API: GET /credits.
入力スキーマ
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_get_activity(date, api_key_hash, user_id, group_by, workspace_id)
Get account activity grouped by endpoint for the last 30 completed UTC days: requests, tokens and spend. May need a MANAGEMENT key (HTTP 401 or 403 otherwise). OpenRouter API: GET /activity.
入力スキーマ
{
"type": "object",
"properties": {
"date": {
"description": "One UTC day, yyyy-mm-dd (default: the last 30 days).",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"api_key_hash": {
"description": "Only activity of this API key hash.",
"type": "string"
},
"user_id": {
"description": "Only activity of this user id.",
"type": "string"
},
"group_by": {
"description": "Use 'workspace' to split each row per workspace.",
"type": "string"
},
"workspace_id": {
"description": "Scope the result to one workspace id.",
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_list_keys(include_disabled, include_expired, offset, workspace_id)
List the API keys on the account, with usage and limits. Needs a MANAGEMENT key (a normal API key gets HTTP 401 or 403). OpenRouter API: GET /keys.
入力スキーマ
{
"type": "object",
"properties": {
"include_disabled": {
"description": "Include disabled keys.",
"type": "boolean"
},
"include_expired": {
"description": "Include expired keys.",
"type": "boolean"
},
"offset": {
"description": "Number of items to skip.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"workspace_id": {
"description": "Scope the result to one workspace id.",
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_get_key(hash)
Get one API key by its hash (from openrouter_list_keys): usage, limit, expiry and budgets. Needs a MANAGEMENT key. OpenRouter API: GET /keys/{hash}.
入力スキーマ
{
"type": "object",
"properties": {
"hash": {
"type": "string",
"description": "The API key hash (from openrouter_list_keys)."
}
},
"required": [
"hash"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_list_guardrails(offset, limit, workspace_id)
List the guardrails (spend and provider rules for keys and members). Needs a MANAGEMENT key. OpenRouter API: GET /guardrails.
入力スキーマ
{
"type": "object",
"properties": {
"offset": {
"description": "Number of items to skip.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Maximum number of items to return.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 1000
},
"workspace_id": {
"description": "Scope the result to one workspace id.",
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_get_guardrail(guardrail_id)
Get one guardrail by id (from openrouter_list_guardrails). Needs a MANAGEMENT key. OpenRouter API: GET /guardrails/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"guardrail_id": {
"type": "string",
"description": "The guardrail UUID (from openrouter_list_guardrails)."
}
},
"required": [
"guardrail_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_get_generation(generation_id)
Get the request and usage metadata of one past generation: model, provider, tokens, cost and latency. The id comes from the response of an earlier call (x-generation-id). OpenRouter API: GET /generation?id=.
入力スキーマ
{
"type": "object",
"properties": {
"generation_id": {
"type": "string",
"description": "The generation id, for example gen-...."
}
},
"required": [
"generation_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_get_generation_content(generation_id)
Get the stored prompt, completion and error text of one past generation. Only works when the account stored that content (logging on). OpenRouter API: GET /generation/content?id=.
入力スキーマ
{
"type": "object",
"properties": {
"generation_id": {
"type": "string",
"description": "The generation id, for example gen-...."
}
},
"required": [
"generation_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_list_models(q, output_modalities, input_modalities, supported_parameters, sort, ...)
List the models OpenRouter offers: context length, prices per token, supported parameters and modalities. Filter with q, modalities or supported parameters. OpenRouter API: GET /models.
入力スキーマ
{
"type": "object",
"properties": {
"q": {
"description": "Search text in the model name or description.",
"type": "string"
},
"output_modalities": {
"description": "Comma list, for example text or text,image.",
"type": "string"
},
"input_modalities": {
"description": "Comma list, for example text,image.",
"type": "string"
},
"supported_parameters": {
"description": "Comma list of parameters, for example tools.",
"type": "string"
},
"sort": {
"description": "Sort order the API accepts (for example price or context).",
"type": "string"
},
"offset": {
"description": "Number of items to skip.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Maximum number of items to return.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 1000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_list_models_for_account(output_modalities, sort, offset, limit)
List the models this API key may use, after the account's provider and privacy settings and guardrails. Text output models by default. OpenRouter API: GET /models/user.
入力スキーマ
{
"type": "object",
"properties": {
"output_modalities": {
"description": "Comma list, or all.",
"type": "string"
},
"sort": {
"description": "Sort order the API accepts.",
"type": "string"
},
"offset": {
"description": "Number of items to skip.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Maximum number of items to return.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 1000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_count_models(output_modalities)
Get the total number of models OpenRouter offers, optionally by output modality. OpenRouter API: GET /models/count.
入力スキーマ
{
"type": "object",
"properties": {
"output_modalities": {
"description": "Comma list, for example text.",
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_get_model(author, slug)
Get the full details of one model by its author and slug, for example openai and gpt-4o. Variant suffixes such as :free work. OpenRouter API: GET /model/{author}/{slug}.
入力スキーマ
{
"type": "object",
"properties": {
"author": {
"type": "string",
"description": "The model author, for example openai."
},
"slug": {
"type": "string",
"description": "The model slug, for example gpt-4o."
}
},
"required": [
"author",
"slug"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_list_model_endpoints(author, slug)
List the provider endpoints that serve one model, with each provider's price, context length, uptime and latency. OpenRouter API: GET /models/{author}/{slug}/endpoints.
入力スキーマ
{
"type": "object",
"properties": {
"author": {
"type": "string",
"description": "The model author, for example openai."
},
"slug": {
"type": "string",
"description": "The model slug, for example gpt-4o."
}
},
"required": [
"author",
"slug"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_list_providers
List the upstream model providers OpenRouter routes to (name, slug, data policy links). OpenRouter API: GET /providers.
入力スキーマ
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢openrouter_list_embedding_models(offset, limit)
List the embedding models OpenRouter offers with their properties. OpenRouter API: GET /embeddings/models.
入力スキーマ
{
"type": "object",
"properties": {
"offset": {
"description": "Number of items to skip.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Maximum number of items to return.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 1000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}コミュニティ
エビデンス