Sub-Agents logo

Sub-Agents

Community
shinpr

Define task-specific AI sub-agents in Markdown for any MCP-compatible tool.

Publishershinpr
Repositorysub-agents-mcp
LanguageTypeScript
Forks
16
Stars
98
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Sub-Agents exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    98 stars and 16 forks from the linked repository.

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

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.

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

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "sub-agents": {
      "command": "npx",
      "args": [
        "-y",
        "sub-agents-mcp"
      ],
      "env": {
        "AGENTS_DIR": "/path/to/your/agents-folder",
        "AGENT_TYPE": "cursor"
      }
    }
  }
}

Use Sub-Agents MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Sub-Agents is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Sub-Agents as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Sub-Agents MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "sub-agents": {
      "command": "npx",
      "args": [
        "-y",
        "sub-agents-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Sub-Agents MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Sub-Agents MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Sub-Agents to help me with this task?
Sub-Agents
Sure. I read it.
Here is what I found using Sub-Agents.

Frequently asked questions

What is the Sub-Agents MCP server used for?

Sub-Agents is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Sub-Agents MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Sub-Agents with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Sub-Agents MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Sub-Agents connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Sub-Agents MCP to TypingMind?

Sub-Agents runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Sub-Agents MCP provide in TypingMind?

Sub-Agents exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Sub-Agents MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Sub-Agents requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇