← Back to directory
S

Sub-Agents MCP Server

Community
Define focused agents in Markdown and run them from an MCP client.
Category
Dev Tools #316 of 751
Stars
★ 99 Popular
Transport
stdio (local process)
Runtime
Node.js 22+
Credentials
API key / credential required
License
MIT
Last commit
Tools
1
52FMRS · D

This developer-tools MCP server exposes the run_agent tool over stdio. It uses user-authored Markdown agent definitions and delegates execution to a selected coding CLI. It supports multiple backends and optional sessions; permission enforcement varies by backend.

Strongest · Setup experience 13/20 Weakest · Maintenance 7/20

Reliability
10/20
Security and permissions
10/20
Maintenance
7/20
Documentation
12/20
Setup experience
13/20
Why each score
Reliability 10/20
The README describes the intended flow of invoking run_agent through MCP, running the selected CLI, and returning its result, and the manifest declares tool support. There is no source code, CI, or test evidence to verify initialization and tool-list handshakes, parameter behavior, error handling, or dependency control, so the score is reduced for the static-review cap and uncertainty.
Security and permissions 10/20
The manifest says keys are passed through environment variables rather than CLI arguments, and distinguishes read-only, safe-edit, and yolo permissions. The README also says enforcement varies by backend and is not a security boundary. The supplied material does not establish data-access scope, command and side-effect constraints, or confirmation for dangerous actions, so points are deducted. The prompt provides no evidence supporting a red-line finding.
Maintenance 7/20
The materials provide an MIT license, an npm package version, and a maintainer name; repository metadata says it is not archived and has 98 stars and 0 open issues, but stars are not maintenance evidence. No commit or release history, dependency-update record, issue-response history, or security contact is provided, so points are deducted.
Documentation 12/20
The README covers use cases, backend options, an installation configuration example, permissions, sessions, and basic troubleshooting; the manifest lists environment variables and run_agent support. Tool parameter details, platform compatibility, cost and data-flow disclosures, and deeper troubleshooting evidence are missing, so points are deducted.
Setup experience 13/20
The README states the Node.js 22+ prerequisite, MCP client and authenticated CLI requirements, and provides an npx configuration example with basic startup troubleshooting. Users still need to install and configure a backend, prepare an absolute path, and edit client configuration; there is no verifiable cross-platform or end-to-end execution evidence, so points are deducted.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local filesRuns commands or codeUses the network

Best for

  • Developers who want to reuse Markdown agent definitions across MCP-compatible clients.
  • Users who want shared backend and model configuration for sub-agents.

Not for

  • Users without a supported coding CLI installed and signed in.
  • Situations that require permission levels to act as a dependable security boundary; enforcement varies by backend.

Required permissions

  • AGENTS_DIR must point to a directory containing agent definition files.
  • The selected coding CLI must have configured authentication; GLM and Kimi also require CLI_API_KEY in the MCP server environment.
  • AGENT_PERMISSION can be read-only, safe-edit (default), or yolo; enforcement varies by backend.

Risks and side effects

  • safe-edit allows edits without approval; yolo allows unrestricted execution.
  • Permission modes are guidance and should not be treated as a security boundary.
  • Enabling sessions stores execution history; the storage directory and retention period are configurable.

Setup

Before you start

Runtime:Node.js 22+

AGENTS_DIR required Required: set this to the absolute path of the directory containing agent definition .md or .txt files.
AGENT_TYPE required Required: select an installed and configured coding CLI, such as codex, claude, or cursor.
CURSOR_API_KEY optionalsecret Optional: used for cursor-agent authentication only when AGENT_TYPE=cursor; obtain the key from Cursor.
CLI_API_KEY optionalsecret Optional: set the provider API key when AGENT_TYPE=glm or kimi; obtain it from the selected provider.
Other optional settings (8)
AGENT_PERMISSION optional Optional: set the agents' permission level to read-only, safe-edit (default), or yolo.
AGENT_MODEL optional Optional: choose one model for all agent executions; omit it to use the backend default.
AGENT_EFFORT optional Optional: set a backend-specific reasoning effort or model variant for supported backends.
EXECUTION_TIMEOUT_MS optional Optional: set the execution timeout as a positive whole number of milliseconds; defaults to 300000.
SESSION_ENABLED optional Optional: set to true to enable execution history across agent calls.
SESSION_DIR optional Optional: choose where session files are stored; defaults to .mcp-sessions in the current working directory.
SESSION_RETENTION_DAYS optional Optional: set how many days to retain session history before automatic cleanup; defaults to 1.
AGENTS_SETTINGS_PATH optional Optional: set the path to a CLI settings file or directory; supported backends and usage depend on the selected CLI.

Requires Node.js 22 or later, an MCP-compatible client, and a supported coding CLI that is installed and signed in. Create an agent directory with .md or .txt definition files. In the client's MCP configuration, set AGENTS_DIR to the directory's absolute path and AGENT_TYPE to the chosen backend (the example uses codex). Restart or reconnect the client after saving.

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

Works in clients that read an "mcpServers" key. For clients such as VS Code that use a different key, the configurator below converts it.

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

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
[mcp_servers.sub-agents]
command = "npx"
args = ["-y", "sub-agents-mcp"]

[mcp_servers.sub-agents.env]
AGENTS_DIR = "/absolute/path/to/agents"
AGENT_TYPE = "codex"

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Terminal
claude mcp add sub-agents -e AGENTS_DIR=/absolute/path/to/agents -e AGENT_TYPE=codex -- npx -y sub-agents-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Restart or reconnect your MCP client and confirm that run_agent appears in its tool list. Then ask it to run a configured agent and confirm that the result appears in the conversation.

Troubleshooting

  1. Run the selected backend command directly to confirm it is installed and signed in.
  2. Check that AGENTS_DIR is an absolute path containing at least one .md or .txt file.
  3. Restart or reconnect the MCP client after changing its configuration.
  4. EXECUTION_TIMEOUT_MS must be a positive whole number; an invalid value prevents startup.

Things to try

Once connected, you can ask your AI assistant things like:

  • Use the code-reviewer agent to find bugs and maintainability issues in the authentication code.
  • 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.

Tools 1

run_agent writes
Run a specified specialized sub-agent and return its result.

Use cases

Delegate code review to a focused agent.
Ask an agent to write tests for a module.
Investigate a failure or document API changes.
Continue longer work across calls by enabling sessions.

Supported clients

MCP-compatible clientsPartial support

Listed from the project's documentation, not tested by this site.

Overview

Sub-Agents MCP Server runs task-specific AI sub-agents defined in Markdown through a coding CLI you choose, then returns their results to the current conversation. It supports code review, test writing, investigation, and documentation, and can continue agent sessions across calls.

Similar servers

Source revision cf067b6a76e9 Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/sub-agents-mcp.svg)](https://followmcp.com/en/servers/sub-agents-mcp)