@agentutility/mcp-model-router
v0.1.1
Published
MCP server for the @agentutility model-router cluster — pay-per-call x402 tools, no API keys, USDC on Base.
Maintainers
Readme
@agentutility/mcp-model-router
Routing and cost checks for mixed model stacks.
Frontier probe for builders routing work across closed APIs, open-weight models, local agents, and self-hosted workflows. It starts with token-cost estimates, local-agent readiness checks, model-switch risk briefs, and workflow portability reports.
Pricing: pay-per-call in USDC on Base. No subscriptions, no API keys. See per-tool prices below.
Install — Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"agentutility-model-router": {
"command": "npx",
"args": ["-y", "@agentutility/mcp-model-router"],
"env": { "X402_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY_HEX" }
}
}
}Restart Claude Desktop. 2 tools appear in the tool palette.
Install — Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"agentutility-model-router": {
"command": "npx",
"args": ["-y", "@agentutility/mcp-model-router"],
"env": { "X402_PRIVATE_KEY": "0x..." }
}
}
}Funding
Send any amount of USDC on Base mainnet to the address derived from your X402_PRIVATE_KEY. The MCP server uses it to pay for tool calls automatically.
USDC on Base contract: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Tools (2)
| Tool | Description |
|---|---|
| llm-cost-estimate | (0.005 USDC/call) LLM cost estimate API and token cost calculator for comparing inference cost across models before you run a prompt. Send input_tokens and output_tokens (or raw text, auto-estimated at roughly 4 characters per token) plus a list of model names, and get a per-model price breakdown from a built-in snapshot price table, with the cheapest known model called out. Pass price_overrides to price your own negotiated rates or a model missing from the table instead of getting a guess. The table is stamped with an as_of date so you know how fresh the snapshot is. Use it as a token cost calculator, a model price compare tool, or a pre-flight budget check before an LLM run or agent workflow. |
| model-route-recommend | (0.01 USDC/call) Model routing API that answers 'which model should I use' from plain task requirements. Send a task description plus optional constraints (latency, budget, context length, modality) and get back a recommended model tier, 2-4 concrete candidate model names, the reasoning behind the pick, tradeoffs, and a cheaper fallback tier when quality can flex. Heuristic route recommendation grounded in general model-capability tiers, not a live benchmark or pricing feed, so candidate models come with a caveat to verify current pricing and capability before committing. Use it as a model selection API, an LLM routing advisor, or a pre-flight check before wiring a new task into an agent pipeline. |
How it works
- Agent calls a tool (e.g.
llm-cost-estimate). - MCP server POSTs to
https://x402.agentutility.ai/llm-cost-estimate. - The endpoint responds HTTP 402 with payment instructions.
- The MCP server signs an EIP-3009 USDC transfer authorization with
X402_PRIVATE_KEYand retries. - CDP facilitator settles on Base.
- The endpoint returns the actual response.
The agent never sees the payment flow — it just gets the result.
Links
- Cluster overview: https://agentutility.ai/model-router/
- All MCP packages: https://mcp.agentutility.ai/
- Source: https://github.com/rooz21/x402/tree/main/packages/mcp-model-router
Version: 0.1.1 · License: MIT
