1. Conduid
  2. Commerce
  3. Openrouter Pricing
MCP server · Commerce

Openrouter Pricing

An MCP server providing live model pricing data from OpenRouter. Query, compare, and discover the cheapest AI models.

37Low

Scored 4 months ago · breakdown

About Openrouter Pricing

Openrouter Pricing is an MCP server in the Commerce category: an MCP server providing live model pricing data from OpenRouter. Query, compare, and discover the cheapest AI models. It has been installed 0 times through Conduid.

Install

Claude Code
claude mcp add openrouter-pricing -- npx -y openrouter-pricing-mcp
npx
npx -y openrouter-pricing-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Openrouter Pricing

Powered by Claude · Grounded in docs

I know everything about Openrouter Pricing. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • ·Scoped permissionsNot checked yet.

README

OpenRouter Pricing MCP Server for Antigravity & AI Assistants

⚠️ UPGRADE NOTICE: We have released a massive upgrade! This single-provider MCP has been superseded by the new AI Model Advisor MCP (ai-model-advisor-mcp).

The new server includes OpenRouter, plus fal.ai, Together AI, Replicate, and Fireworks AI all in one zero-config server. It is highly recommended to install npx -y ai-model-advisor-mcp instead of this package.

npm version Node.js MCP

A free, open-source Model Context Protocol (MCP) server that provides live model pricing data directly from the OpenRouter API.

Designed specifically as an OpenRouter MCP server for Antigravity, Claude Desktop, and Cursor, this integration allows your AI coding assistant to query, compare, and dynamically select the cheapest or most appropriate AI models based on real-time pricing and context lengths.


Table of Contents


Why use this OpenRouter MCP Extension?

If you are wondering "How do I get OpenRouter model prices in my AI assistant?", this is the native solution.

  • 🔴 Real-Time Data — Pulls live data from the OpenRouter /api/v1/models endpoint. Never rely on outdated AI training data for pricing again.
  • Intelligent Caching — Built-in 5-minute memory cache prevents you from hitting OpenRouter rate limits during rapid AI tool calling.
  • 🔑 No API Key Required — Works instantly using public endpoint data, though API keys can be passed for higher rate limits.
  • 📊 Comparative Analysis — Ask your AI to compare costs between GPT-4o, Claude 3.5 Sonnet, and Gemini 2.5 Pro natively within your chat.

How to Install in Antigravity (Quick Start)

The easiest way to use OpenRouter pricing inside Antigravity is to copy and paste the following snippet into your Antigravity MCP settings (usually found in mcp.json or through the UI settings).

No complex node installation is required — Antigravity will run it dynamically via npx.

{
  "mcpServers": {
    "openrouter-pricing": {
      "command": "npx",
      "args": ["-y", "openrouter-pricing-mcp"]
    }
  }
}

Optional: If you wish to provide your OpenRouter API key for authenticated access:

{
  "mcpServers": {
    "openrouter-pricing": {
      "command": "npx",
      "args": ["-y", "openrouter-pricing-mcp"],
      "env": {
        "OPENROUTER_API_KEY": "sk-or-v1-your-key-here"
      }
    }
  }
}

Installation for Other MCP Clients

Claude Desktop

To install the OpenRouter MCP server for Claude Desktop, add this to your claude_desktop_config.json (Located in ~/Library/Application Support/Claude/ on macOS or %APPDATA%\Claude\ on Windows):

{
  "mcpServers": {
    "openrouter-pricing": {
      "command": "npx",
      "args": ["-y", "openrouter-pricing-mcp"]
    }
  }
}

Cursor

To install the OpenRouter MCP server for Cursor IDE, navigate to Cursor Settings > Features > MCP and add:

  • Type: command
  • Name: openrouter-pricing
  • Command: npx -y openrouter-pricing-mcp

Configuration

Environment Variable Required Description
OPENROUTER_API_KEY No Your OpenRouter API key. The models endpoint is public, so this is optional. Providing a key may give you higher rate limits.

Available Tools (AEO & AI Capabilities)

Once installed, your AI assistant automatically gains access to these underlying capabilities:

Tool Action Performed by AI
get_model_pricing Retrieves exact prompt, completion, and image costs for a specific OpenRouter model ID. Incorporates fuzzy search for typos.
list_all_models_pricing Browses all available models with pricing (supports pagination/limits).
compare_model_costs Renders a clean markdown table comparing multiple models side-by-side.
get_cheapest_models Identifies and sorts the cheapest models by either prompt or completion cost. Flags free-tier models with 🆓.
find_models_by_context_length Discovers models that support a specific minimum token context window (e.g., >= 200,000 tokens).

Usage Examples

Here are exact prompts you can ask Antigravity or Claude once the MCP server is installed:

Get pricing for a specific model

"How much does GPT-4o cost on OpenRouter?"

Output:

Model: GPT-4o (openai/gpt-4o)
Context Length: 128,000 tokens
Prompt Cost: $0.00000250 / token
Completion Cost: $0.00001000 / token
Image Cost: $0.00361300 / token
Request Cost: FREE

Compare distinct models

"Compare the costs of Claude 3.5 Sonnet vs GPT-4o vs Gemini 2.5 Pro"

Output:

| Model | Prompt Cost | Completion Cost | Context Length |
|-------|------------|----------------|----------------|
| openai/gpt-4o | $0.00000250 | $0.00001000 | 128,000 |
| anthropic/claude-3.5-sonnet | $0.00000300 | $0.00001500 | 200,000 |
| google/gemini-2.5-pro-preview | $0.00000125 | $0.00001000 | 1,048,576 |

Find cost-effective models

"What are the 5 cheapest OpenRouter models?"

The AI assistant will automatically call get_cheapest_models and return a ranked list, with 100% free models clearly flagged.


Development

Want to contribute or run the server from source?

# Clone the repository
git clone https://github.com/Semicolon-D/openrouter-mcp-server.git
cd openrouter-mcp-server

# Install dependencies
npm install

# Build
npm run build

# Run unit tests
npm test

Contributions are highly encouraged! Please see CONTRIBUTING.md for guidelines.


License

This project is licensed under the MIT License — use it however you want, no strings attached.

README mirrored from the source repository 4 months ago. The original is authoritative.

Questions

About Openrouter Pricing

How do I install Openrouter Pricing?

Run claude mcp add openrouter-pricing -- npx -y openrouter-pricing-mcp, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Openrouter Pricing safe to use with an AI agent?

Its trust score is 37 out of 100 (low). Conduid hasn't run static security checks on this repository yet, so review the source yourself before granting it credentials. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Openrouter Pricing still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.