MCP Server Setup

Connect your AI coding assistant to RaidFrame for natural language infrastructure management.

Overview

RaidFrame provides an official MCP (Model Context Protocol) server that lets AI coding assistants like Claude Code, Cursor, and Windsurf manage your infrastructure directly. Deploy, scale, debug, and monitor — all through natural language.

Install the MCP Server

npm install -g @raidframe/mcp

Or with the RaidFrame CLI:

rf mcp install

Configure Your AI Client

Claude Code

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "raidframe": {
      "command": "raidframe-mcp",
      "env": {
        "RAIDFRAME_TOKEN": "rf_tok_your_token_here"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "raidframe": {
      "command": "raidframe-mcp",
      "env": {
        "RAIDFRAME_TOKEN": "rf_tok_your_token_here"
      }
    }
  }
}

Windsurf

Add to Windsurf MCP configuration:

{
  "mcpServers": {
    "raidframe": {
      "command": "raidframe-mcp",
      "env": {
        "RAIDFRAME_TOKEN": "rf_tok_your_token_here"
      }
    }
  }
}

Generate an API Token

rf auth token create --name "MCP Server" --scope full
✓ Token created: rf_tok_a8f3b2c1d4e5...
  Store this in your MCP configuration.

For tighter security, scope the token:

rf auth token create --name "MCP Read Only" --scope logs:read,metrics:read,services:read,deployments:read
rf auth token create --name "MCP Deploy" --scope deploy,logs:read,env:read

Verify Connection

Once configured, ask your AI assistant:

"What services are running on RaidFrame?"

It should respond with your project's services, their status, and instance counts.

What You Can Do

Once connected, you can manage your entire infrastructure through natural language:

You sayWhat happens
"Deploy my app"Triggers rf deploy
"Show me the logs from the last hour"Fetches logs with rf logs --since 1h
"Add a Postgres database"Runs rf add postgres
"Scale the API to 5 instances"Runs rf services scale api --min 5
"What's the error rate right now?"Fetches metrics
"Roll back to the previous version"Runs rf deployments rollback
"Set the API key env var"Runs rf env set
"Why is my app slow?"Checks metrics, logs, and traces — suggests fixes
"Show me the database schema"Connects and queries information_schema
"Run my database migrations"Runs rf exec web "npx prisma migrate deploy"

Security

The MCP server runs locally on your machine. It communicates with the RaidFrame API using your token. No data is sent to third parties.

  • Token scope — limit what the MCP server can do by scoping the token
  • Audit trail — all MCP actions appear in your audit log as the token owner
  • Read-only mode — use a read-only token for monitoring without modification rights

Context Awareness

The MCP server automatically detects your project context from:

  1. raidframe.yaml in the current directory
  2. .raidframe/project link file
  3. The RAIDFRAME_PROJECT environment variable

This means your AI assistant knows which project you're working on and scopes all operations to that project.