MCP

The Restormel MCP package exposes tools that agents and IDEs can call via the Model Context Protocol. Use these tools to query models, estimate costs, explain routing, and more — directly from your agent workflow.

Runtime server

@restormel/mcp ships a stdio MCP server you run locally (Cursor, Claude Desktop, Codex, etc.). Install the package, then point your client at pnpm exec restormel-mcp or npx restormel-mcp. See the package README for env vars and security notes.

Available tools

ToolDescription
models.listList available models across configured providers
providers.validateValidate provider configuration and access
cost.estimateEstimate cost for a model and token volume
routing.explainExplain routing decisions for a given request
entitlements.checkCheck plan entitlements and feature access
integration.generateGenerate integration configuration for a stack
docs.searchSearch Restormel documentation

How MCP maps to Restormel Keys

MCP exposes Restormel’s core building blocks to agent workflows. These tools correspond to the same primitives you can inspect with the CLI and validate with Doctor/Validate.

  • `models.list` — same model inventory as `keys models list`.
  • `providers.validate` — same credential health check as `keys validate`.
  • `cost.estimate` — same pricing lookup as `keys estimate`.
  • `routing.explain` — same static provider resolution as `keys routing explain` (policies require a configured project).
  • `entitlements.check` — policy checks (local rules via `RESTORMEL_MCP_CONFIG` or remote evaluation via `RESTORMEL_EVALUATE_URL` + `RESTORMEL_GATEWAY_KEY`).
  • `integration.generate` — scaffolding helper for a new integration.
  • `docs.search` — offline documentation index search.

Package

Tool schemas and server factory are exported from @restormel/mcp:

import { ALL_TOOLS, createRestormelMcpServer } from "@restormel/mcp";
// or: import { createRestormelMcpServer } from "@restormel/mcp/server";

Programmatic hosts can call createRestormelMcpServer() and attach their own transport from @modelcontextprotocol/sdk.

Next steps