Skip to main content
Glama

RelayPlane MCP Server

Reduce AI context usage by 90%+ in multi-step workflows

RelayPlane keeps intermediate results in the workflow engine instead of passing them through your context window—saving tokens and reducing costs.

Table of Contents


Related MCP server: Shared Memory MCP Server

Quick Start

claude mcp add relayplane \
  -e OPENAI_API_KEY=sk-... \
  -e ANTHROPIC_API_KEY=sk-ant-... \
  -- npx @relayplane/mcp-server

2. Restart Claude Code

Important: You must fully restart Claude Code after adding the MCP server. The /mcp command only reconnects—it doesn't reload environment variables.

3. Test the Connection

Ask Claude: "Use relay_models_list to show configured providers"

Models should show configured: true for providers with valid API keys.


Installation Options

Option A: Inline API Keys (Simplest)

claude mcp add relayplane \
  -e OPENAI_API_KEY=sk-proj-... \
  -e ANTHROPIC_API_KEY=sk-ant-... \
  -e GOOGLE_API_KEY=AIza... \
  -e XAI_API_KEY=xai-... \
  -- npx @relayplane/mcp-server

Option B: Shell Environment Variables

First, add to your shell profile (~/.zshrc or ~/.bashrc):

export OPENAI_API_KEY=sk-proj-...
export ANTHROPIC_API_KEY=sk-ant-...
export GOOGLE_API_KEY=AIza...
export XAI_API_KEY=xai-...

Then source and install:

source ~/.zshrc
claude mcp add relayplane -- npx @relayplane/mcp-server

Option C: Manual Configuration

Edit ~/.claude.json directly:

{
  "projects": {
    "/your/project/path": {
      "mcpServers": {
        "relayplane": {
          "type": "stdio",
          "command": "npx",
          "args": ["@relayplane/mcp-server"],
          "env": {
            "OPENAI_API_KEY": "sk-proj-...",
            "ANTHROPIC_API_KEY": "sk-ant-...",
            "GOOGLE_API_KEY": "AIza...",
            "XAI_API_KEY": "xai-..."
          }
        }
      }
    }
  }
}

Warning: The env field must contain actual API keys, not variable references like ${OPENAI_API_KEY}. Variable substitution is not supported in the MCP config file.


Model IDs

Important: Always check https://relayplane.com/docs/providers for the latest model IDs. The relay_models_list tool may return outdated information.

OpenAI — prefix: openai:

Model ID

Best For

gpt-5.2

Latest flagship, 1M context

gpt-5-mini

Cost-efficient, fast

gpt-5-nano

Ultra-fast, minimal cost

o3-mini

Reasoning tasks

Anthropic — prefix: anthropic:

Model ID

Best For

claude-opus-4-5-20251101

Most intelligent, complex tasks

claude-sonnet-4-5-20250929

Best coding, strongest for agents

claude-haiku-4-5-20251001

Fast, high-volume tasks

claude-3-5-haiku-20241022

Fast, affordable (legacy)

Google — prefix: google:

Model ID

Best For

gemini-3-pro

Most powerful multimodal

gemini-3-flash

Fast multimodal

gemini-2.5-flash

Cost-effective

xAI — prefix: xai:

Model ID

Best For

grok-beta

Latest flagship, 256K context

Example Usage

{
  "name": "my-step",
  "model": "openai:gpt-5.2",
  "prompt": "Analyze this data..."
}

Available Tools

Tool

Purpose

Cost

relay_run

Single prompt execution

Per-token

relay_workflow_run

Multi-step orchestration

Per-token

relay_workflow_validate

Validate DAG structure

Free

relay_skills_list

List pre-built patterns

Free

relay_models_list

List available models

Free

relay_runs_list

View recent runs

Free

relay_run_get

Get run details

Free


Budget Protection

Default safeguards (customizable via CLI flags):

Limit

Default

Flag

Daily spending

$5.00

--max-daily-cost

Per-call cost

$0.50

--max-single-call-cost

Hourly requests

100

--max-calls-per-hour

RelayPlane is BYOK (Bring Your Own Keys)—we don't charge for API usage. Costs reflect only your provider bills.


Pre-built Skills

Use relay_skills_list to see available workflow templates:

Skill

Context Reduction

Use Case

invoice-processor

97%

Extract, validate, summarize invoices

content-pipeline

90%

Generate and refine content

lead-enrichment

80%

Enrich contact data


Configuration

Persistent Config File

Create ~/.relayplane/mcp-config.json:

{
  "codegenOutDir": "./servers/relayplane",
  "maxDailyCostUsd": 10.00,
  "maxSingleCallCostUsd": 1.00,
  "maxCallsPerHour": 200
}

Note: API keys should be passed via environment variables or the Claude Code MCP env field—not stored in this config file.


Troubleshooting

"Provider not configured" Error

Provider "openai" (step "extract") is not configured.
Set OPENAI_API_KEY environment variable.

Causes:

  1. API key not passed to MCP server

  2. Claude Code not restarted after config change

Solutions:

  1. Check your MCP config in ~/.claude.json:

"relayplane": {
  "env": {
    "OPENAI_API_KEY": "sk-..."  // Must be actual key, not ${VAR}
  }
}
  1. Fully restart Claude Code (exit with Ctrl+C, relaunch)

  2. Verify configuration: Ask Claude: "Use relay_models_list and check which show configured: true"


Model Not Found (404 Error)

Anthropic API error: 404 - model: claude-3-5-sonnet-20241022

Cause: Model ID is outdated or incorrect.

Solution: Check current model IDs at: https://relayplane.com/docs/providers

Common fixes:

  • Use claude-sonnet-4-5-20250929 for latest Claude Sonnet

  • Use gpt-5.2 for latest OpenAI flagship model


Config Changes Not Taking Effect

Cause: /mcp reconnect doesn't reload environment variables.

Solution: Fully restart Claude Code:

  1. Exit with Ctrl+C

  2. Relaunch claude

  3. Run /mcp to verify connection


Workflow Validation Passes But Execution Fails

Cause: relay_workflow_validate only checks DAG structure, not:

  • API key validity

  • Model availability

  • Schema compatibility

Solution: Test with a simple relay_run first:

Use relay_run with model "openai:gpt-5.2" and prompt "Say hello"

Quick Test

After setup, verify everything works:

Use relay_workflow_run to create an invoice processor:
- Step 1 (extract): Use openai:gpt-5.2 to extract vendor, total from invoice
- Step 2 (validate): Use anthropic:claude-haiku-4-5-20251001 to verify math

Input: "Invoice from Acme Corp, Total: $500"

Expected: Both steps complete successfully with structured output.


Support


License

MIT

Available Tools

7 tools
relay_models_listA

List available AI models with capabilities and pricing. Use to check valid model IDs before testing. Cost shows provider pricing (OpenAI/Anthropic) - RelayPlane is BYOK, we don't charge for API usage.

Inputs: provider.

relay_runA

Execute a single AI model call. Useful for testing prompts before building full workflows. Returns output, token usage, estimated provider cost, and trace URL. Note: Cost tracks your provider bill (OpenAI/Anthropic), not RelayPlane fees - we're BYOK.

Inputs: model (required), prompt (required), systemPrompt, schema.

relay_run_getB

Get full details of a specific run including all step outputs and trace URL.

Inputs: runId (required).

relay_runs_listC

List recent workflow runs for debugging and reference.

Inputs: limit.

relay_skills_listA

List available pre-built workflow skills. Skills are reusable patterns for common tasks (invoice processing, content pipelines, etc.). Returns skill names, descriptions, context reduction metrics, and usage examples.

Inputs: category.

relay_workflow_runA

Execute a multi-step AI workflow. Intermediate results stay in the workflow engine (not your context), providing 90%+ context reduction on complex pipelines. Use for any task requiring multiple model calls or tool integrations. Cost tracks your provider bills, not RelayPlane fees - we're BYOK.

Inputs: name (required), steps (required), input (required).

relay_workflow_validateA

Validate workflow structure without making any LLM calls (free). Checks DAG structure (no cycles), dependency references, and model ID format. Does NOT validate schema compatibility between steps or prompt effectiveness - use relay_workflow_run for full validation.

Inputs: steps (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap. For example, relay_models_list lists models, relay_run executes a single call, relay_workflow_run executes multi-step workflows, and relay_workflow_validate validates structure without execution. The descriptions reinforce these boundaries, making misselection unlikely.

    Naming Consistency5/5

    All tools follow a consistent 'relay_' prefix with snake_case naming, using clear verb-noun combinations like list, run, get, and validate. This predictable pattern enhances readability and agent usability across the entire set.

    Tool Count5/5

    With 7 tools, the set is well-scoped for the AI workflow domain, covering core operations from listing resources to executing and validating runs. Each tool earns its place without feeling excessive or insufficient for the server's purpose.

    Completeness4/5

    The tool surface provides strong coverage for AI workflow management, including listing, executing, retrieving, and validating runs and models. A minor gap exists in direct update or deletion operations for workflows or runs, but agents can work around this by re-executing or managing externally.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers