or-info

or-info

Enables AI agents to query OpenRouter model information including prices, ELO rankings, context, and perform comparisons.

Category
访问服务器

README

or-info

CLI + MCP server to query OpenRouter model info: prices, ELO rankings, context and comparisons.

Any person or AI agent (Claude Code, Codex, Cursor, pi, etc.) can install it and use it to make informed decisions about which model to use.

npm version CI smithery badge License: MIT

Install

npm install -g @aggc/or-info
or-info --version

The npm package is published as @aggc/or-info, but the installed executable is or-info.

You can also run it without a global install:

npx -y @aggc/or-info models --limit 5

Requires Node.js 22 or later.

Install from Smithery

Each release is also published as a Smithery MCPB bundle, importable in one click from clients that support the MCPB format (Claude Desktop, etc.):

https://smithery.ai/server/aggc/or-info

The bundle is attached as an asset to every GitHub release (or-info.mcpb) and can also be installed manually by dropping the file into the client.

Supported runtimes and platforms:

  • Node.js 22+
  • macOS, Linux, Windows

Config and cache paths

or-info resolves config and cache natively per platform:

Platform Config directory Cache directory
macOS / Linux $XDG_CONFIG_HOME/or-info or ~/.config/or-info $XDG_CACHE_HOME/or-info or ~/.cache/or-info
Windows %APPDATA%\\or-info %LOCALAPPDATA%\\or-info
Any platform OR_INFO_CONFIG_DIR override OR_INFO_CACHE_DIR override

Files of interest:

  • Config file: <config-dir>/.env
  • Model cache: <cache-dir>/models.json
  • LMArena cache: <cache-dir>/benchmarks.json

API key (optional)

Without an API key the CLI works with OpenRouter's public catalog. With a key you also see private/pay-gated models.

Bash / Zsh

export OPENROUTER_API_KEY=sk-or-...

PowerShell

$env:OPENROUTER_API_KEY = "sk-or-..."

CMD

set OPENROUTER_API_KEY=sk-or-...

Config file

macOS / Linux:

mkdir -p ~/.config/or-info
echo 'OPENROUTER_API_KEY=sk-or-...' >> ~/.config/or-info/.env

Windows PowerShell:

New-Item -ItemType Directory -Force "$env:APPDATA\or-info" | Out-Null
Add-Content -Path "$env:APPDATA\or-info\.env" -Value "OPENROUTER_API_KEY=sk-or-..."

Windows CMD:

if not exist "%APPDATA%\or-info" mkdir "%APPDATA%\or-info"
echo OPENROUTER_API_KEY=sk-or-...>> "%APPDATA%\or-info\.env"

For tests and debugging you can redirect storage without touching your real machine state:

OR_INFO_CONFIG_DIR=/tmp/or-info-config OR_INFO_CACHE_DIR=/tmp/or-info-cache or-info status

CLI usage

List models

or-info models                        # All models sorted by name
or-info models --sort price           # Cheapest output first
or-info models --sort context         # Largest context first
or-info models --filter coding        # Models whose ID/name contains "coding"
or-info models --free                 # Free models only
or-info models --limit 20             # Limit the number of results
or-info models --tags                 # Show feature tags (vision, tools, reasoning…)
or-info models --json                 # Raw JSON

Pricing and details

or-info price anthropic/claude-sonnet-4.5
or-info price google/gemini-2.5-flash --json

ELO ranking (LMArena)

or-info benchmark openai/gpt-4o
or-info benchmark deepseek/deepseek-r1 --json

Shows the model's ELO score from LMArena (human preference votes), confidence interval, global rank and vote count. Data is fetched live from HuggingFace and cached locally for 24 hours — no API key required.

Compare two models

or-info compare anthropic/claude-sonnet-4.5 google/gemini-2.5-flash
or-info compare openai/gpt-4o deepseek/deepseek-chat-v3-0324 --json

Top models for a task

or-info top --task coding                          # Best coding models
or-info top --task reasoning                       # Best reasoning models
or-info top --task general                         # Best all-rounders
or-info top --task vision                          # Best vision models (requires image input)
or-info top --task cheap                           # Best value for money
or-info top --task premium                         # Highest quality, ignoring price
or-info top --task coding --pricing premium        # Best coder regardless of price
or-info top --task coding --budget 2               # Best coders under $2/M output
or-info top --task general --limit 10

Ranking combines LMArena ELO with price and context window size.

--task controls which ELO category and capability filter to apply. --pricing overrides the price-penalty strategy independently:

--pricing Effect
standard (default) Moderate penalty for expensive models
cheap Steep penalty; strongly favours free/low-cost models
premium No penalty; ranks by quality alone

Task defaults (when --pricing is not set):

Task Default pricing Capability filter
general standard none
coding standard soft penalty (−15%) if no tool support
reasoning standard none
vision standard hard filter: image input required
cheap cheap none
premium premium none

Cache management

or-info status          # Show cache age and TTL for each data source
or-info refresh         # Force-refresh OpenRouter catalog + LMArena ELO

MCP server

or-info can run as an MCP server for AI agents.

Tools available

Tool Description
models.get Pricing, context, architecture, features and LMArena ELO for a model
models.list List models with optional filter, sort and limit
models.compare Side-by-side comparison of two models
models.top Ranked top models for coding/reasoning/general/vision/cheap/premium; accepts optional pricing override
benchmarks.get LMArena ELO score, global rank, vote count and confidence interval for a model
cache.refresh Force-refresh OpenRouter catalog + LMArena ELO

Legacy flat names (get_model_info, list_models, get_benchmarks, compare_models, best_for_task, refresh_cache) are still advertised in tools/list as deprecated aliases (same schemas, prefixed [Deprecated]) and remain callable. The dot-notation names are the canonical ones.

Register in Claude Code

The recommended way is the claude mcp add command, which writes to ~/.claude.json:

# Global — available in all projects
claude mcp add --scope user or-info -- or-info --mcp

# Project-only (run from the project directory)
claude mcp add or-info -- or-info --mcp

Then verify:

claude mcp list

Project .mcp.json — commit this file to share the config with your team:

macOS / Linux:

{
  "mcpServers": {
    "or-info": {
      "command": "or-info",
      "args": ["--mcp"]
    }
  }
}

Windows:

{
  "mcpServers": {
    "or-info": {
      "command": "or-info.cmd",
      "args": ["--mcp"]
    }
  }
}

Without a global install (macOS/Linux):

{
  "mcpServers": {
    "or-info": {
      "command": "npx",
      "args": ["-y", "@aggc/or-info", "--mcp"]
    }
  }
}

Without a global install (Windows):

{
  "mcpServers": {
    "or-info": {
      "command": "npx.cmd",
      "args": ["-y", "@aggc/or-info", "--mcp"]
    }
  }
}

Register in Codex

Add to ~/.codex/config.toml:

[mcp_servers.or-info]
command = "or-info"
args = ["--mcp"]

Then restart Codex for the change to take effect.

Use from Pi

Pi does not use an mcpServers settings schema. The recommended integration is a Pi skill that calls the installed or-info CLI, for example ~/.pi/agent/skills/or-info/SKILL.md.

Test the MCP server

macOS / Linux:

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | or-info --mcp

Windows PowerShell:

'{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | or-info.cmd --mcp

Windows CMD:

echo {"jsonrpc":"2.0","id":1,"method":"tools/list"} | or-info.cmd --mcp

Data sources

Data Source Refresh
Model catalog and pricing OpenRouter API Every 30 min
ELO rankings LMArena via HuggingFace dataset Every 24 h

ELO data is fetched directly from the lmarena-ai/leaderboard-dataset dataset on HuggingFace using their public Datasets Server API — no API key required. Coverage: ~350 models including all major commercial and open-source models tracked by LMArena.

Testing

npm test

npm test runs the deterministic local suite and is the release gate used before publishing. Live integration tests are available separately because they depend on OpenRouter and HuggingFace availability and can occasionally hit third-party rate limits.

Additional entry points:

  • npm run test:local for deterministic no-network coverage
  • npm run test:online:smoke for the live smoke subset used by CI as a non-blocking signal
  • npm run test:online for the full live CLI/MCP suite, including edge cases

Release

See CHANGELOG.md for release history and details.

Contributing

See CONTRIBUTING.md — adding new CLI commands or new MCP tools.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选