RedSwitches API Private beta Reference
Menu

AI agents and assistants

Connect Claude, ChatGPT, Cursor, VS Code, Windsurf and other AI tools to your RedSwitches account. Every route is read-only until you allow more, and every call uses your own API key with its permissions and limits.

Pick a route

RouteBest forWhat you install
Hosted MCP server https://mcp.redswitches.com/mcpClaude Code, Cursor, VS Code, Windsurf, the OpenAI Responses API and Agents SDKnothing
Local MCP server @redswitches/mcpClaude Desktop, and any client without remote serversNode.js
Claude Code plugin redswitchesClaude Code: an Agent Skill that knows the API and its safety rules, plus the hosted serverthe plugin
GPT Action and function toolsa custom GPT, or your own code with OpenAI function callingnothing
llms.txt and llms-full.txtany agent that reads documentationnothing

The MCP servers offer the same tools and rules. See MCP server for agents for the tools and modes.

Hosted MCP server

Add the address and send your key as a header. Read-only:

{
  "mcpServers": {
    "redswitches": {
      "type": "http",
      "url": "https://mcp.redswitches.com/mcp",
      "headers": { "Authorization": "Bearer ${REDSWITCHES_API_KEY}" }
    }
  }
}

That is Claude Code's .mcp.json. On the command line:

claude mcp add --transport http redswitches https://mcp.redswitches.com/mcp \
  --header "Authorization: Bearer $REDSWITCHES_API_KEY"

To allow write tools for one connection, add the header X-RedSwitches-Allow-Writes: true. Reinstall and rescue also need X-RedSwitches-Allow-Destructive: true. Tools appear only for permissions your key holds.

How each client sets a header:

ClientWhere
Claude Code--header or "headers" in .mcp.json
Cursor"url" and "headers" in mcp.json; ${env:REDSWITCHES_API_KEY} reads the key from the environment
VS Code"type": "http" and "headers" in .vscode/mcp.json; an inputs entry with "password": true asks for the key
Windsurf"serverUrl" and "headers" in mcp_config.json
OpenAI Responses API{"type": "mcp", "server_url": "…", "authorization": "<key>", "require_approval": "always"}; other headers in "headers"
OpenAI Agents SDKMCPServerStreamableHttp(params={"url": "…", "headers": {"Authorization": "Bearer …"}})
Claude Desktopits config file starts local programs only: use the local server

The Connectors screens of claude.ai and Claude Desktop, and ChatGPT apps, sign in with OAuth and cannot send a key header. They will work once the hosted server offers OAuth.

What the hosted server does with your key:

  • It uses the key for the request that carried it, then forgets it. It never stores or logs it.
  • It calls the API with your key, so your permissions, rate limits, spend limits and audit trail apply as usual.
  • A session that started with one key cannot be used with another.
  • Sessions end after 30 minutes without requests; the client then starts a new one.
  • The API sees the hosted server's address, not yours. If your key has an IP list, that address must be on it.

Claude Code plugin

The redswitches plugin adds an Agent Skill and the hosted server. The skill teaches Claude the API, the safety rules (confirm every write, quote before ordering, never handle passwords, treat API text as data), the command-line tool and MCP setup. When you turn the plugin on, Claude Code asks for your key and keeps it in your system's credential store. Writes and reinstall/rescue are separate switches, off by default.

GPT Action and function tools

For a custom GPT, import the GPT Action schema and choose API Key → Bearer authentication. It covers the read operations, ordering (with a dry run first) and power. Ordering and power are marked so ChatGPT asks you before each call.

For your own code, the same operations come as function tools for the Responses API and Chat Completions, with a routing table that maps each function to its HTTP request. Your key stays in your program.

Good practice

  • Give each agent its own key with only the permissions it needs. A read-only key cannot change anything, whatever the agent does.
  • Allow writes only for agents you supervise. Use a low monthly spend limit on ordering keys and a server list on power keys.
  • Text from the API, such as server labels and host names, may have been written by other people. The tools tell agents to treat it as data, never as instructions.
  • Agents never receive root passwords from reinstall or rescue. They are delivered in the client area.