{
  "markdown": "# llm-advisor-mcp\n\n[![npm version](https://img.shields.io/npm/v/llm-advisor-mcp)](https://www.npmjs.com/package/llm-advisor-mcp)\n[![npm downloads](https://img.shields.io/npm/dm/llm-advisor-mcp)](https://www.npmjs.com/package/llm-advisor-mcp)\n[![CI](https://github.com/Daichi-Kudo/llm-advisor-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Daichi-Kudo/llm-advisor-mcp/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js >= 18](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)\n\n[![Glama MCP server](https://glama.ai/mcp/servers/Daichi-Kudo/llm-advisor-mcp/badge)](https://glama.ai/mcp/servers/Daichi-Kudo/llm-advisor-mcp)\n\n**English** | [日本語](README.ja.md)\n\n**Give your AI assistant real-time LLM/VLM knowledge.** Pricing, benchmarks, and recommendations — updated every hour, not every training cycle.\n\nLLMs have knowledge cutoffs. Ask Claude \"what's the best coding model right now?\" and it cannot answer with current data. This MCP server fixes that by feeding live model intelligence directly into your AI assistant's context window.\n\n- **Zero config** — No API keys, no registration. One command to install.\n- **Low token** — Compact Markdown tables (~300 tokens), not raw JSON (~3,000 tokens). Your context window matters.\n- **5 benchmark sources** — SWE-bench, LM Arena Elo, OpenCompass VLM, Aider Polyglot, and OpenRouter pricing merged into one unified view.\n\n---\n\n## Use Cases\n\n- **\"What's the best coding model right now?\"** — `list_top_models` with category `coding`\n- **\"Compare Claude vs GPT vs Gemini\"** — `compare_models` with side-by-side table\n- **\"Find a cheap model with 1M context\"** — `recommend_model` with budget constraints\n- **\"What benchmarks does model X have?\"** — `get_model_info` with percentile ranks\n\n---\n\n## Quick Start\n\n### Claude Code\n\n```bash\nclaude mcp add llm-advisor -- npx -y llm-advisor-mcp\n```\n\n### Claude Code (Windows)\n\n```bash\nclaude mcp add llm-advisor -- cmd /c npx -y llm-advisor-mcp\n```\n\n### Claude Desktop / Cursor / Windsurf\n\nAdd to your MCP configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"llm-advisor\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"llm-advisor-mcp\"]\n    }\n  }\n}\n```\n\nThat is it. No API keys, no `.env` files.\n\n### Compatible Clients\n\n| Client | Supported | Install Method |\n|--------|-----------|----------------|\n| Claude Code | Yes | `claude mcp add` |\n| Claude Desktop | Yes | JSON config |\n| Cursor | Yes | JSON config |\n| Windsurf | Yes | JSON config |\n| Any MCP client | Yes | stdio transport |\n\n---\n\n## Tools\n\n### `get_model_info`\n\nDetailed specs for a specific model: pricing, benchmarks, percentile ranks, capabilities, and a ready-to-use API code example.\n\n**Parameters**\n\n| Name | Type | Required | Default | Description |\n|------|------|----------|---------|-------------|\n| `model` | string | Yes | — | Model ID or partial name (e.g. `\"claude-sonnet-4\"`, `\"gpt-5\"`) |\n| `include_api_example` | boolean | No | `true` | Include a ready-to-use code snippet |\n| `api_format` | enum | No | `openai_sdk` | `openai_sdk`, `curl`, or `python_requests` |\n\n**Example output**\n\n```\n## anthropic/claude-sonnet-4\n\n**Provider**: anthropic | **Modality**: text+image→text | **Released**: 2025-06-25\n\n### Pricing\n| Metric | Value |\n|--------|-------|\n| Input | $3.00 /1M tok |\n| Output | $15.00 /1M tok |\n| Cache Read | $0.30 /1M tok |\n| Context | 200K |\n| Max Output | 64K |\n\n### Benchmarks\n| Benchmark | Score |\n|-----------|-------|\n| SWE-bench Verified | 76.8% |\n| Aider Polyglot | 72.1% |\n| Arena Elo | 1467 |\n| MMMU | 76.0% |\n\n### Percentile Ranks\n| Category | Percentile |\n|----------|------------|\n| Coding | P96 |\n| General | P95 |\n| Vision | P90 |\n\n**Capabilities**: Tools, Reasoning, Vision\n\n### API Example (openai_sdk)\n```python\nfrom openai import OpenAI\nclient = OpenAI(\n    base_url=\"https://openrouter.ai/api/v1\",\n    api_key=\"<OPENROUTER_API_KEY>\",\n)\nresponse = client.chat.completions.create(\n    model=\"anthropic/claude-sonnet-4\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n)\n```\n```\n\n---\n\n### `list_top_models`\n\nTop-ranked models for a category. Includes release dates for freshness awareness.\n\n**Parameters**\n\n| Name | Type | Required | Default | Description |\n|------|------|----------|---------|-------------|\n| `category` | enum | Yes | — | `coding`, `math`, `vision`, `general`, `cost-effective`, `open-source`, `speed`, `context-window`, `reasoning` |\n| `limit` | number | No | `10` | Number of results (1-20) |\n| `min_context` | number | No | — | Minimum context window in tokens |\n| `min_release_date` | string | No | — | `YYYY-MM-DD`. Excludes models released before this date |\n\n**Example output**\n\n```\n## Top 5: coding\n\n| # | Model | Key Score | Input $/1M | Output $/1M | Context | Released |\n|------|------|------|------|------|------|------|\n| 1 | openai/o3-pro | SWE 79.5% | $20.00 | $80.00 | 200K | 2025-06-10 |\n| 2 | anthropic/claude-sonnet-4 | SWE 76.8% | $3.00 | $15.00 | 200K | 2025-06-25 |\n| 3 | google/gemini-2.5-pro | SWE 75.2% | $1.25 | $10.00 | 1M | 2025-03-25 |\n| 4 | openai/o4-mini | SWE 73.6% | $1.10 | $4.40 | 200K | 2025-04-16 |\n| 5 | anthropic/claude-opus-4 | SWE 72.5% | $15.00 | $75.00 | 200K | 2025-05-22 |\n```\n\n---\n\n### `compare_models`\n\nSide-by-side comparison for 2-5 models. Best values are **bolded** automatically. Includes a `Released` row so you can spot outdated models at a glance.\n\n**Parameters**\n\n| Name | Type | Required | Default | Description |\n|------|------|----------|---------|-------------|\n| `models` | string[] | Yes | — | 2-5 model IDs or partial names |\n\n**Example output**\n\n```\n## Model Comparison (3 models)\n\n| | **anthropic/claude-sonnet-4** | **openai/gpt-4.1** | **google/gemini-2.5-pro** |\n|------|------|------|------|\n| Input $/1M | $3.00 | **$2.00** | $1.25 |\n| Output $/1M | $15.00 | $8.00 | **$5.00** |\n| Context | 200K | 1M | **1M** |\n| Max Output | 64K | 32K | **65K** |\n| SWE-bench | **76.8%** | 55.0% | 75.2% |\n| Aider Polyglot | **72.1%** | 65.3% | 71.8% |\n| Arena Elo | 1467 | **1492** | 1445 |\n| Vision | Yes | Yes | Yes |\n| Tools | Yes | Yes | Yes |\n| Reasoning | Yes | No | Yes |\n| Open Source | No | No | No |\n| Released | 2025-06-25 | **2025-04-14** | 2025-03-25 |\n```\n\n---\n\n### `recommend_model`\n\nPersonalized top-3 recommendations. Scores combine weighted benchmarks, pricing, capability bonuses, and a freshness bonus (+3 points for models released within 3 months, +1 within 6 months).\n\n**Parameters**\n\n| Name | Type | Required | Default | Description |\n|------|------|----------|---------|-------------|\n| `use_case` | enum | Yes | — | `coding`, `math`, `general`, `vision`, `creative`, `reasoning`, `cost-effective` |\n| `max_input_price` | number | No | — | Max input price (USD/1M tokens) |\n| `max_output_price` | number | No | — | Max output price (USD/1M tokens) |\n| `min_context` | number | No | — | Minimum context window in tokens |\n| `require_vision` | boolean | No | — | Require image input support |\n| `require_tools` | boolean | No | — | Require tool/function calling support |\n| `require_open_source` | boolean | No | — | Require open-source license |\n| `min_release_date` | string | No | — | `YYYY-MM-DD`. Excludes older models |\n\n**Example output**\n\n```\n## Recommended for: coding\n\n### 1. anthropic/claude-sonnet-4 (score: 78)\nInput: $3.00/1M | Output: $15.00/1M | Context: 200K | Released: 2025-06-25\nBenchmarks: SWE-bench: 76.8%, Aider: 72.1%, Arena: 1467\nStrengths: reasoning, tools, vision\n\n### 2. google/gemini-2.5-flash (score: 74)\nInput: $0.15/1M | Output: $0.60/1M | Context: 1M | Released: 2025-05-20\nBenchmarks: SWE-bench: 62.9%, Arena: 1445\nStrengths: tools, vision, 1M+ context\n\n### 3. openai/o4-mini (score: 71)\nInput: $1.10/1M | Output: $4.40/1M | Context: 200K | Released: 2025-04-16\nBenchmarks: SWE-bench: 73.6%, Arena: 1430\nStrengths: reasoning, tools\n```\n\n---\n\n## Data Sources\n\nAll data is fetched in real time from free, public APIs. No authentication required.\n\n| Source | Data | Models | Cache TTL |\n|--------|------|--------|-----------|\n| [OpenRouter](https://openrouter.ai/api/v1/models) | Pricing, context lengths, modalities, release dates | 300+ | 1 hour |\n| [SWE-bench](https://github.com/SWE-bench/swe-bench.github.io) | Coding benchmark (Verified leaderboard) | 30+ | 6 hours |\n| [LM Arena](https://lmarena.ai) | Human preference Elo ratings | 314+ | 6 hours |\n| [OpenCompass VLM](https://opencompass.org.cn) | Vision benchmarks: MMMU, MMBench, OCRBench, AI2D, MathVista | 284+ | 6 hours |\n| [Aider Polyglot](https://aider.chat/docs/leaderboards/) | Multi-language coding pass rate | 63+ | 6 hours |\n\n---\n\n## Context Cost\n\nMCP tool definitions and responses consume your LLM's context window. This server is designed to be lean:\n\n| Component | Tokens |\n|-----------|--------|\n| All 4 tool definitions | ~1,000 |\n| Typical tool response | ~250-400 |\n\nFor comparison, most MCP servers that return raw JSON consume 3,000-10,000 tokens per response. Every response from llm-advisor-mcp is pre-formatted Markdown, keeping context costs roughly 10x lower.\n\n---\n\n## Architecture\n\n```\n┌──────────────────────────────────────────────┐\n│              MCP Client (Claude, etc.)        │\n└──────────┬───────────────────────────────────┘\n           │ stdio (JSON-RPC)\n┌──────────▼───────────────────────────────────┐\n│            llm-advisor-mcp server             │\n│                                               │\n│  ┌─────────┐  ┌───────────┐  ┌────────────┐  │\n│  │  Tools   │  │ Registry  │  │   Cache    │  │\n│  │ (4 tools)│──│ (unified) │──│ (in-memory)│  │\n│  └─────────┘  └───────────┘  └────────────┘  │\n│                     │                         │\n│        ┌────────────┼────────────┐            │\n│        ▼            ▼            ▼            │\n│  ┌──────────┐ ┌──────────┐ ┌──────────┐      │\n│  │Normalizer│ │Percentile│ │ Fetchers │      │\n│  │(slug map)│ │ (5 cats) │ │(5 sources│      │\n│  └──────────┘ └──────────┘ └──────────┘      │\n└──────────────────────────────────────────────┘\n           │           │           │\n     OpenRouter    SWE-bench    Arena / VLM / Aider\n```\n\n- **TypeScript + ESM** — Single entry point, `tsup` build\n- **In-memory cache** — TTL-based (1h pricing, 6h benchmarks), stale-while-revalidate\n- **Cross-source normalization** — Maps inconsistent model names (e.g. `Claude 3.5 Sonnet` vs `anthropic/claude-3.5-sonnet`) to canonical IDs\n- **Percentile computation** — Ranks across 5 categories (coding, math, general, vision, cost efficiency)\n- **Freshness scoring** — Recommendation algorithm gives a bonus to recently released models (+3 for <=3mo, +1 for <=6mo)\n- **Zero runtime deps** beyond `@modelcontextprotocol/sdk` and `zod`\n\n---\n\n## Roadmap\n\n| Version | Status | Highlights |\n|---------|--------|------------|\n| v0.1 | Done | `get_model_info` + `list_top_models` via OpenRouter |\n| v0.2 | Done | `compare_models` + `recommend_model` + SWE-bench + Arena Elo |\n| v0.3 | Done | VLM benchmarks (MMMU, MMBench, OCRBench, AI2D, MathVista) + Aider Polyglot + percentile ranks + 43 tests |\n| v0.4 | **Current** | Release date display, date-based filtering, freshness scoring in recommendations + 51 tests |\n| v1.0 | Planned | Community contributions, weekly static data snapshots via GitHub Actions |\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/Daichi-Kudo/llm-advisor-mcp.git\ncd llm-advisor-mcp\nnpm install\nnpm run build       # Build with tsup\nnpm run dev         # Run with tsx (hot reload)\nnpm test            # Run 51 unit tests (vitest)\nnpm run test:watch  # Watch mode\n```\n\n### Project structure\n\n```\nsrc/\n  index.ts              # Server entry point\n  types.ts              # Shared type definitions\n  tools/\n    model-info.ts       # get_model_info tool\n    list-top.ts         # list_top_models tool\n    compare.ts          # compare_models tool\n    recommend.ts        # recommend_model tool\n    formatters.ts       # Markdown output formatters\n  data/\n    registry.ts         # Unified model registry\n    cache.ts            # In-memory TTL cache\n    normalizer.ts       # Cross-source name normalization\n    percentiles.ts      # Percentile rank computation\n    fetchers/\n      openrouter.ts     # OpenRouter API\n      swe-bench.ts      # SWE-bench leaderboard\n      arena.ts          # LM Arena Elo ratings\n      vlm-leaderboard.ts # OpenCompass VLM benchmarks\n      aider.ts          # Aider Polyglot scores\n    static/\n      api-examples.ts   # API code snippet templates\n```\n\n### Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Add tests for new functionality\n4. Run `npm test` to verify all 51 tests pass\n5. Submit a pull request\n\n---\n\n## License\n\n[MIT](LICENSE) — built by [Cognisant LLC](https://cognisant.io)\n",
  "bytes": 12903,
  "sha": "3ba17962ed81ed25ff848a53e6f75382eff973e6035014cd391d455e8ac7564c",
  "repo_slug": "daichi-kudo/llm-advisor-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_daichi_kudo_llm_advisor_d419f8a5/readme"
}