Back to Browse

Sub Agents MCP Server

by Shinpr
Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

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

About

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

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (2 strong, 7 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (3/3 approved); 5 highly-trusted packages.

6 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

env_vars

Check that this permission is expected for this type of plugin.

file_system

Check that this permission is expected for this type of plugin.

Shell Command Execution

Runs commands on your machine. Be cautious — only use if you trust this plugin.

What You'll Need

Set these up before or after installing:

Absolute path to the directory containing agent definition files (.md or .txt)Optional

Environment variable: AGENTS_DIR

Type of AI CLI to use: 'cursor', 'claude', 'gemini', 'codex', 'command-code', 'glm', 'kimi', 'grok', 'antigravity', or 'opencode'Optional

Environment variable: AGENT_TYPE

Approval/sandbox level for sub-agents: 'read-only', 'safe-edit' (default), or 'yolo'Optional

Environment variable: AGENT_PERMISSION

Optional model override applied to every sub-agent execution by this MCP serverOptional

Environment variable: AGENT_MODEL

Optional backend-specific reasoning effort or model variant. Supported by codex, claude, command-code, glm, kimi, grok, antigravity, and opencode.Optional

Environment variable: AGENT_EFFORT

API key for cursor-agent authentication (used only when AGENT_TYPE=cursor; passed via env, never via CLI args)Required

Environment variable: CURSOR_API_KEY

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.Required

Environment variable: CLI_API_KEY

Agent execution timeout in milliseconds (default: 300000)Optional

Environment variable: EXECUTION_TIMEOUT_MS

Enable session management to maintain execution history across agent calls (default: false)Optional

Environment variable: SESSION_ENABLED

Directory path for storing session files (default: .mcp-sessions in current working directory)Optional

Environment variable: SESSION_DIR

Number of days to retain session history before automatic cleanup (default: 1)Optional

Environment variable: SESSION_RETENTION_DAYS

Path to CLI settings file/directory. Claude: --settings arg, Cursor: CURSOR_CONFIG_DIR, Codex: CODEX_HOME. GLM/Kimi/Gemini/Grok/Antigravity/OpenCode/Command Code not supported.Optional

Environment variable: AGENTS_SETTINGS_PATH

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-shinpr-sub-agents-mcp": {
      "env": {
        "AGENTS_DIR": "your-agents-dir-here",
        "AGENT_TYPE": "your-agent-type-here",
        "AGENT_MODEL": "your-agent-model-here",
        "CLI_API_KEY": "your-cli-api-key-here",
        "SESSION_DIR": "your-session-dir-here",
        "AGENT_EFFORT": "your-agent-effort-here",
        "CURSOR_API_KEY": "your-cursor-api-key-here",
        "SESSION_ENABLED": "your-session-enabled-here",
        "AGENT_PERMISSION": "your-agent-permission-here",
        "AGENTS_SETTINGS_PATH": "your-agents-settings-path-here",
        "EXECUTION_TIMEOUT_MS": "your-execution-timeout-ms-here",
        "SESSION_RETENTION_DAYS": "your-session-retention-days-here"
      },
      "args": [
        "-y",
        "sub-agents-mcp"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

Sub-Agents MCP Server

npm version License: MIT

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

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.

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

Reviews

No reviews yet

Be the first to review this server!