OpenRouter MCP Server
for AI Agents
Connect your AI agent to StackOne's OpenRouter MCP server and give it 170 MCP tools out of the box. Auth, tool execution, and security all managed.
Coverage
170 Agent Actions
Agents can read, write, delete and run operations in OpenRouter. Extend your agent's capabilities with custom actions.
Authentication
Agent Tool Authentication
Per-user OAuth in one call. Your OpenRouter MCP server gets session-scoped tokens with zero credentials stored on your infra.
Agent Auth →Security
Agent Protection
Every OpenRouter tool response scanned for prompt injection in about 2.5 ms, with 0.94 F1 on tool-response attacks, all running on a CPU.
Prompt Injection Defense →Performance
Max Agent Context. Min Cost.
Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every OpenRouter call.
Tools Discovery →What is the OpenRouter MCP Server?
A OpenRouter MCP server lets AI agents read and write OpenRouter data through the Model Context Protocol, Anthropic's open standard for connecting LLMs to external tools. StackOne's OpenRouter MCP server ships with 170 pre-built actions, fully extensible via the Connector Builder, plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.
All OpenRouter MCP Tools
Every StackOne action for OpenRouter, ready for your agent. Read, write, delete and run operations, scoped to exactly what you need.
BYOK Credentials
- Create BYOK Credential
Add a provider API key to OpenRouter as a bring-your-own-key credential.
- List BYOK Credentials
List the bring-your-own-key provider credentials of an OpenRouter workspace.
- Get BYOK Credential
Get one bring-your-own-key provider credential from OpenRouter.
- Update BYOK Credential
Change or rotate a bring-your-own-key provider credential in OpenRouter.
- Delete BYOK Credential
Delete a bring-your-own-key provider credential from OpenRouter.
Container Files
- List Container Files
List the files in an OpenRouter tool container.
- Get Container File
Get the details of one file in an OpenRouter tool container.
External Users
- Create External User
Register an external user tracking id in the OpenRouter organization.
- List External Users
List the external user tracking ids registered in the OpenRouter organization.
- Get External User
Get one external user registration from the OpenRouter organization.
- Update External User
Activate or deactivate an external user registration in OpenRouter.
Files
- List Files
List the files stored in the OpenRouter workspace of the API key.
- Delete File
Delete one file from the OpenRouter workspace.
Workspace-Wide Policys
- Create Workspace-Wide Policy
Create a workspace-wide budget, moderation or model availability policy in OpenRouter.
- Update Workspace-Wide Policy
Replace a workspace-wide guardrail policy and the workspaces it covers in OpenRouter.
- Delete Workspace-Wide Policy
Delete a workspace-wide guardrail policy from OpenRouter.
Budget Policys
- Create Budget Policy
Create a budget policy in an OpenRouter workspace.
- Get Budget Policy
Get one budget policy of an OpenRouter workspace with its member and API key assignments.
- Update Budget Policy
Replace the name, settings and optionally the assignments of a budget policy in OpenRouter.
- Delete Budget Policy
Delete a budget policy from an OpenRouter workspace.
Moderation Policys
- Create Moderation Policy
Create a moderation policy in an OpenRouter workspace.
- Get Moderation Policy
Get one moderation policy of an OpenRouter workspace with its member and API key assignments.
- Update Moderation Policy
Replace the name, settings and optionally the assignments of a moderation policy in OpenRouter.
- Delete Moderation Policy
Delete a moderation policy from an OpenRouter workspace.
Model Availability Policys
- Create Model Availability Policy
Create a model availability policy in an OpenRouter workspace.
- Get Model Availability Policy
Get one model availability policy of an OpenRouter workspace with its member and API key assignments.
- Update Model Availability Policy
Replace the name, settings and optionally the assignments of a model availability policy in OpenRouter.
- Delete Model Availability Policy
Delete a model availability policy from an OpenRouter workspace.
Guardrails
- Create Guardrail
Create a guardrail with spending, model, provider and data rules in OpenRouter.
- List Guardrails
List the guardrails of an OpenRouter workspace.
- Get Guardrail
Get one OpenRouter guardrail with its rules.
- Update Guardrail
Change the rules of an OpenRouter guardrail.
- Delete Guardrail
Delete a guardrail from OpenRouter.
Unified Groups
- List Unified Groups
List unified groups (workspaces) in an OpenRouter organization.
- Get Unified Group
Get a unified OpenRouter group (workspace) by ID.
Unified Roles
- List Unified Roles
List unified roles in OpenRouter.
- Get Unified Role
Get a unified OpenRouter role by ID.
Unified Users
- List Unified Users
List unified users in an OpenRouter organization.
- Get Unified User
Get a unified OpenRouter user by ID.
Keys
- Create Key
Create an OpenRouter API key.
- List Keys
List the API keys of an OpenRouter workspace.
- Get Key
Get one OpenRouter API key by hash.
- Update Key
Update an OpenRouter API key.
- Delete Key
Delete an OpenRouter API key.
Models
- List Models
List the models available on OpenRouter, with filters and sorting.
- Get Model
Get one OpenRouter model by its author and slug.
Observability Destinations
- Create Observability Destination
Add a destination that OpenRouter forwards request traces to, such as Langfuse, Datadog or S3.
- List Observability Destinations
List the observability destinations an OpenRouter workspace forwards traces to.
- Get Observability Destination
Get one OpenRouter observability destination.
- Update Observability Destination
Change the settings of an OpenRouter observability destination.
- Delete Observability Destination
Delete an OpenRouter observability destination.
Organization Settings
- Get Organization Settings
Get the settings of the OpenRouter organization.
- Update Organization Settings
Update the settings of the OpenRouter organization.
Presets
- List Presets
List the presets of an OpenRouter workspace, most recently updated first.
- Get Preset
Get one OpenRouter preset with its current configuration.
- Delete Preset
Archive an OpenRouter preset so it no longer resolves for inference.
Preset Versions
- List Preset Versions
List every version of an OpenRouter preset, oldest first.
- Get Preset Version
Get one version of an OpenRouter preset by its number.
Private Endpoints
- Create Private Endpoint
Register your own model deployment as a private OpenRouter endpoint.
- List Private Endpoints
List the private endpoints of the OpenRouter organization, drafts included.
- Get Private Endpoint
Get one OpenRouter private endpoint with its upstream settings and pricing.
- Update Private Endpoint
Change the pricing, settings or upstream of an OpenRouter private endpoint.
- Delete Private Endpoint
Delete an OpenRouter private endpoint and stop routing to it.
Private Providers
- Create Private Provider
Add a private bring-your-own-key provider that only your OpenRouter organization sees.
- List Private Providers
List the private bring-your-own-key providers of the OpenRouter organization.
- Get Private Provider
Get one private provider of the OpenRouter organization.
- Update Private Provider
Change the display name or base URL of an OpenRouter private provider.
- Delete Private Provider
Delete an OpenRouter private provider.
SCIM Group Mappings
- Create SCIM Group Mapping
Map a SCIM group to a role in an OpenRouter workspace.
- List SCIM Group Mappings
List the mappings from SCIM groups to OpenRouter workspace roles.
- Get SCIM Group Mapping
Get one mapping from a SCIM group to an OpenRouter workspace role.
- Update SCIM Group Mapping
Change the workspace role a SCIM group mapping grants.
- Delete SCIM Group Mapping
Delete a mapping from a SCIM group to an OpenRouter workspace role.
SCIM Sync Jobs
- Create SCIM Sync Job
Start a SCIM directory sync in OpenRouter.
- Get SCIM Sync Job
Get the status of an OpenRouter SCIM directory sync.
Server Tools
- List Server Tools
List the server tools OpenRouter can run for a model, such as web search.
- Get Server Tool
Get one OpenRouter server tool with the models that run it natively.
Workspace Secrets
- List Workspace Secrets
List the vault secrets of the API key's OpenRouter workspace, without their values.
- Delete Workspace Secret
Delete a secret from the API key's OpenRouter workspace vault.
Intern Secrets
- List Intern Secrets
List the vault secrets stored for one OpenRouter intern, without their values.
- Delete Intern Secret
Delete a secret stored for one OpenRouter intern.
Workspaces
- Create Workspace
Create an OpenRouter workspace.
- List Workspaces
List the workspaces of the OpenRouter organization.
- Get Workspace
Get one OpenRouter workspace by id or slug.
- Update Workspace
Update an OpenRouter workspace.
- Delete Workspace
Delete an OpenRouter workspace.
Workspace Budgets
- List Workspace Budgets
List the spending budgets of an OpenRouter workspace.
- Get Workspace Budget
Get the budget of an OpenRouter workspace for one interval.
- Delete Workspace Budget
Remove the budget of an OpenRouter workspace for one interval.
Other (81)
- Create Decision
Ask an OpenRouter Decisions model typed questions about some content.
- Create Extraction
Extract typed fields from text and images with an OpenRouter Extractions model.
- Create Batch
Submit a batch of model requests that OpenRouter runs asynchronously.
- Create Chat Completion
Send a conversation to a model through OpenRouter and get the reply.
- Create Embeddings
Turn text or other input into embedding vectors with an OpenRouter embeddings model.
- Create Images
Generate images from a text prompt with an OpenRouter image model.
- Create Message
Send a conversation to a model in the Anthropic Messages format through OpenRouter.
- Create Preset From Chat Completions Request
Save a preset, or a new preset version, from a chat completions request body.
- Create Preset From Messages Request
Save a preset, or a new preset version, from an Anthropic Messages request body.
- Create Preset From Responses Request
Save a preset, or a new preset version, from a Responses API request body.
- Create Response
Send input to a model in the OpenAI Responses format through OpenRouter.
- Create System One Request
Ask a System One model such as Jev typed questions about some content.
- Create Transcription
Transcribe audio into text with an OpenRouter speech-to-text model.
- Copy Workspace Secrets To Intern
Copy named workspace vault secrets to one OpenRouter intern without sending their values.
- Create Video
Start an OpenRouter video generation job from a prompt or images.
- Get User Activity
Get OpenRouter usage for the last 30 days, grouped by date, model and endpoint.
- Get Analytics Meta
List the metrics, dimensions, filter operators and time granularities the analytics query accepts.
- Query Analytics
Run an OpenRouter analytics query over requests, tokens and spend.
- List Batches
List the batches of the OpenRouter workspace, newest first.
- Get Batch
Get one OpenRouter batch with its status, counts and results.
- List Benchmarks
List model benchmark scores from Artificial Analysis, Design Arena and OpenRouter.
- Get Task Classifications
Get the share of OpenRouter traffic by task type, such as code generation or summarization.
- Get Credits
Get the credits purchased and used on the OpenRouter account.
- Get Credit Purchase
Get the status of an OpenRouter agent credit purchase.
- Get App Rankings
Get the top public apps on OpenRouter ranked by token usage.
- Get Daily Model Rankings
Get daily token totals for the top 50 public models on OpenRouter.
- Get Session Costs
Get the median cost per session by coding harness and model on OpenRouter.
- List Embeddings Models
List the embeddings models available on OpenRouter.
- List ZDR Endpoints
List the model endpoints that stay available when zero data retention is enforced.
- List Model Endpoints
List the provider endpoints that serve one OpenRouter model.
- Get File Metadata
Get the metadata of one file in the OpenRouter workspace.
- Get Generation
Get the request, cost and token metadata of one OpenRouter generation.
- Get Generation Content
Get the stored prompt, completion and error of one OpenRouter generation.
- List Workspace-Wide Policies
List the workspace-wide guardrail policies that apply across the workspaces of the OpenRouter account.
- Get API Key Policy Assignment
Get the guardrail policies of one type that apply to an API key in an OpenRouter workspace.
- Get Member Policy Assignment
Get the guardrail policies of one type that apply to a member in an OpenRouter workspace.
- List Budget Policies
List the budget policies of an OpenRouter workspace.
- List Moderation Policies
List the moderation policies of an OpenRouter workspace.
- List Model Availability Policies
List the model availability policies of an OpenRouter workspace.
- List Key Assignments
List which API keys each OpenRouter guardrail is assigned to.
- List Member Assignments
List which organization members each OpenRouter guardrail is assigned to.
- List Guardrail Key Assignments
List the API keys one OpenRouter guardrail is assigned to.
- List Guardrail Member Assignments
List the organization members one OpenRouter guardrail is assigned to.
- Get Unified Credentials
Get the current OpenRouter connection's unified credentials and identity.
- List Unified Resource Types
List unified resource types in OpenRouter.
- List Unified Resource Users
List unified resource users for an OpenRouter workspace.
- List Image Models
List the image generation models available on OpenRouter.
- List Image Model Endpoints
List the provider endpoints that serve one OpenRouter image model.
- Get Current Key
Get the OpenRouter key the connection uses, with its usage, limits and budgets.
- Get Model Count
Count the models available on OpenRouter.
- List Models For User
List the OpenRouter models the API key can use under its provider preferences, privacy settings and guardrails.
- List OAuth Signing Keys
Get the public keys OpenRouter signs its access tokens with.
- List Organization Members
List the members of the OpenRouter organization.
- List Providers
List the model providers OpenRouter routes to, with their policies and data centers.
- List SCIM Groups
List the SCIM groups your identity provider pushed to OpenRouter.
- List Secrets An Intern Receives
List, one per name, the vault secret each of an OpenRouter intern's outbound requests receives.
- List Intern Connections
List the connections, such as GitHub, Slack or an MCP server, that one OpenRouter intern can use.
- Get Video Job
Get the status of an OpenRouter video generation job, with its output links once done.
- List Video Models
List the video generation models available on OpenRouter, with their supported settings.
- List Workspace Members
List the members of an OpenRouter workspace with their workspace role.
- Delete Batch
Delete an ended OpenRouter batch with its stored requests and results.
- Promote Container File
Copy a container file into the workspace documents so it outlives the container.
- Deactivate External User
Deactivate an external user registration in OpenRouter, keeping its tracking id.
- Submit Generation Feedback
Report a problem with one of your OpenRouter generations, such as latency or a wrong answer.
- Change API Key Policy Assignment
Assign or unassign one guardrail policy for an API key in OpenRouter.
- Change Member Policy Assignment
Assign or unassign one guardrail policy for a member in OpenRouter.
- Bulk Assign Keys To Guardrail
Assign API keys to an OpenRouter guardrail.
- Bulk Unassign Keys From Guardrail
Remove API keys from an OpenRouter guardrail.
- Bulk Assign Members To Guardrail
Assign organization members to an OpenRouter guardrail.
- Bulk Unassign Members From Guardrail
Remove organization members from an OpenRouter guardrail.
- Restore Preset
Bring back an archived OpenRouter preset.
- Validate Private Endpoint
Send a live test request to a draft OpenRouter private endpoint.
- Activate Private Endpoint
Make a validated draft OpenRouter private endpoint routable.
- Disable Private Endpoint
Stop routing to an active OpenRouter private endpoint without deleting it.
- Enable Private Endpoint
Resume routing to a disabled OpenRouter private endpoint.
- Rerank Documents
Rank documents by relevance to a query with an OpenRouter rerank model.
- Store Workspace Secret
Create or replace a host-bound secret in the API key's OpenRouter workspace vault.
- Store Intern Secret
Create or replace a host-bound secret for one OpenRouter intern.
- Bulk Add Workspace Members
Add organization members to an OpenRouter workspace.
- Bulk Remove Workspace Members
Remove members from an OpenRouter workspace.
- Upsert Workspace Budget
Create or change the budget of an OpenRouter workspace for one interval.
Set Up Your OpenRouter MCP Server in Minutes
One endpoint. Any framework. Your agent is talking to OpenRouter in under 10 lines of code.
Agent Frameworks
{
"mcpServers": {
"stackone": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://api.stackone.com/mcp?x-account-id=<account_id>",
"--header",
"Authorization: Basic <YOUR_BASE64_TOKEN>"
]
}
}
}OpenRouter Resources
AI Gateway Valuation: Why Stripe Paid $7B+ for OpenRouter
Stripe agreed to pay $7B+ for OpenRouter, an AI gateway that only meters tokens and switches providers. What that valuation means for your agent architecture.
5 min
Comparing BM25, TF-IDF, and Hybrid Search for MCP Tool Discovery
Benchmarking BM25, TF-IDF, and hybrid search for MCP tool discovery across 916 tools. The 80/20 TF-IDF/BM25 hybrid hits 21% Top-1 accuracy in under 1ms.
10 min
Indirect Prompt Injection Defense for MCP Tools: A Technical Guide
MCP tools that read emails, CRM records, and tickets are indirect prompt injection vectors. Here's how we built a two-tier defense that scans tool results in ~11ms.
12 min
MCP vs A2A: Architecture, Security, and When to Use Each
MCP vs A2A: what each protocol standardizes, how they differ, the security risks they share, and when to use one, both or a hybrid.
12 min
MCP vs API: What Hundreds of Connector Builds Taught Us
MCP wraps APIs, it doesn't replace them. After building hundreds of connectors that serve both, here's when each approach wins.
14 min read
FAQ
OpenRouter MCP Server FAQ
origin_owner_id.