A flexible MCP server that lets you create specialized AI agents as individual tools in Claude. Each agent appears as its own tool with custom prompts, models, and capabilities.
v4.0.0 - Simplified architecture with user-defined agents only
Task Agent MCP Server turns markdown files into specialized AI agents. Each agent:
- Appears as a separate tool in Claude
- Has its own system prompt and personality
- Can use specific Claude models (opus, sonnet, haiku)
- Maintains conversation context (optional)
- Access specific directories and resources
# Requires Python 3.11 or higher
python3.11 -m pip install task-agents-mcpclaude mcp add task-agent task-agent -s projectThat's it! β The server comes with an example agent template to get you started.
The package includes task-agents/example-agent.md as a template. Try it:
"Use example_agent to explain how task agents work"
-
Copy the example template:
cp task-agents/example-agent.md task-agents/my-agent.md
-
Edit
my-agent.mdto customize:- Agent name and description
- System prompt (the agent's personality and instructions)
- Tools it can use
- Model (opus for complex reasoning, sonnet for implementation)
-
Use your new agent:
"Use my_agent to [your task]"
Each agent is a markdown file with YAML frontmatter:
---
# REQUIRED FIELDS
agent-name: My Assistant
description: Brief description of what this agent does
tools: Read, Write, Edit, Glob, Grep, Bash
model: sonnet
cwd: .
# OPTIONAL FIELDS
optional:
# Enable session memory (remembers context between calls)
resume-session: true 10 # Remember last 10 exchanges
# Additional directories the agent can access
resource_dirs: ./docs, ./data
---
System-prompt:
You are a specialized assistant that...
[Your detailed instructions here]Agents can use any combination of these tools:
- File Operations: Read, Write, Edit, MultiEdit
- Search: Glob, Grep, LS
- Shell: Bash, BashOutput, KillBash
- Web: WebSearch, WebFetch
- Other: TodoWrite, NotebookEdit, Task
- opus: Best for complex reasoning, planning, analysis
- sonnet: Best for implementation, coding, execution
- haiku: Fast responses for simple tasks
Add to your Claude Desktop config:
{
"mcpServers": {
"task-agent": {
"command": "task-agent",
"env": {
"TASK_AGENTS_PATH": "/path/to/your/agents"
}
}
}
}---
agent-name: Code Reviewer
description: Reviews code for bugs, performance, and best practices
tools: Read, Grep, Glob
model: opus
cwd: .
---
System-prompt:
You are an expert code reviewer. Focus on:
- Finding bugs and potential issues
- Suggesting performance improvements
- Ensuring code follows best practices
- Checking for security vulnerabilities---
agent-name: DevOps Engineer
description: Manages deployments, CI/CD, and infrastructure
tools: Read, Write, Edit, Bash
model: sonnet
cwd: .
optional:
resume-session: true 5
---
System-prompt:
You are a DevOps engineer specializing in:
- Docker and Kubernetes configurations
- CI/CD pipeline setup
- Infrastructure as Code
- Deployment automationEnable conversation memory for multi-step tasks:
optional:
resume-session: true # 5 exchanges (default)
resume-session: true 10 # 10 exchanges
resume-session: false # DisabledPerfect for:
- Multi-step debugging sessions
- Feature implementation across multiple files
- Extended code reviews
- Iterative optimization
Give agents access to additional directories:
optional:
resource_dirs: ./templates, ./data, ./scriptsSet where the agent operates from:
cwd: . # Project root (default)
cwd: ./src # Specific subdirectory
cwd: /absolute/path # Absolute path- Python 3.11 or higher
- Claude Code CLI (Download here)
- Check that your
.mdfiles are in thetask-agents/directory - Verify the YAML frontmatter is valid
- Ensure all required fields are present
- Agent names with spaces become underscores in tool names
- "Code Reviewer" becomes
code_reviewertool - Check server logs:
/tmp/task_agents_server.log
# Check your Python version
python3 --version
# If less than 3.11, install Python 3.11
# macOS: brew install python@3.11
# Ubuntu: sudo apt install python3.11your-project/
βββ task-agents/ # Your agent configurations
β βββ example-agent.md # Template/example agent
β βββ my-agent.md # Your custom agents
β βββ ...
βββ .mcp.json # MCP configuration (auto-created)
- GitHub: https://github.com/vredrick/task-agent
- PyPI: https://pypi.org/project/task-agents-mcp/
- MCP Protocol: https://modelcontextprotocol.io/
MIT License - See LICENSE file for details