Sub Agents Mcp

io.github.shinprPublished by GitHub account shinprv0.15.1Updated Oct 24, 2026

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

VerifiedSTDIODesktop onlyDeveloper ToolsAI & ML

Overview

AI-generated overview

Runs reusable Markdown-defined coding sub-agents through a chosen AI coding CLI and returns their results to the assistant's conversation.

What you can do
  • Run named agents defined in Markdown or text files from an agents directory, using the coding CLI selected as backend
  • Delegate code review, test writing, bug investigation and documentation work to focused agents
  • Reuse the same agent definitions across MCP clients with one shared backend and model configuration
  • Continue an agent across multiple calls by reusing a returned session id when session management is enabled
When to use it
Useful when you want a single place to define specialized coding agents (reviewer, test writer, investigator) and share them across MCP clients, keeping backend and model settings centralized. A lighter alternative exists if each agent should pick its own backend.
Requirements
Runs locally via npx, requiring Node.js 22 or later. Needs an MCP-compatible client and one supported coding CLI installed and signed in (for example codex, claude, cursor-agent, gemini, grok, opencode). AGENTS_DIR must be an absolute path containing at least one .md or .txt agent file; AGENT_TYPE selects the backend. GLM and Kimi need CLI_API_KEY; Cursor needs CURSOR_API_KEY. Restart the client after configuration changes.
Before you install
Sub-agents run real coding CLIs on your machine and can edit files: AGENT_PERMISSION defaults to safe-edit, and yolo allows unrestricted execution, with enforcement depending on the backend and described as guidance rather than a security boundary. CLI_API_KEY and CURSOR_API_KEY are secrets passed through the environment. Session history is stored on disk when SESSION_ENABLED is on, with a default retention of one day.

Installation

In SourceWeft

  1. Open Sub Agents Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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:

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

json
{  "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:

text
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

text
Use the test-writer agent to add unit tests for the auth module.
text
Use the bug-investigator agent to find the cause of the failed checkout requests.
text
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
mcodeMiniMax Codemcode
piPipi

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.

How strictly each level is enforced depends on the backend, so treat it as guidance rather than a security boundary.

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

Source: README.md at commit 0dcb532

Tools

0
SourceWeft started this package once in an isolated sandbox, without credentials, to list its tools. That failed: the server did not start.

Version history

5
  1. v0.15.1LatestOct 22, 2026
  2. v0.15.0Oct 20, 2026
  3. v0.14.4Oct 15, 2026
  4. v0.14.3Oct 14, 2026
  5. v0.14.2Sep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts