Task Agents
This MCP server enables AI assistants to delegate specialized tasks to autonomous sub-agents defined in markdown files, bringing Claude Code-style workflows to any MCP-compatible tool.
Core Capabilities:
Agent delegation - Offload complex, multi-step, or specialized tasks (code reviews, test writing, security checks, refactoring) to autonomous agents using the
run_agentfunctionReusable agent definitions - Create custom agents as simple markdown files that are portable and reusable across projects and teams
Cross-tool compatibility - Use the same agent definitions in any MCP-compatible tool (Cursor, Claude Desktop, Windsurf, etc.)
Engine flexibility - Execute agents through
cursor-agentorclaudeCLI backends via theAGENT_TYPEenvironment variableContext isolation - Each agent runs with fresh, independent context to prevent interference between tasks
Session management - Optional persistent sessions (
SESSION_ENABLED) allow agents to maintain context and build upon previous executions for iterative workflowsExecution control - Configure working directories (
cwd), timeouts, and shell command permissions through allowlistsBatch operations - Handle systematic codebase analysis, fix multiple test failures, or perform refactoring across multiple files
Team collaboration - Share standardized agent definitions across teams regardless of IDE preferences
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Task Agentsreview this Python function for bugs and improvements"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Sub-Agents MCP Server
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
Related MCP server: Sub-Agents MCP
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:
# 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 stepsThe 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.
{
"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:
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
Use the test-writer agent to add unit tests for the auth module.Use the bug-investigator agent to find the cause of the failed checkout requests.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:
| Backend | Command |
| Codex |
|
| Claude Code |
|
| Cursor CLI |
|
| Command Code |
|
| GLM (Z.ai) |
|
| Kimi |
|
| Grok Build |
|
| Google Antigravity |
|
| Gemini CLI (compatibility) |
|
| OpenCode |
|
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 investigationsafe-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_DIRis an absolute path and contains at least one.mdor.txtfileRestart or reconnect the MCP client after changing its configuration
License
MIT
Available Tools
1 toolrun_agentA
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, systematic codebase analysis, batch operations). Returns session_id in response metadata - reuse it in subsequent calls to maintain conversation context continuity across multiple agent executions.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Working directory path for agent execution context. Must be an absolute path to a valid directory. | |
| agent | Yes | Agent name exactly as listed in list_agents resource. | |
| prompt | Yes | User's direct request content. Agent context is separately provided via agent parameter. | |
| extra_args | No | Additional configuration parameters for agent execution (optional) | |
| session_id | No | Session ID for continuing previous conversation context (optional). If omitted, a new session will be auto-generated and returned in response metadata. Reuse the returned session_id in subsequent calls to maintain context continuity. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description must disclose behavioral traits. It mentions autonomous execution and context continuity via session_id, but lacks details on safety (e.g., what gets modified), error handling, or rate limits. The absence of annotations puts more burden on the description, which is only partially fulfilled.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: the first provides purpose and examples, the second explains a key behavior (session_id reuse). It is front-loaded with important information and wastes no words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description covers the response metadata (session_id). It explains the core behavior and parameter usage. However, it could be more complete by mentioning error scenarios, timeouts, or concurrency implications, which are common for agent delegation tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds value beyond the schema: it explains the `session_id` parameter's role in maintaining context continuity and how it is returned. It also clarifies the distinction between `prompt` (user request) and `agent` context. This extra context helps agents use parameters correctly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Delegate') and resource ('multi-step, or specialized tasks to an autonomous agent'), and provides concrete examples (refactoring, fixing test failures, codebase analysis). It clearly distinguishes the tool's purpose as handling autonomous, multi-step tasks, even though no sibling tools are listed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use the tool (complex, multi-step, specialized tasks) and provides examples. It does not include explicit when-not-to-use statements or alternatives, but the context is clear enough without siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v1.0.0- Changed
run_agent5 fields changed- changed
Input schema / properties / agent / descriptionPrevious value: -"Identifier of the specialized agent to delegate the task to"New value: +"Agent name exactly as listed in list_agents resource." - changed
Input schema / properties / cwd / descriptionPrevious value: -"Working directory path for agent execution context (optional)"New value: +"Working directory path for agent execution context. Must be an absolute path to a valid directory." - changed
Input schema / properties / prompt / descriptionPrevious value: -"Task description or instructions for the agent to execute. When referencing file paths, use absolute paths to ensure proper file access."New value: +"User's direct request content. Agent context is separately provided via agent parameter." - added
Input schema / properties / session_idAdded value: +{ + "description": "Session ID for continuing previous conversation context (optional). If omitted, a new session will be auto-generated and returned in response metadata. Reuse the returned session_id in subsequent calls to maintain context continuity.", + "type": "string" +} - changed
Input schema / requiredPrevious value: -[ - "agent", - "prompt" -]New value: +[ + "agent", + "prompt", + "cwd" +]
1 tool update
- First observed
run_agent
TDQS
Only one tool exists, so there is no possibility of ambiguity or confusion with other tools.
With a single tool, naming consistency is inherently perfect; the name 'run_agent' is descriptive and follows a clear verb_noun pattern.
A single tool is thin for a server named 'Task Agents' which implies multiple task types. While the tool itself is powerful, the count feels borderline for typical multi-step workflows.
The server lacks tools for status checking, result retrieval, or cancellation of agent executions. The single tool covers delegation but leaves obvious lifecycle gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Build and supervise fleets of agents from Claude Code, Codex or Cursor. Connects over OAuth.
Coordination hub for AI coding agents: message teammates, ask humans, audit every event.
- AgentdaOAuthcom.myagentda
Agent-native task management: your AI agent is the interface. Delegate to anyone by email.
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to consult expert models (Claude, GPT, Gemini, DeepSeek, Z.ai) for technical guidance, code reviews, and architectural advice without switching context.4224MIT
- AlicenseAqualityDmaintenanceEnables the creation and execution of task-specific AI sub-agents defined in markdown across any MCP-compatible tool like Cursor or Claude Desktop. It integrates with execution engines such as Claude Code, Cursor CLI, and Gemini CLI to provide portable and reusable specialized agent workflows.1893MIT
- AlicenseNot gradedqualityDmaintenanceThe simplest way to bridge and collaborate across AI Agent sessions like Claude Code, Codex, Gemini, or Cursor. It allows your agents to combine their strengths to solve your most difficult tasks without leaving their current context.3866MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to delegate tasks to Cursor's headless agent, run adversarial reviews, and verify findings with prosecutor/advocate roles.76MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shinpr/sub-agents-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server