Skip to main content

Sub Agents MCP

io.github.shinpr/sub-agents-mcp

v0.15.1Updated Oct 22, 2026stdio · npm

MCP server for delegating tasks to specialized AI sub-agents across coding tools

Install

Replace 2 placeholders with your own values.

Run in your terminal. Replace 2 placeholders.

claude mcp add sub-agents-mcp -e 'AGENTS_DIR=<your-agents-dir>' -e 'AGENT_TYPE=<your-agent-type>' -- npx -y [email protected]

Configuration

12 settings.

  • AGENTS_DIR
    Env var· required
    Absolute path to the directory containing agent definition files (.md or .txt)
  • AGENT_TYPE
    Env var· required
    Type of AI CLI to use: 'cursor', 'claude', 'gemini', 'codex', 'command-code', 'glm', 'kimi', 'grok', 'antigravity', 'opencode', 'mcode', or 'pi'
  • CURSOR_API_KEY
    Env var· optional· secret
    API key for cursor-agent authentication (used only when AGENT_TYPE=cursor; passed via env, never via CLI args)
  • CLI_API_KEY
    Env var· optional· secret
    Provider API key for AGENT_TYPE=glm or kimi (passed to the claude binary via env, never via CLI args). Restart/reconnect the MCP server after changing it.
  • AGENT_PERMISSION
    Env var· optional
    Approval/sandbox level for sub-agents: 'read-only', 'safe-edit' (default), or 'yolo'
  • AGENT_MODEL
    Env var· optional
    Optional model override applied to every sub-agent execution by this MCP server
Show 6 more
  • AGENT_EFFORT
    Env var· optional
    Optional backend-specific reasoning effort or model variant. Supported by codex, claude, command-code, glm, kimi, grok, antigravity, opencode, mcode, and pi.
  • EXECUTION_TIMEOUT_MS
    Env var· optional
    Agent execution timeout in milliseconds, as a positive whole number (default: 300000). The server refuses to start on an invalid value such as "5min".
  • SESSION_ENABLED
    Env var· optional
    Enable session management to maintain execution history across agent calls (default: false)
  • SESSION_DIR
    Env var· optional
    Directory path for storing session files (default: .mcp-sessions in current working directory)
  • SESSION_RETENTION_DAYS
    Env var· optional
    Number of days to retain session history before automatic cleanup (default: 1)
  • AGENTS_SETTINGS_PATH
    Env var· optional
    Path to CLI settings file/directory. Claude: --settings arg, Cursor: CURSOR_CONFIG_DIR, Codex: CODEX_HOME. GLM/Kimi/Gemini/Grok/Antigravity/OpenCode/Command Code/MiniMax Code/Pi not supported.

Listed in the official MCP Registry since Oct 22, 2026. Mirrored daily; last checked Nov 26, 2026.