io.github.shinpr/sub-agents-mcp

Registre officiel Outils de développement

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

Que pouvez-vous faire avec io.github.shinpr/sub-agents-mcp ?

  • Delegate code review, test writing, investigation, and documentation to focused agents
  • Reuse the same agent definitions across MCP clients with one shared backend and model configuration
  • Continue the same agent across multiple calls for longer work

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package sub-agents-mcp
Claude Code
claude mcp add sub-agents-mcp -e 'AGENTS_DIR=<AGENTS_DIR>' -e 'AGENT_TYPE=<AGENT_TYPE>' -e 'AGENT_PERMISSION=<AGENT_PERMISSION>' -e 'AGENT_MODEL=<AGENT_MODEL>' -e 'AGENT_EFFORT=<AGENT_EFFORT>' -e 'CURSOR_API_KEY=<your cursor_api_key>' -e 'CLI_API_KEY=<your cli_api_key>' -e 'EXECUTION_TIMEOUT_MS=<EXECUTION_TIMEOUT_MS>' -e 'SESSION_ENABLED=<SESSION_ENABLED>' -e 'SESSION_DIR=<SESSION_DIR>' -e 'SESSION_RETENTION_DAYS=<SESSION_RETENTION_DAYS>' -e 'AGENTS_SETTINGS_PATH=<AGENTS_SETTINGS_PATH>' -- npx -y sub-agents-mcp@0.15.1
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "sub-agents-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "sub-agents-mcp@0.15.1"
            ],
            "env": {
                "AGENTS_DIR": "<AGENTS_DIR>",
                "AGENT_TYPE": "<AGENT_TYPE>",
                "AGENT_PERMISSION": "<AGENT_PERMISSION>",
                "AGENT_MODEL": "<AGENT_MODEL>",
                "AGENT_EFFORT": "<AGENT_EFFORT>",
                "CURSOR_API_KEY": "<your cursor_api_key>",
                "CLI_API_KEY": "<your cli_api_key>",
                "EXECUTION_TIMEOUT_MS": "<EXECUTION_TIMEOUT_MS>",
                "SESSION_ENABLED": "<SESSION_ENABLED>",
                "SESSION_DIR": "<SESSION_DIR>",
                "SESSION_RETENTION_DAYS": "<SESSION_RETENTION_DAYS>",
                "AGENTS_SETTINGS_PATH": "<AGENTS_SETTINGS_PATH>"
            }
        }
    }
}

Variables d'environnement

  • AGENTS_DIR obligatoire Absolute path to the directory containing agent definition files (.md or .txt)
  • AGENT_TYPE obligatoire Type of AI CLI to use: 'cursor', 'claude', 'gemini', 'codex', 'command-code', 'glm', 'kimi', 'grok', 'antigravity', 'opencode', 'mcode', or 'pi'
  • AGENT_PERMISSION Approval/sandbox level for sub-agents: 'read-only', 'safe-edit' (default), or 'yolo'
  • AGENT_MODEL Optional model override applied to every sub-agent execution by this MCP server
  • AGENT_EFFORT Optional backend-specific reasoning effort or model variant. Supported by codex, claude, command-code, glm, kimi, grok, antigravity, opencode, mcode, and pi.
  • CURSOR_API_KEY secret API key for cursor-agent authentication (used only when AGENT_TYPE=cursor; passed via env, never via CLI args)
  • CLI_API_KEY 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.
  • EXECUTION_TIMEOUT_MS 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 Enable session management to maintain execution history across agent calls (default: false)
  • SESSION_DIR Directory path for storing session files (default: .mcp-sessions in current working directory)
  • SESSION_RETENTION_DAYS Number of days to retain session history before automatic cleanup (default: 1)
  • AGENTS_SETTINGS_PATH 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.

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. Sub-Agents MCP Server
  2. What You Can Do
  3. Quick Start
  4. Examples
  5. When the MCP Server Fits
  6. Supported Backends
  7. Shared Agent Settings
  8. Continue Work Across Calls
  9. If It Does Not Start
  10. License

Sub-Agents MCP Server

Run reusable coding agents from any MCP-compatible client.

Write a reviewer, test writer, or investigator in Markdown, then ask your assistant to use it. The MCP server runs that agent with the coding CLI you choose and returns the result to the same conversation.

What You Can Do

  • Delegate code review, test writing, investigation, and documentation to focused agents
  • Reuse the same agent definitions across MCP clients with one shared backend and model configuration
  • Continue the same agent across multiple calls for longer work

Quick Start

You need Node.js 22 or later, an MCP-compatible client, and one supported coding CLI installed and signed in. This example uses Codex.

1. Create an Agent

Create an agents folder anywhere on your machine, then add code-reviewer.md:

# Code Reviewer

Review code for bugs and maintainability issues.

## Task

- Find concrete problems in the requested changes
- Explain why each problem matters
- Point to the affected code

## Done When

- All requested files have been reviewed
- Findings include evidence and suggested next steps

The filename becomes the agent name: code-reviewer.md becomes code-reviewer.

2. Add the MCP Server

Add the server to your client's MCP configuration. Replace AGENTS_DIR with the absolute path to the folder you created.

{
  "mcpServers": {
    "sub-agents": {
      "command": "npx",
      "args": ["-y", "sub-agents-mcp"],
      "env": {
        "AGENTS_DIR": "/absolute/path/to/agents",
        "AGENT_TYPE": "codex"
      }
    }
  }
}

Restart or reconnect your MCP client after saving the configuration.

3. Run the Agent

Ask your assistant:

Use the code-reviewer agent to review the authentication changes.

Your assistant runs the agent with Codex and returns the review to the conversation.

Examples

Use the test-writer agent to add unit tests for the auth module.
Use the bug-investigator agent to find the cause of the failed checkout requests.
Use the doc-writer agent to document the public API changes.

Name both the agent and the work you want it to do.

When the MCP Server Fits

Use the MCP server when you want to share the same agents across MCP clients while keeping backend and model configuration in one place.

If you prefer a lighter installation or want each agent to choose its own backend and model, see Sub-Agents Skills.

Supported Backends

Set AGENT_TYPE to the backend you already use:

AGENT_TYPEBackendCommand
codexCodexcodex
claudeClaude Codeclaude
cursorCursor CLIcursor-agent
command-codeCommand Codecommand-code
glmGLM (Z.ai)claude
kimiKimiclaude
grokGrok Buildgrok
antigravityGoogle Antigravityagy 1.1.12+
geminiGemini CLI (compatibility)gemini
opencodeOpenCodeopencode
mcodeMiniMax Codemcode
piPipi

The selected CLI must be installed and configured before the MCP server starts.

GLM and Kimi require CLI_API_KEY in the MCP server environment. Other backends use the CLI's existing authentication.

For Google models, prefer Antigravity. Gemini CLI remains available for existing enterprise, API key, or Vertex AI configurations.

Shared Agent Settings

Set AGENT_MODEL to use one model for every agent. Omit it to use the backend's default.

AGENT_PERMISSION controls what agents may do:

  • read-only — review and investigation
  • safe-edit — edits allowed without approval (default)
  • yolo — unrestricted execution

If an agent reports that an action was blocked, choose a less restrictive mode.

How strictly each level is enforced depends on the backend, so treat it as guidance rather than a security boundary.

Continue Work Across Calls

Set SESSION_ENABLED to "true" when you want an agent to remember earlier calls and continue a longer task. Your assistant must reuse the returned session_id on the next call to continue that session.

If It Does Not Start

  • Run the selected backend command directly and confirm that it is installed and signed in
  • Make sure AGENTS_DIR is an absolute path and contains at least one .md or .txt file
  • Restart or reconnect the MCP client after changing its configuration

License

MIT

Questions fréquentes

Qu'est-ce que io.github.shinpr/sub-agents-mcp ?

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

Comment installer io.github.shinpr/sub-agents-mcp ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add sub-agents-mcp -e 'AGENTS_DIR=<AGENTS_DIR>' -e 'AGENT_TYPE=<AGENT_TYPE>' -e 'AGENT_PERMISSION=<AGENT_PERMISSION>' -e 'AGENT_MODEL=<AGENT_MODEL>' -e 'AGENT_EFFORT=<AGENT_EFFORT>' -e 'CURSOR_API_KEY=<your cursor_api_key>' -e 'CLI_API_KEY=<your cli_api_key>' -e 'EXECUTION_TIMEOUT_MS=<EXECUTION_TIMEOUT_MS>' -e 'SESSION_ENABLED=<SESSION_ENABLED>' -e 'SESSION_DIR=<SESSION_DIR>' -e 'SESSION_RETENTION_DAYS=<SESSION_RETENTION_DAYS>' -e 'AGENTS_SETTINGS_PATH=<AGENTS_SETTINGS_PATH>' -- npx -y sub-agents-mcp@0.15.1. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour io.github.shinpr/sub-agents-mcp ?

Oui. Il attend AGENTS_DIR, AGENT_TYPE, CURSOR_API_KEY, CLI_API_KEY, à renseigner dans sa configuration.

io.github.shinpr/sub-agents-mcp est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient io.github.shinpr/sub-agents-mcp ?

Il est publié par shinpr. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.