The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Sub Agents MCP listing page.
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.
You need Node.js 22 or later, an MCP-compatible client, and one supported coding CLI installed and signed in. This example uses Codex.
Create an agents folder anywhere on your machine, then add code-reviewer.md:
The filename becomes the agent name: code-reviewer.md becomes code-reviewer.
Add the server to your client's MCP configuration. Replace AGENTS_DIR with the absolute path to the folder you created.
Restart or reconnect your MCP client after saving the configuration.
Ask your assistant:
Your assistant runs the agent with Codex and returns the review to the conversation.
Name both the agent and the work you want it to do.
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.
Set AGENT_TYPE to the backend you already use:
AGENT_TYPE | Backend | Command |
|---|---|---|
codex | Codex | codex |
claude | Claude Code | claude |
cursor | Cursor CLI | cursor-agent |
command-code | Command Code | command-code |
glm | GLM (Z.ai) | claude |
kimi | Kimi | claude |
grok | Grok Build | grok |
antigravity | Google Antigravity | agy 1.1.12+ |
gemini | Gemini CLI (compatibility) | gemini |
opencode | OpenCode | opencode |
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.
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 investigationsafe-edit — edits allowed without approval (default)yolo — unrestricted executionIf an agent reports that an action was blocked, choose a less restrictive mode.
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.
AGENTS_DIR is an absolute path and contains at least one .md or .txt fileMIT