aa-mcp

aa-mcp

Enables AI agents to query LLM and multimodal model benchmarks, pricing, speed, and track model updates via structured diffs using the Artificial Analysis public API.

Category
访问服务器

README

aa-mcp

MCP server wrapping the Artificial Analysis public API. Enables AI agents to query LLM and multimodal model benchmarks, pricing, speed data, and track model updates via structured diffs.

The PyPI package is aa-mcp; it installs the aa-mcp console command.

Requirements

  • Python 3.10+
  • uv (for installation and running)
  • An Artificial Analysis API key (get one free)

Installation & Running

Use uvx as the standard runtime path:

export ARTIFICIAL_ANALYSIS_API_KEY="aa_your_key_here"
uvx aa-mcp

Environment Variables

Variable Required Default Description
ARTIFICIAL_ANALYSIS_API_KEY Yes - Your AA API key
AA_MCP_SNAPSHOT_DIR No ~/.local/share/aa-mcp/snapshots/ Directory for update snapshots
AA_MCP_LOG_LEVEL No INFO Log level (DEBUG, INFO, WARNING, ERROR)

Official API Coverage

This server wraps the current free Artificial Analysis API endpoints documented at https://artificialanalysis.ai/api-reference:

Artificial Analysis endpoint MCP tool
GET /api/v2/data/llms/models aa_list_llms, aa_get_model, aa_compare_models, aa_list_recent_updates, aa_healthcheck
GET /api/v2/data/media/text-to-image aa_list_media_models(modality="text-to-image")
GET /api/v2/data/media/image-editing aa_list_media_models(modality="image-editing")
GET /api/v2/data/media/text-to-speech aa_list_media_models(modality="text-to-speech")
GET /api/v2/data/media/text-to-video aa_list_media_models(modality="text-to-video")
GET /api/v2/data/media/image-to-video aa_list_media_models(modality="image-to-video")
POST /api/v2/critpt/evaluate aa_evaluate_critpt

MCP Tools

aa_list_llms

List LLM models with filtering and sorting.

  • Filters: creator, name, slug (substring match)
  • Sort by: intelligence (default), price, speed, ttft, coding, math
  • limit: Max results (default 20)

aa_get_model

Get full details for a single model by id, slug, or name.

  • Returns candidates if multiple matches found
  • Supports partial/fuzzy matching

aa_compare_models

Side-by-side comparison of 2+ models.

  • Compares: intelligence, coding, math, pricing, speed, latency
  • Returns rankings across all metrics
  • Input: list of identifiers (ids, slugs, or names)

aa_list_recent_updates

Detect changes since the last local snapshot.

  • New models: present in current data but not in snapshot
  • Removed models: present in snapshot but gone from current data
  • Changed models: field-level diffs for pricing, speed, intelligence scores, etc.
  • First run creates a baseline snapshot
  • Float changes below 0.01 threshold are ignored (noise filtering)

aa_list_media_models

Query multimodal / media model rankings.

  • Modalities: text-to-image, image-editing, text-to-speech, text-to-video, image-to-video
  • top_n: Limit results (default 10)
  • include_categories: Per-category Elo breakdown where the upstream endpoint supports it

aa_evaluate_critpt

Submit a complete CritPt benchmark batch to the official evaluation endpoint.

  • Requires submissions for the full public CritPt problem set
  • Validates required fields before sending: problem_id, generated_code, model, generation_config
  • Optional batch_metadata object is passed through to Artificial Analysis
  • The upstream endpoint is rate-limited separately and may take substantial time to complete

aa_healthcheck

Verify API key and upstream connectivity.

  • Returns masked key preview, model count, rate limit info
  • Reports specific error types (auth, rate limit, server error)

Snapshot / Update Tracking

The aa_list_recent_updates tool uses a local JSON snapshot mechanism:

  1. First call: Fetches all LLM models, saves a normalized snapshot to disk, reports "baseline created"
  2. Subsequent calls: Fetches fresh data, diffs against the latest snapshot, reports changes
  3. Snapshot location: ~/.local/share/aa-mcp/snapshots/llm_models_YYYYMMDDTHHMMSSZ.json
  4. Noise filtering: Float fields use a 0.01 threshold to avoid reporting insignificant fluctuations
  5. Tracked fields: name, slug, creator, all evaluation scores, all pricing fields, speed/latency

opencode Integration

Add to your opencode.json:

{
  "mcp": {
    "servers": {
      "artificial-analysis": {
        "command": "uvx",
        "args": ["aa-mcp"],
        "env": {
          "ARTIFICIAL_ANALYSIS_API_KEY": "aa_your_key_here"
        }
      }
    }
  }
}

For MCP client examples, see docs/mcp-client-config.md.

Example Usage (via MCP client)

# List top 5 most intelligent LLMs
aa_list_llms(sort_by="intelligence", limit=5)

# Get details on Claude 3.5 Sonnet
aa_get_model("claude-3-5-sonnet")

# Compare GPT-4o vs Claude 3.5 Sonnet vs Gemini 1.5 Pro
aa_compare_models(["gpt-4o", "claude-3-5-sonnet", "gemini-1.5-pro"])

# Check for recent model changes
aa_list_recent_updates()

# Top 5 text-to-image models
aa_list_media_models(modality="text-to-image", top_n=5)

# Submit CritPt benchmark results
aa_evaluate_critpt(
  submissions=[
    {
      "problem_id": "Challenge_1_main",
      "generated_code": "def solution(): return 42",
      "model": "example-model",
      "generation_config": {"temperature": 0}
    }
  ],
  batch_metadata={"run_id": "local-test"}
)

# Verify API connectivity
aa_healthcheck()

Development Checks

For development, run the release checks from a source checkout:

uv sync --dev
uv run pytest
uv run ruff check .
uv build
uv run twine check dist/*

Known Limitations

  • Free API tier: 1000 requests/day rate limit
  • No explicit "updated_at" field: Update detection relies on snapshot diffs, not API metadata
  • LLM data only for snapshots: Media model snapshot tracking is not yet implemented
  • CritPt completeness: The upstream evaluation API requires submissions for the full public problem set; this server validates object shape but cannot verify set completeness locally
  • No pagination: The free API returns all models in a single response; no cursor/offset support
  • Snapshot storage: Local filesystem only; no cloud sync

Attribution

<p> <img src="https://raw.githubusercontent.com/Leev1s/aa-mcp/main/assets/artificial-analysis-logo.svg" alt="Artificial Analysis" width="260"> </p>

This project uses data and benchmark resources from Artificial Analysis.

Attribution is required for all use of the Artificial Analysis free API. If you publish outputs, dashboards, reports, or derivative analysis using data returned by this MCP server, include attribution to artificialanalysis.ai.

CritPt benchmark evaluation data should also include attribution to the CritPt project.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选