PO

physics91/openrouter-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

10 stars 3 forks 质量 81 趋势 22MIT

A Model Context Protocol (MCP) server for OpenRouter API - Access 100+ AI models through a unified interface with Claude Desktop integration

概览

A Model Context Protocol (MCP) server for OpenRouter. Register it in MCP-compatible clients that can launch a local stdio server to use OpenRouter models for chat, vision, benchmarking, and collective-intelligence workflows. - MCP tools: chat, model listing, usage stats, vision chat, vision model listing, free chat, free model listing, free model metrics - Benchmarking suite and performance comparison tools - Collective intelligence tools (consensus, ensemble reasoning, adaptive routing, cross-model validation, collaborative solving) - Secure API key storage (OS keychain, encrypted file, or .env) with audit logging - Streaming responses, caching, and rich model metadata Client config formats differ, but the launch information is usually the same: - command: npx - args: ["@physics91/openrouter-mcp", "start"] - env: Use only when the client cannot rely on openrouter-mcp init or inherited environment variables.

README

以下为原文 README 节选,完整内容请查看原文。

OpenRouter MCP Server

A Model Context Protocol (MCP) server for OpenRouter. Register it in MCP-compatible clients that can launch a local stdio server to use OpenRouter models for chat, vision, benchmarking, and collective-intelligence workflows.

Features

  • MCP tools: chat, model listing, usage stats, vision chat, vision model listing, free chat, free model listing, free model metrics
  • Benchmarking suite and performance comparison tools
  • Collective intelligence tools (consensus, ensemble reasoning, adaptive routing, cross-model validation, collaborative solving)
  • Secure API key storage (OS keychain, encrypted file, or .env) with audit logging
  • Streaming responses, caching, and rich model metadata

Quick start

npx @physics91/openrouter-mcp init
npx @physics91/openrouter-mcp start

Global install:

npm install -g @physics91/openrouter-mcp
openrouter-mcp init
openrouter-mcp start

MCP client setup

Client config formats differ, but the launch information is usually the same:

  • command: npx
  • args: ["@physics91/openrouter-mcp", "start"]
  • env: Use only when the client cannot rely on openrouter-mcp init or inherited environment variables.

Recommended credential flow:

  • Run npx @physics91/openrouter-mcp init
  • Let openrouter-mcp start resolve the API key from secure storage or runtime environment

Client-specific examples:

  • Claude Desktop: mcpServers in claude_desktop_config.json
  • Claude Code: claude mcp add ... or project .mcp.json
  • VS Code: servers in .vscode/mcp.json

See docs/MCP_CLIENT_GUIDE.md for the common flow and client-specific examples.

Prerequisites

  • Node.js 16+
  • Python 3.10+ (python or python3 must be available in PATH)
  • First run attempts dependency install via -m pip install -r requirements.txt
在 GitHub 查看完整 README

安装

npx @physics91/openrouter-mcp init
新手?先看 mcpskill.org 教程 →