This MCP server allows users to define and execute task-specific AI agents in markdown files across various MCP-compatible tools. It enables the portability of Claude Code-style sub-agent workflows.
From the registry: MCP server for delegating tasks to specialized AI assistants in Cursor, Claude, and Gemini
Please install the `sub-agents-mcp` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Node.js 22+** — Node.js version 22 or newer required Run: `node -v` (https://nodejs.org/)
- **Execution engine** — One of: cursor-agent CLI, claude CLI (Claude Code), gemini CLI, or codex CLI
- **Agent definition files** — Create a folder with .md or .txt files defining your agents
Canonical MCP server config (stdio transport):
- command: `npx`
- args: ["-y","sub-agents-mcp"]
- required environment variables:
- `AGENTS_DIR`: Absolute path to folder containing agent .md/.txt definition files (example: `/absolute/path/to/agents`)
- `AGENT_TYPE`: Execution engine: cursor, claude, gemini, or codex (example: `claude`)
- optional environment variables:
- `EXECUTION_TIMEOUT_MS`: Agent execution timeout in milliseconds (default 5 min, max 10 min) (example: `300000`)
- `SESSION_ENABLED`: Enable session management for context persistence across calls (example: `true`)
- `SESSION_DIR`: Absolute path to session storage directory (example: `/absolute/path/to/sessions`)
- `AGENTS_SETTINGS_PATH`: Custom CLI settings directory for sub-agents (prevents recursive loops) (example: `/absolute/path/to/sub-agent-settings`)
Note: Brings Claude Code sub-agent workflows to any MCP client. Agent definitions are markdown files in AGENTS_DIR. Supports cursor, claude, gemini, and codex backends.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.AGENTS_DIRrequiredPath to your agents folder. Must be absolute.AGENT_TYPErequiredWhich execution engine to use: 'cursor', 'claude', 'gemini', or 'codex'.AI Agents Framework with Self Reflection and MCP support