Sub Agents Mcp

io.github.shinpr由 GitHub 帳號 shinpr 發布v0.15.1更新於 Oct 24, 2026

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

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

透過所選的 AI 程式開發 CLI 執行以 Markdown 定義的可重用編碼子代理,並把結果帶回助手對話。

可以做什麼
  • 從代理目錄執行以 Markdown 或文字檔定義的具名代理,並以所選的程式開發 CLI 作為後端
  • 把程式碼審查、測試撰寫、缺陷追查與文件撰寫交給專門的代理
  • 在多個 MCP 用戶端之間重複使用同一組代理定義,並集中管理後端與模型設定
  • 開啟工作階段管理後,透過重複使用回傳的 session id 在多次呼叫間延續同一個代理
適用情境
適合想在一處定義專門的程式開發代理(審查者、測試撰寫者、追查者)並跨多個 MCP 用戶端共用,同時集中管理後端與模型設定的情況。若希望每個代理各自選擇後端與模型,則有更輕量的替代方案。
執行需求
透過 npx 在本機執行,需要 Node.js 22 以上版本。需要相容於 MCP 的用戶端,以及一個已安裝並登入的支援程式開發 CLI(例如 codex、claude、cursor-agent、gemini、grok、opencode)。AGENTS_DIR 必須是包含至少一個 .md 或 .txt 代理檔案的絕對路徑,AGENT_TYPE 用來選擇後端。GLM 與 Kimi 需要 CLI_API_KEY,Cursor 需要 CURSOR_API_KEY。變更設定後需重新啟動用戶端。
安裝前請注意
子代理會在本機執行真實的程式開發 CLI,可能修改檔案:AGENT_PERMISSION 預設為 safe-edit,yolo 則允許不受限制的執行,且各後端的執行嚴格程度不同,官方稱其為指引而非安全界線。CLI_API_KEY 與 CURSOR_API_KEY 是透過環境變數傳入的密鑰。開啟 SESSION_ENABLED 後工作階段歷史會寫入磁碟,預設保留一天。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Sub Agents Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

來源:README.md,提交 0dcb532

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:伺服器未能啟動。

版本歷史

5
  1. v0.15.1最新Oct 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

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分