{
  "markdown": "# Sub-Agents MCP Server\n\n[![npm version](https://img.shields.io/npm/v/sub-agents-mcp.svg)](https://www.npmjs.com/package/sub-agents-mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nRun reusable coding agents from any MCP-compatible client.\n\nWrite 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.\n\n## What You Can Do\n\n- Delegate code review, test writing, investigation, and documentation to focused agents\n- Reuse the same agent definitions across MCP clients with one shared backend and model configuration\n- Continue the same agent across multiple calls for longer work\n\n## Quick Start\n\nYou need Node.js 22 or later, an MCP-compatible client, and one supported coding CLI installed and signed in. This example uses Codex.\n\n### 1. Create an Agent\n\nCreate an agents folder anywhere on your machine, then add `code-reviewer.md`:\n\n```markdown\n# Code Reviewer\n\nReview code for bugs and maintainability issues.\n\n## Task\n\n- Find concrete problems in the requested changes\n- Explain why each problem matters\n- Point to the affected code\n\n## Done When\n\n- All requested files have been reviewed\n- Findings include evidence and suggested next steps\n```\n\nThe filename becomes the agent name: `code-reviewer.md` becomes `code-reviewer`.\n\n### 2. Add the MCP Server\n\nAdd the server to your client's MCP configuration. Replace `AGENTS_DIR` with the absolute path to the folder you created.\n\n```json\n{\n  \"mcpServers\": {\n    \"sub-agents\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"sub-agents-mcp\"],\n      \"env\": {\n        \"AGENTS_DIR\": \"/absolute/path/to/agents\",\n        \"AGENT_TYPE\": \"codex\"\n      }\n    }\n  }\n}\n```\n\nRestart or reconnect your MCP client after saving the configuration.\n\n### 3. Run the Agent\n\nAsk your assistant:\n\n```text\nUse the code-reviewer agent to review the authentication changes.\n```\n\nYour assistant runs the agent with Codex and returns the review to the conversation.\n\n## Examples\n\n```text\nUse the test-writer agent to add unit tests for the auth module.\n```\n\n```text\nUse the bug-investigator agent to find the cause of the failed checkout requests.\n```\n\n```text\nUse the doc-writer agent to document the public API changes.\n```\n\nName both the agent and the work you want it to do.\n\n## When the MCP Server Fits\n\nUse the MCP server when you want to share the same agents across MCP clients while keeping backend and model configuration in one place.\n\nIf you prefer a lighter installation or want each agent to choose its own backend and model, see [Sub-Agents Skills](https://github.com/shinpr/sub-agents-skills).\n\n## Supported Backends\n\nSet `AGENT_TYPE` to the backend you already use:\n\n| `AGENT_TYPE` | Backend | Command |\n|---|---|---|\n| `codex` | Codex | `codex` |\n| `claude` | Claude Code | `claude` |\n| `cursor` | Cursor CLI | `cursor-agent` |\n| `command-code` | Command Code | `command-code` |\n| `glm` | GLM (Z.ai) | `claude` |\n| `kimi` | Kimi | `claude` |\n| `grok` | Grok Build | `grok` |\n| `antigravity` | Google Antigravity | `agy` 1.1.12+ |\n| `gemini` | Gemini CLI (compatibility) | `gemini` |\n| `opencode` | OpenCode | `opencode` |\n\nThe selected CLI must be installed and configured before the MCP server starts.\n\nGLM and Kimi require `CLI_API_KEY` in the MCP server environment. Other backends use the CLI's existing authentication.\n\nFor Google models, prefer Antigravity. Gemini CLI remains available for existing enterprise, API key, or Vertex AI configurations.\n\n## Shared Agent Settings\n\nSet `AGENT_MODEL` to use one model for every agent. Omit it to use the backend's default.\n\n`AGENT_PERMISSION` controls what agents may do:\n\n- `read-only` — review and investigation\n- `safe-edit` — edits allowed without approval (default)\n- `yolo` — unrestricted execution\n\nIf an agent reports that an action was blocked, choose a less restrictive mode.\n\n## Continue Work Across Calls\n\nSet `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.\n\n## If It Does Not Start\n\n- Run the selected backend command directly and confirm that it is installed and signed in\n- Make sure `AGENTS_DIR` is an absolute path and contains at least one `.md` or `.txt` file\n- Restart or reconnect the MCP client after changing its configuration\n\n## License\n\nMIT\n",
  "bytes": 4525,
  "sha": "6a034efeadc23bf1153e4f86b1ffd78f9b47126e888dd4f595c3814c02979a3b",
  "repo_slug": "shinpr/sub-agents-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_shinpr_sub_agents_mcp_69b55397/readme"
}