C

Claude Octopus

by xiaolai · io.github.xiaolai/claude-octopus

Wraps the Claude Agent SDK as MCP servers, letting you spawn multiple specialized Claude Code agents — each with its own model, tools, system prompt, and personality — from any MCP client.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-xiaolai-claude-octopus": {
      "command": "npx",
      "args": [
        "-y",
        "claude-octopus"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<YOUR_VALUE>",
        "CLAUDE_TOOL_NAME": "claude_code",
        "CLAUDE_MODEL": "<VALUE>",
        "CLAUDE_PERMISSION_MODE": "default",
        "CLAUDE_ALLOWED_TOOLS": "all",
        "CLAUDE_APPEND_PROMPT": "<VALUE>",
        "CLAUDE_FACTORY_ONLY": "false",
        "CLAUDE_CWD": "process.cwd()",
        "CLAUDE_BETAS": "<VALUE>",
        "CLAUDE_EFFORT": "<VALUE>",
        "CLAUDE_PLUGINS": "<VALUE>",
        "CLAUDE_SETTINGS": "<VALUE>",
        "CLAUDE_MAX_TURNS": "<VALUE>",
        "CLAUDE_DESCRIPTION": "<VALUE>",
        "CLAUDE_MCP_SERVERS": "<VALUE>",
        "CLAUDE_SERVER_NAME": "claude-octopus",
        "CLAUDE_SYSTEM_PROMPT": "<VALUE>",
        "CLAUDE_MAX_BUDGET_USD": "<VALUE>",
        "CLAUDE_ADDITIONAL_DIRS": "<VALUE>",
        "CLAUDE_PERSIST_SESSION": "true",
        "CLAUDE_SETTING_SOURCES": "<VALUE>",
        "CLAUDE_CODE_OAUTH_TOKEN": "inherited from parent",
        "CLAUDE_DISALLOWED_TOOLS": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-xiaolai-claude-octopus": {
      "command": "npx",
      "args": [
        "-y",
        "claude-octopus"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<YOUR_VALUE>",
        "CLAUDE_TOOL_NAME": "claude_code",
        "CLAUDE_MODEL": "<VALUE>",
        "CLAUDE_PERMISSION_MODE": "default",
        "CLAUDE_ALLOWED_TOOLS": "all",
        "CLAUDE_APPEND_PROMPT": "<VALUE>",
        "CLAUDE_FACTORY_ONLY": "false",
        "CLAUDE_CWD": "process.cwd()",
        "CLAUDE_BETAS": "<VALUE>",
        "CLAUDE_EFFORT": "<VALUE>",
        "CLAUDE_PLUGINS": "<VALUE>",
        "CLAUDE_SETTINGS": "<VALUE>",
        "CLAUDE_MAX_TURNS": "<VALUE>",
        "CLAUDE_DESCRIPTION": "<VALUE>",
        "CLAUDE_MCP_SERVERS": "<VALUE>",
        "CLAUDE_SERVER_NAME": "claude-octopus",
        "CLAUDE_SYSTEM_PROMPT": "<VALUE>",
        "CLAUDE_MAX_BUDGET_USD": "<VALUE>",
        "CLAUDE_ADDITIONAL_DIRS": "<VALUE>",
        "CLAUDE_PERSIST_SESSION": "true",
        "CLAUDE_SETTING_SOURCES": "<VALUE>",
        "CLAUDE_CODE_OAUTH_TOKEN": "inherited from parent",
        "CLAUDE_DISALLOWED_TOOLS": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-xiaolai-claude-octopus": {
      "command": "npx",
      "args": [
        "-y",
        "claude-octopus"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<YOUR_VALUE>",
        "CLAUDE_TOOL_NAME": "claude_code",
        "CLAUDE_MODEL": "<VALUE>",
        "CLAUDE_PERMISSION_MODE": "default",
        "CLAUDE_ALLOWED_TOOLS": "all",
        "CLAUDE_APPEND_PROMPT": "<VALUE>",
        "CLAUDE_FACTORY_ONLY": "false",
        "CLAUDE_CWD": "process.cwd()",
        "CLAUDE_BETAS": "<VALUE>",
        "CLAUDE_EFFORT": "<VALUE>",
        "CLAUDE_PLUGINS": "<VALUE>",
        "CLAUDE_SETTINGS": "<VALUE>",
        "CLAUDE_MAX_TURNS": "<VALUE>",
        "CLAUDE_DESCRIPTION": "<VALUE>",
        "CLAUDE_MCP_SERVERS": "<VALUE>",
        "CLAUDE_SERVER_NAME": "claude-octopus",
        "CLAUDE_SYSTEM_PROMPT": "<VALUE>",
        "CLAUDE_MAX_BUDGET_USD": "<VALUE>",
        "CLAUDE_ADDITIONAL_DIRS": "<VALUE>",
        "CLAUDE_PERSIST_SESSION": "true",
        "CLAUDE_SETTING_SOURCES": "<VALUE>",
        "CLAUDE_CODE_OAUTH_TOKEN": "inherited from parent",
        "CLAUDE_DISALLOWED_TOOLS": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-xiaolai-claude-octopus": {
      "command": "npx",
      "args": [
        "-y",
        "claude-octopus"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<YOUR_VALUE>",
        "CLAUDE_TOOL_NAME": "claude_code",
        "CLAUDE_MODEL": "<VALUE>",
        "CLAUDE_PERMISSION_MODE": "default",
        "CLAUDE_ALLOWED_TOOLS": "all",
        "CLAUDE_APPEND_PROMPT": "<VALUE>",
        "CLAUDE_FACTORY_ONLY": "false",
        "CLAUDE_CWD": "process.cwd()",
        "CLAUDE_BETAS": "<VALUE>",
        "CLAUDE_EFFORT": "<VALUE>",
        "CLAUDE_PLUGINS": "<VALUE>",
        "CLAUDE_SETTINGS": "<VALUE>",
        "CLAUDE_MAX_TURNS": "<VALUE>",
        "CLAUDE_DESCRIPTION": "<VALUE>",
        "CLAUDE_MCP_SERVERS": "<VALUE>",
        "CLAUDE_SERVER_NAME": "claude-octopus",
        "CLAUDE_SYSTEM_PROMPT": "<VALUE>",
        "CLAUDE_MAX_BUDGET_USD": "<VALUE>",
        "CLAUDE_ADDITIONAL_DIRS": "<VALUE>",
        "CLAUDE_PERSIST_SESSION": "true",
        "CLAUDE_SETTING_SOURCES": "<VALUE>",
        "CLAUDE_CODE_OAUTH_TOKEN": "inherited from parent",
        "CLAUDE_DISALLOWED_TOOLS": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-xiaolai-claude-octopus": {
      "command": "npx",
      "args": [
        "-y",
        "claude-octopus"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<YOUR_VALUE>",
        "CLAUDE_TOOL_NAME": "claude_code",
        "CLAUDE_MODEL": "<VALUE>",
        "CLAUDE_PERMISSION_MODE": "default",
        "CLAUDE_ALLOWED_TOOLS": "all",
        "CLAUDE_APPEND_PROMPT": "<VALUE>",
        "CLAUDE_FACTORY_ONLY": "false",
        "CLAUDE_CWD": "process.cwd()",
        "CLAUDE_BETAS": "<VALUE>",
        "CLAUDE_EFFORT": "<VALUE>",
        "CLAUDE_PLUGINS": "<VALUE>",
        "CLAUDE_SETTINGS": "<VALUE>",
        "CLAUDE_MAX_TURNS": "<VALUE>",
        "CLAUDE_DESCRIPTION": "<VALUE>",
        "CLAUDE_MCP_SERVERS": "<VALUE>",
        "CLAUDE_SERVER_NAME": "claude-octopus",
        "CLAUDE_SYSTEM_PROMPT": "<VALUE>",
        "CLAUDE_MAX_BUDGET_USD": "<VALUE>",
        "CLAUDE_ADDITIONAL_DIRS": "<VALUE>",
        "CLAUDE_PERSIST_SESSION": "true",
        "CLAUDE_SETTING_SOURCES": "<VALUE>",
        "CLAUDE_CODE_OAUTH_TOKEN": "inherited from parent",
        "CLAUDE_DISALLOWED_TOOLS": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-xiaolai-claude-octopus": {
      "command": "npx",
      "args": [
        "-y",
        "claude-octopus"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<YOUR_VALUE>",
        "CLAUDE_TOOL_NAME": "claude_code",
        "CLAUDE_MODEL": "<VALUE>",
        "CLAUDE_PERMISSION_MODE": "default",
        "CLAUDE_ALLOWED_TOOLS": "all",
        "CLAUDE_APPEND_PROMPT": "<VALUE>",
        "CLAUDE_FACTORY_ONLY": "false",
        "CLAUDE_CWD": "process.cwd()",
        "CLAUDE_BETAS": "<VALUE>",
        "CLAUDE_EFFORT": "<VALUE>",
        "CLAUDE_PLUGINS": "<VALUE>",
        "CLAUDE_SETTINGS": "<VALUE>",
        "CLAUDE_MAX_TURNS": "<VALUE>",
        "CLAUDE_DESCRIPTION": "<VALUE>",
        "CLAUDE_MCP_SERVERS": "<VALUE>",
        "CLAUDE_SERVER_NAME": "claude-octopus",
        "CLAUDE_SYSTEM_PROMPT": "<VALUE>",
        "CLAUDE_MAX_BUDGET_USD": "<VALUE>",
        "CLAUDE_ADDITIONAL_DIRS": "<VALUE>",
        "CLAUDE_PERSIST_SESSION": "true",
        "CLAUDE_SETTING_SOURCES": "<VALUE>",
        "CLAUDE_CODE_OAUTH_TOKEN": "inherited from parent",
        "CLAUDE_DISALLOWED_TOOLS": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
ANTHROPIC_API_KEY secret No Anthropic API key for this agent Default: inherited from parent
CLAUDE_TOOL_NAME No Tool name prefix (`<name>` and `<name>_reply`) Default: claude_code
CLAUDE_MODEL No Model (`sonnet`, `opus`, `haiku`, or full ID)
CLAUDE_PERMISSION_MODE No Permission mode (`default`, `acceptEdits`, `bypassPermissions`, `plan`) Default: default
CLAUDE_ALLOWED_TOOLS No Comma-separated tool restriction (available tools) Default: all
CLAUDE_APPEND_PROMPT No Appended to the default prompt
CLAUDE_FACTORY_ONLY No Only expose the factory wizard tool Default: false
CLAUDE_CWD No Working directory Default: process.cwd()
CLAUDE_BETAS No Beta features (comma-separated)
CLAUDE_EFFORT No Thinking effort (`low`, `medium`, `high`, `max`)
CLAUDE_PLUGINS No Local plugin paths (comma-separated)
CLAUDE_SETTINGS No Path to settings JSON or inline JSON
CLAUDE_MAX_TURNS No Max conversation turns
CLAUDE_DESCRIPTION No Tool description shown to the host AI
CLAUDE_MCP_SERVERS No MCP servers for the inner agent (JSON)
CLAUDE_SERVER_NAME No MCP server name in protocol handshake Default: claude-octopus
CLAUDE_SYSTEM_PROMPT No Replaces the default Claude Code system prompt
CLAUDE_MAX_BUDGET_USD No Max spend per invocation
CLAUDE_ADDITIONAL_DIRS No Extra directories to grant access (comma-separated)
CLAUDE_PERSIST_SESSION No Enable session resume (`true`/`false`) Default: true
CLAUDE_SETTING_SOURCES No Settings to load: `user`, `project`, `local`
CLAUDE_CODE_OAUTH_TOKEN No Claude Code OAuth token for this agent Default: inherited from parent
CLAUDE_DISALLOWED_TOOLS No Comma-separated tool blacklist

Similar servers