# Sub-Agents MCP Server

> Define focused agents in Markdown and run them from an MCP client.

- **URL**: https://followmcp.com/en/servers/sub-agents-mcp
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 99
- **FMRS Score**: 52/100 (Grade D)
- **Source**: https://github.com/shinpr/sub-agents-mcp
- **Transports**: stdio (local process)
- **Runtimes**: Node.js 22+
- **Auth**: API key / credential required

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

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

## Client config (JSON)
```json
{"mcpServers":{"sub-agents":{"command":"npx","args":["-y","sub-agents-mcp"],"env":{"AGENTS_DIR":"/absolute/path/to/agents","AGENT_TYPE":"codex"}}}}
```

## Tools (1)
- `run_agent`: Run a specified specialized sub-agent and return its result.
