Atlas / MCP servers / heltonteixeira / OpenRouterai

OpenRouteraiSAFE

mcp/heltonteixeira/openrouterai

MCP server for OpenRouter.ai integration

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
4 4r · 0w · 0d
Transport
stdio
License
Apache-2.0
Stars
64
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](https://github.com/heltonteixeira/openrouterai) [](CHANGELOG.md) [](https://www.typescriptlang.org/) [](LICENSE)

A Model Context Protocol (MCP) server providing seamless integration with OpenRouter.ai's diverse model ecosystem. Access various AI models through a unified, type-safe interface with built-in caching, rate limiting, and error handling.

Features

  • Model Access
  • Direct access to all OpenRouter.ai models
  • Automatic model validation and capability checking
  • Default model configuration support
  • Performance Optimization
  • Smart model information caching (1-hour expiry)
  • Automatic rate limit management
  • Exponential backoff for failed requests
  • Unified Response Format
  • Consistent ToolResult structure for all responses
  • Clear error identification with isError flag
  • Structured error messages with context

Installation

pnpm install @mcpservers/openrouterai

Configuration

Prerequisites

  1. Get your OpenRouter API key from OpenRouter Keys
  2. Choose a default model (optional)

Environment Variables

  • OPENROUTER_API_KEY: Required. Your OpenRouter API key.
  • OPENROUTER_DEFAULT_MODEL: Optional. The default model to use if not specified in the request (e.g., openrouter/auto).
  • OPENROUTER_MAX_TOKENS: Optional. Default maximum number of tokens to generate if max_tokens is not provided in the request.
  • OPENROUTER_PROVIDER_QUANTIZATIONS: Optional. Comma-separated list of default quantiz
Read from source at commit ee7f6b667ca6OBSERVED · 2026-10-07
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add openrouterai --env OPENROUTER_API_KEY=${OPENROUTER_API_KEY} --env OPENROUTER_MAX_TOKENS=${OPENROUTER_MAX_TOKENS} -- npx -y @mcpservers/[email protected]
claude-desktop
{
  "mcpServers": {
    "openrouterai": {
      "command": "npx",
      "args": [
        "-y",
        "@mcpservers/[email protected]"
      ],
      "env": {
        "OPENROUTER_API_KEY": "${OPENROUTER_API_KEY}",
        "OPENROUTER_MAX_TOKENS": "${OPENROUTER_MAX_TOKENS}"
      }
    }
  }
}
03

Exposed tools (4)

4 read · 0 write · 0 destructive.

ToolRiskDescription
chat_completionreadSends conversational context (messages) to OpenRouter.ai for completion using a specified model. Use this for dialogue, text generation, or instruction-following tasks. Supports advanced provider routing and parameter overrides. Returns the generated text response.
get_model_inforeadRetrieves the complete metadata for a single OpenRouter.ai model specified by its unique ID. Use this when you know the model ID and need its full details (pricing, context limits, capabilities, etc.). Returns a model information object.
search_modelsreadQueries the OpenRouter.ai model registry, filtering by various criteria like capabilities, pricing, or provider. Use this to discover models suitable for specific needs. Returns a list of matching model metadata objects.
validate_modelreadVerifies if a given model ID exists within the OpenRouter.ai registry. Use this for a quick check of model ID validity before making other API calls. Returns a boolean value (
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
declared (1 observation(s))
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (2)

LOWInventory / provenance · inv.hidden_file · CWE-1104
.dxtignore
.dxtignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
axios, openai, typescript, @types/node, shx
Why it matters. 5 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha ee7f6b667ca6full audit observations/trust-audit/mcp-server/heltonteixeira__openrouterai.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-07ee7f6b667ca6SAFEB89first audit
06

Questions

What is the OpenRouterai MCP server?

MCP server for OpenRouter.ai integration

What tools does OpenRouterai expose?

4 in total: 4 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is OpenRouterai safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.

What credentials does OpenRouterai need?

It reads OPENROUTER_API_KEY and OPENROUTER_MAX_TOKENS from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does OpenRouterai run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as @mcpservers/openrouterai at 2.3.0.

How current is this page?

The grade is for one exact copy of the source (ee7f6b667ca6), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement