openrouter.com
openrouter.com logo

OpenRouter

Unifies access to diverse AI models via OpenRouter, enabling flexible model selection and usage for applications like ch...

Created byApr 22, 2025

OpenRouter MCP Server

![MCP Server](https://img.shields.io/badge/MCP-Server-green) ![Version](https://img.shields.io/badge/version-2.2.0-blue) ![TypeScript](https://img.shields.io/badge/language-TypeScript-blue) ![License](https://img.shields.io/badge/license-Apache%202.0-brightgreen)
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.
<a href="https://glama.ai/mcp/servers/xdnmf8yei0"><img width="380" height="200" src="https://glama.ai/mcp/servers/xdnmf8yei0/badge" alt="OpenRouter Server MCP server" /></a>

Features

  • Model Access
  • Performance Optimization
  • Unified Response Format

Installation

Configuration

Prerequisites

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

Environment Variables

Setup

Add to your MCP settings configuration file (cline_mcp_settings.json or claude_desktop_config.json):

Response Format

All tools return responses in a standardized structure:
Success Example:
Error Example:

Available Tools

chat_completion

Send messages to OpenRouter.ai models:

search_models

Search and filter available models:

get_model_info

Get detailed information about a specific model:

validate_model

Check if a model ID is valid:

Error Handling

The server provides structured errors with contextual information:
Common Error Categories:
  • Validation Error: Invalid input parameters
  • API Error: OpenRouter API communication issues
  • Rate Limit: Request throttling detection
  • Internal Error: Server-side processing failures
Handling Responses:

Development

See CONTRIBUTING.md for detailed information about:
  • Development setup
  • Project structure
  • Feature implementation
  • Error handling guidelines
  • Tool usage examples

Changelog

See CHANGELOG.md for recent updates including:
  • Unified response format implementation
  • Enhanced error handling system
  • Type-safe interface improvements

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

OpenRouter MCP Server

![MCP Server](https://img.shields.io/badge/MCP-Server-green) ![Version](https://img.shields.io/badge/version-2.2.0-blue) ![TypeScript](https://img.shields.io/badge/language-TypeScript-blue) ![License](https://img.shields.io/badge/license-Apache%202.0-brightgreen)
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.
<a href="https://glama.ai/mcp/servers/xdnmf8yei0"><img width="380" height="200" src="https://glama.ai/mcp/servers/xdnmf8yei0/badge" alt="OpenRouter Server MCP server" /></a>

Features

  • Model Access
  • Performance Optimization
  • Unified Response Format

Installation

Configuration

Prerequisites

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

Environment Variables

Setup

Add to your MCP settings configuration file (cline_mcp_settings.json or claude_desktop_config.json):

Response Format

All tools return responses in a standardized structure:
Success Example:
Error Example:

Available Tools

chat_completion

Send messages to OpenRouter.ai models:

search_models

Search and filter available models:

get_model_info

Get detailed information about a specific model:

validate_model

Check if a model ID is valid:

Error Handling

The server provides structured errors with contextual information:
Common Error Categories:
  • Validation Error: Invalid input parameters
  • API Error: OpenRouter API communication issues
  • Rate Limit: Request throttling detection
  • Internal Error: Server-side processing failures
Handling Responses:

Development

See CONTRIBUTING.md for detailed information about:
  • Development setup
  • Project structure
  • Feature implementation
  • Error handling guidelines
  • Tool usage examples

Changelog

See CHANGELOG.md for recent updates including:
  • Unified response format implementation
  • Enhanced error handling system
  • Type-safe interface improvements

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.