Skip to main content

Official MCP server for ToolRate — drop native reliability scoring, LLM routing, and fallback chains into any Python-first MCP client.

Project description

toolrate-mcp

Official Python Model Context Protocol server for ToolRate — the reliability oracle for AI agents.

Python sibling of @toolrate/mcp-server. Same 9 tools, same guard pattern, different runtime — pick whichever your editor's MCP integration prefers.

  • toolrate_assess — reliability score, pitfalls, mitigations, and best alternatives for any third-party API.
  • toolrate_route_llm — picks the right LLM model+provider under your token budget across 7 providers (Anthropic, OpenAI, Groq, Together, Mistral, DeepSeek, Ollama).
  • toolrate_report — feed real outcomes back so scores stay accurate.
  • toolrate_fallback_chain — what real agents switch to when a tool fails.
  • toolrate_hidden_gems — underrated tools that excel as fallbacks.
  • toolrate_search_tools, toolrate_categories, toolrate_my_usage — browse the catalog and watch your quota.

Setup

You need a free ToolRate API key — get one at toolrate.ai, or call the bootstrap toolrate_register tool from any MCP client (only available when no key is configured yet).

The recommended runner is uv/uvx, which fetches and runs the package on demand with no permanent install — same story as npx for the TypeScript sibling.

Claude Code

claude mcp add toolrate --env TOOLRATE_API_KEY=nf_live_xxxxx -- uvx toolrate-mcp

Cursor — ~/.cursor/mcp.json

{
  "mcpServers": {
    "toolrate": {
      "command": "uvx",
      "args": ["toolrate-mcp"],
      "env": {
        "TOOLRATE_API_KEY": "nf_live_xxxxx"
      }
    }
  }
}

Zed — ~/.config/zed/settings.json

{
  "context_servers": {
    "toolrate": {
      "command": {
        "path": "uvx",
        "args": ["toolrate-mcp"],
        "env": { "TOOLRATE_API_KEY": "nf_live_xxxxx" }
      }
    }
  }
}

Other MCP clients

Anything that speaks MCP over stdio works the same way — point it at uvx toolrate-mcp (or python -m toolrate_mcp after a plain pip install toolrate-mcp) with TOOLRATE_API_KEY in env.

Tools

Tool What it does
toolrate_assess Rate a tool's reliability before calling. Returns a summary block + 20 detail fields.
toolrate_report Report success/failure after a tool call.
toolrate_route_llm Pick the best LLM model+provider under your budget.
toolrate_fallback_chain Get the best alternatives when a tool fails.
toolrate_hidden_gems Discover underrated tools by category.
toolrate_search_tools Search/browse the ToolRate catalog.
toolrate_categories List all canonical categories.
toolrate_my_usage Check your API key quota.
toolrate_register (Only when TOOLRATE_API_KEY is unset) Register a new key by email.

How agents should use this

Drop this into your agent's system prompt — see prompts/guard-pattern.md for the canonical version:

Before calling any third-party API tool, first call toolrate_assess with the tool's identifier (URL or canonical name). Read summary.reliability_score.

  • If score ≥ 70, proceed.
  • If score < 70 and top_alternatives has a fit, use the highest-scoring alternative.
  • If score < 40, surface the risk to the user before proceeding.

After every third-party API tool call, call toolrate_report with {tool_identifier, success, error_category?, latency_ms?}. This is how ToolRate learns.

When picking an LLM provider for a generation task, prefer toolrate_route_llm — it returns the routing fields directly.

Quota tips

  • Free tier is 100 assessments/day. ToolRate caches scores for ~5 min server-side so calling assess for the same tool twice in a row only costs one quota call.
  • Run toolrate_route_llm once per workflow and reuse the picked model — it costs 1 quota call per provider considered (up to 7).
  • Use toolrate_my_usage to self-throttle.

Environment variables

Variable Required Default Purpose
TOOLRATE_API_KEY Yes (except for toolrate_register) Your nf_live_… API key.
TOOLRATE_BASE_URL No https://api.toolrate.ai Override for staging/dev.

Development

git clone https://github.com/netvistamedia/toolrate
cd toolrate/mcp/python

python -m venv .venv
source .venv/bin/activate
pip install -e .

# Smoke test (verifies tool registration in both with-key and no-key modes)
python smoke.py

# Wire into Claude Code locally
claude mcp add toolrate-dev --env TOOLRATE_API_KEY=nf_live_xxxxx -- python -m toolrate_mcp

License

MIT — distinct from the ToolRate API server (BUSL-1.1). The MCP server is permissively licensed so any project can integrate it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toolrate_mcp-0.1.1.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toolrate_mcp-0.1.1-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file toolrate_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: toolrate_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for toolrate_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 23e9b335ea07a3f2794ff07aa7f6a58731d7eae745a6a1ea34e29efbdd80c422
MD5 fb777e5405ee775644b1f3e0497f72fc
BLAKE2b-256 5a8c4d952bba5da525902b093701396580b1f6e7a838c42c7ce5cab591744084

See more details on using hashes here.

File details

Details for the file toolrate_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: toolrate_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for toolrate_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a37664351073a725f458d8fd5bc8260860eb4289a08454d1193fb5fceeb53d92
MD5 e6a64188a22e8b7f726520d188a1c678
BLAKE2b-256 8c2a8a2b3fcf67c5c94f0830f58a03ec399bff4fd4e4282c564aeae47d365a49

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page