Installation
Setup RelayPlane MCP Server for Claude Code, Cursor, and other MCP clients.
Claude Code
Add RelayPlane to Claude Code with a single command:
1claude mcp add relayplane -- npx @relayplane/mcp-serverWith Options
1# Custom output directory for generated code2claude mcp add relayplane -- npx @relayplane/mcp-server --out-dir ./src/lib/relayplane34# With budget override (default is $5/day)5claude mcp add relayplane -- npx @relayplane/mcp-server --max-daily-cost 1067# Both options8claude mcp add relayplane -- npx @relayplane/mcp-server \9 --out-dir ./src/lib/relayplane \10 --max-daily-cost 10Cursor
Add to your Cursor MCP configuration file:
1{2 "mcpServers": {3 "relayplane": {4 "command": "npx",5 "args": ["@relayplane/mcp-server"],6 "env": {7 "OPENAI_API_KEY": "sk-...",8 "ANTHROPIC_API_KEY": "sk-ant-..."9 }10 }11 }12}Environment Variables
Set your provider API keys as environment variables:
1# Required: At least one provider key2export OPENAI_API_KEY=sk-...3export ANTHROPIC_API_KEY=sk-ant-...45# Optional: Additional providers6export GOOGLE_API_KEY=...7export XAI_API_KEY=...You only need keys for the providers you want to use. The server will automatically detect which providers are available.
CLI Flags
| Flag | Default | Description |
|---|---|---|
| --out-dir | ./servers/relayplane | Output directory for generated TypeScript code |
| --max-daily-cost | 5.00 | Daily provider cost limit in USD |
| --max-single-call-cost | 0.50 | Maximum cost per single call in USD |
| --max-calls-per-hour | 100 | Rate limit for API calls |
Config File
For persistent configuration, create ~/.relayplane/mcp-config.json:
1{2 "codegenOutDir": "./servers/relayplane",3 "maxDailyCostUsd": 5.00,4 "maxSingleCallCostUsd": 0.50,5 "maxCallsPerHour": 100,6 "providers": {7 "openai": { "apiKey": "${OPENAI_API_KEY}" },8 "anthropic": { "apiKey": "${ANTHROPIC_API_KEY}" }9 }10}Generated Code API
On startup, the MCP server generates TypeScript files your agent can import directly. This follows Anthropic's recommendation for agents to write code that orchestrates tools.
1npx @relayplane/mcp-server --out-dir ./src/lib/relayplaneFiles generated:
- •
index.ts— Main exports - •
run.ts— Single model calls - •
workflow.ts— Multi-step workflows - •
models.ts— Available models - •
skills.ts— Skill discovery
Agents can then import and use these directly:
1import { run, workflow, listModels } from './src/lib/relayplane'23// Single model call4const result = await run({5 model: 'openai:gpt-4o',6 prompt: 'Summarize this document...'7})89// Multi-step workflow10const workflowResult = await workflow({11 name: 'invoice-processor',12 steps: [13 { name: 'extract', model: 'openai:gpt-4o', prompt: '...' },14 { name: 'validate', model: 'anthropic:claude-3-5-sonnet', depends: ['extract'], prompt: '...' }15 ],16 input: { fileUrl: 'https://...' }17})Verify Installation
Test that the server is working by listing available models:
1# In Claude Code, ask:2"List all available RelayPlane models"34# The agent should call relay_models_list and show you the available modelsNext Steps
- Tools Reference — Learn about all 7 available tools
- Skills — Discover pre-built workflow patterns
- Budget & Limits — Configure safety limits