@restormel/mcp
v0.1.7
Published
MCP tool definitions for Restormel — models, providers, cost, routing, entitlements, and docs.
Maintainers
Readme
@restormel/mcp
Model Context Protocol tools for Restormel Keys: model catalog, cost estimates, routing explain, provider validation, entitlements, integration scaffolds, and offline docs search.
Install
pnpm add @restormel/mcp @restormel/keys
# or
npm install @restormel/mcp @restormel/keys@restormel/keys is required at runtime for catalog, pricing, and validation logic.
Run the stdio server (Cursor, Claude Desktop, Codex, …)
After install, point your MCP client at the published binary:
{
"mcpServers": {
"restormel": {
"command": "pnpm",
"args": ["exec", "restormel-mcp"],
"env": {}
}
}
}Or with npx (from a project that depends on @restormel/mcp):
{
"mcpServers": {
"restormel": {
"command": "npx",
"args": ["--no-install", "restormel-mcp"]
}
}
}Global install:
npm i -g @restormel/mcp @restormel/keys
restormel-mcpImportant: The server speaks MCP on stdout. Do not enable tools that print to stdout. Diagnostics use stderr only.
Publish / npm login: Publishing requires a logged-in npm user with access to the @restormel scope. If npm whoami returns 401, run npm login (or set a valid NPM_TOKEN) before pnpm publish. A misleading 404 on PUT …/@restormel%2fmcp often means missing auth or no permission to create the package under the org.
Environment variables
| Variable | Purpose |
|----------|---------|
| RESTORMEL_MCP_CONFIG | Optional path to JSON KeysConfig for local entitlement rules (see @restormel/keys). |
| RESTORMEL_MCP_<PROVIDER>_KEY | Override API key for providers.validate (e.g. RESTORMEL_MCP_OPENAI_KEY). Use underscores for hyphenated provider ids (RESTORMEL_MCP_AZURE_OPENAI_KEY). |
| OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, … | Conventional names also accepted for validation. |
| RESTORMEL_EVALUATE_URL | Optional full URL to POST policy evaluation (e.g. dashboard .../api/policies/evaluate). |
| RESTORMEL_GATEWAY_KEY | Bearer token for that endpoint (never log this value). |
If RESTORMEL_EVALUATE_URL and RESTORMEL_GATEWAY_KEY are both set, entitlements.check calls the remote endpoint with { modelId: <feature> }. Otherwise it uses local rules from RESTORMEL_MCP_CONFIG or a permissive default.
Programmatic use
Embed the same tool surface in your own host:
import { createRestormelMcpServer } from "@restormel/mcp/server";
// or: import { createRestormelMcpServer } from "@restormel/mcp";
const server = createRestormelMcpServer();
// connect your transport (stdio, HTTP, etc.) per @modelcontextprotocol/sdkTool schemas (JSON)
For clients that only need JSON Schema metadata:
import { ALL_TOOLS } from "@restormel/mcp";Security
- Do not commit real API keys or gateway keys.
- This package does not log raw credentials. Errors are generic when validation or HTTP calls fail.
See repo docs/security-baseline.md for the full baseline.
