Task Agents

v0.8.0Coding Agentsstable

Delegate complex, multi-step, or specialized tasks to an autonomous agent for independent execution with dedicated context (e.g., refactoring across multiple files, fixing all test failures, systemati

agent-workflowagentic-aiai-agentsautomationclaude-code
Share:
83
Stars
0
Downloads
0
Weekly
0/5

What is Task Agents?

Task Agents is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to delegate complex, multi-step, or specialized tasks to an autonomous agent for independent execution with dedicated context (e.g., refactoring across multiple files, fixing all test failures, systemati

Delegate complex, multi-step, or specialized tasks to an autonomous agent for independent execution with dedicated context (e.g., refactoring across multiple files, fixing all test failures, systemati

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • run_agent

Use Cases

Complex multi-step task execution
Autonomous agent delegation
Independent context and execution
shinpr

Maintainer

LicenseMIT License
Languagetypescript
Versionv0.8.0
UpdatedMay 14, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y sub-agents-mcp

Manual Installation

npx -y sub-agents-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Task Agents

Sub-Agents MCP (published as the Task Agents server) lets any MCP-compatible AI tool delegate complex, multi-step tasks to autonomous sub-agents that each run in their own isolated context. Instead of asking Claude to refactor an entire codebase in one shot, you define lightweight agent markdown files describing the task, pick an execution engine (Claude Code, Cursor, Codex, or Gemini CLI), and the server spawns the right tool to carry out the work independently. This is especially useful for long-running tasks like fixing all test failures, systematic documentation passes, or running parallel code reviews without consuming the parent session's context window.

Prerequisites

  • Node.js 18 or later installed (for npx execution)
  • At least one supported agent CLI installed: Claude Code, Cursor CLI, OpenAI Codex, or Gemini CLI
  • An MCP-compatible host such as Claude Desktop, Cursor, or Windsurf
  • A directory containing agent definition markdown files (the AGENTS_DIR)
1

Create an agents directory

Make a directory that will hold your agent definition files. Each file is a markdown document that describes what a particular sub-agent should do when invoked. The path must be absolute.

mkdir -p /Users/you/agents
2

Write an agent definition file

Create a markdown file inside your agents directory. The filename becomes the agent name. Describe the agent's purpose, instructions, and any constraints it should follow.

# code-reviewer
You are a meticulous code reviewer. When given a file or class name,
read the source code and provide a detailed review covering correctness,
performance, readability, and security concerns.
3

Add the server to your MCP client config

Open your MCP client configuration file and add the sub-agents-mcp entry. Set AGENTS_DIR to the absolute path of your agents directory and AGENT_TYPE to the execution engine you have installed.

{
  "mcpServers": {
    "task-agents": {
      "command": "npx",
      "args": ["-y", "sub-agents-mcp"],
      "env": {
        "AGENTS_DIR": "/Users/you/agents",
        "AGENT_TYPE": "claude",
        "AGENT_PERMISSION": "safe-edit",
        "EXECUTION_TIMEOUT_MS": "300000"
      }
    }
  }
}
4

Restart your MCP client

Save the configuration file and restart your MCP client. The run_agent tool will appear in the available tools list once the server connects successfully.

5

Delegate a task to a sub-agent

In your AI chat, ask the host to use a specific agent. The server reads the agent definition, spins up the configured execution engine, and runs the task independently, returning results when complete.

Task Agents Examples

Client configuration

Claude Desktop configuration that delegates tasks to Claude Code sub-agents with safe-edit permissions.

{
  "mcpServers": {
    "task-agents": {
      "command": "npx",
      "args": ["-y", "sub-agents-mcp"],
      "env": {
        "AGENTS_DIR": "/Users/you/agents",
        "AGENT_TYPE": "claude",
        "AGENT_PERMISSION": "safe-edit",
        "EXECUTION_TIMEOUT_MS": "300000",
        "SESSION_ENABLED": "true",
        "SESSION_DIR": "/Users/you/.sub-agents/sessions"
      }
    }
  }
}

Prompts to try

Example prompts that delegate complex tasks to sub-agents.

- "Use the code-reviewer agent to check the UserService class in src/services/UserService.ts"
- "Use the test-writer agent to create unit tests for all functions in the auth module"
- "Delegate a refactoring task to the refactor agent: rename all instances of 'userId' to 'accountId' across the project"
- "Use the docs agent to write JSDoc comments for every exported function in lib/api.js"
- "Run the security-audit agent against the entire src/ directory and summarize findings"

Troubleshooting Task Agents

run_agent fails with 'AGENTS_DIR not found' or agent not recognized

Ensure AGENTS_DIR is set to an absolute path (not relative) and that the directory exists. The agent name in your prompt must match the filename (without .md extension) inside that directory.

Agent execution times out

EXECUTION_TIMEOUT_MS defaults to 5 minutes (300000). For long-running tasks, increase it up to the maximum of 600000 (10 minutes) in your env config.

AGENT_TYPE is not recognized

Valid values are 'cursor', 'claude', 'gemini', and 'codex'. Make sure the corresponding CLI tool is installed and accessible in your PATH before setting this variable.

Frequently Asked Questions about Task Agents

What is Task Agents?

Task Agents is a Model Context Protocol (MCP) server that delegate complex, multi-step, or specialized tasks to an autonomous agent for independent execution with dedicated context (e.g., refactoring across multiple files, fixing all test failures, systemati It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Task Agents?

Install via npm with the command: npx -y sub-agents-mcp. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Task Agents?

Task Agents works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Task Agents free to use?

Yes, Task Agents is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "task-agents": { "command": "npx", "args": ["-y", "sub-agents-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Task Agents?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides