๐ MCP Tasks ๐
An efficient task manager designed to minimize tool confusion and maximize LLM budget efficiency. It offers powerful search, filtering, and organization capabilities across multiple file formats (Markdown, JSON, YAML).
๐ Quick Start
Add this to ~/.cursor/mcp.json for Cursor, ~/.config/claude_desktop_config.json for Claude Desktop.
Option 1: NPX (Recommended)
{
"mcpServers": {
"mcp-tasks": {
"command": "npx",
"args": ["-y", "mcp-tasks"]
}
}
}
Option 2: Docker
{
"mcpServers": {
"mcp-tasks": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"flesler/mcp-tasks"
]
}
}
}
โจ Features
- โก Ultra-efficient design: With a minimal tool count (5 tools), it reduces AI confusion.
- ๐ฏ Budget-optimized: Batch operations, smart defaults, and auto-operations minimize LLM API calls.
- ๐ Multi-format support: Supports Markdown (
.md), JSON (.json), and YAML (.yml) task files.
- ๐ Powerful search: Enables case-insensitive text/status filtering with OR logic and ID-based lookup.
- ๐ Smart organization: Allows status-based filtering with customizable workflow states.
- ๐ฏ Position-based indexing: Facilitates easy task ordering with 0-based insertion.
- ๐ Multi-source support: Manages multiple task files simultaneously.
- ๐ Real-time updates: Automatically persists changes to your chosen format.
- ๐ค Auto WIP management: Automatically manages work-in-progress task limits.
- ๐ซ Duplicate prevention: Automatically prevents duplicate tasks.
- ๐ก๏ธ Type-safe: Offers full TypeScript support with Zod validation.
- ๐ Ultra-safe: AI has no way to rewrite or delete your tasks (unless you enable it), only add and move them.
- ๐
Optional reminders: Enables a dedicated Reminders section that the AI constantly sees and can maintain.
๐ฆ Installation
Installation Examples
Full configuration with custom environment:
{
"mcpServers": {
"mcp-tasks": {
"command": "npx",
"args": ["-y", "mcp-tasks"],
"env": {
"STATUS_WIP": "In Progress",
"STATUS_TODO": "To Do",
"STATUS_DONE": "Done",
"STATUS_REMINDERS": "Reminders",
"STATUS_NOTES": "Notes",
"STATUSES": "In Progress,To Do,Done,Backlog,Reminders,Notes",
"AUTO_WIP": "true",
"PREFIX_TOOLS": "true",
"KEEP_DELETED": "true",
"TRANSPORT": "stdio",
"PORT": "4680",
"INSTRUCTIONS": "Use mcp-tasks tools when the user mentions new or updated tasks"
}
}
}
}
HTTP transport for remote access:
First run the server:
TRANSPORT=http PORT=4680 npx mcp-tasks
Then:
{
"mcpServers": {
"mcp-tasks": {
"type": "streamableHttp",
"url": "http://localhost:4680/mcp"
}
}
}
๐ป Usage Examples
Basic Usage
To encourage the AI to use these tools, you can start with a prompt like the following, with any path you want with .md (recommended), .json, .yml:
Use mcp-tasks tools to track our work in path/to/tasks.md
If you are telling it about new or updated tasks, you can append this to the end of your prompt:
use mcp-tasks
Adding tasks while AI works: To safely add tasks without interfering with AI operations, use the CLI from a separate terminal:
npx mcp-tasks add "Your new task text" "To Do" 0
Advanced Usage
Setup a task file:
tasks_setup({
workspace: "/path/to/project",
source_path: "tasks.md"
})
Add tasks:
tasks_add({
source_id: "xK8p",
texts: ["Implement authentication", "Write tests"],
status: "To Do",
index: 0
})
Search and filter:
tasks_search({
source_id: "xK8p",
terms: ["auth", "deploy"],
statuses: ["To Do"],
ids: ["m3Qw", "p9Lx"]
})
Update tasks status:
tasks_update({
source_id: "xK8p",
ids: ["m3Qw", "p9Lx"],
status: "Done"
})
Get overview:
tasks_summary({
source_id: "xK8p"
})
๐ Documentation
Supported File Formats
| Property |
Details |
| Model Type |
Markdown (.md), JSON (.json), YAML (.yml) |
| Training Data |
All formats support the same features and can be mixed in the same project. |
Format is auto-detected from file extension.
โ ๏ธ Important Note
Start with a new file rather than using pre-existing task files to avoid losing non-task content.
Available Tools
When PREFIX_TOOLS=true (default), all tools are prefixed with tasks_:
| Tool |
Description |
Parameters |
tasks_setup |
Initialize a task file (creates if missing, supports .md, .json, .yml) |
source_path, workspace? |
tasks_search |
Search tasks with filtering |
source_id, statuses?, terms?, ids? |
tasks_add |
Add new tasks to a status |
source_id, texts[], status, index? |
tasks_update |
Update tasks by ID |
source_id, ids[], status, index? |
tasks_summary |
Get task counts and work-in-progress |
source_id |
ID Format: Both source_id (from file path) and task id (from task text) are 4-character alphanumeric strings (e.g., "xK8p", "m3Qw").
Environment Variables
| Property |
Details |
| TRANSPORT |
Default: stdio, Transport mode: stdio or http |
| PORT |
Default: 4680, HTTP server port (when TRANSPORT=http) |
| PREFIX_TOOLS |
Default: true, Prefix tool names with tasks_ |
| STATUS_WIP |
Default: In Progress, Work-in-progress status name |
| STATUS_TODO |
Default: To Do, ToDo status name |
| STATUS_DONE |
Default: Done, Completed status name |
| STATUS_REMINDERS |
Default: Reminders, Reminders for the AI (empty string to disable) |
| STATUS_NOTES |
Default: Notes, Notes/non-actionable tasks (empty string to disable) |
| STATUSES |
Default: Backlog, Comma-separated additional statuses |
| AUTO_WIP |
Default: true, One WIP moves rest to To Do, first To Do to WIP when no WIP's |
| KEEP_DELETED |
Default: true, Retain deleted tasks (AI can't lose you tasks!) |
| INSTRUCTIONS |
Default: ..., Included in all tool responses, for the AI to follow |
| SOURCES_PATH |
Default: ./sources.json, File to store source registry (internal) |
| DEBUG |
Default: false, if true, enable the tasks_debug tool |
Advanced Configuration Examples
Optional, the WIP/ToDo/Done statuses can be included to control their order.
Custom workflow statuses:
{
"env": {
"STATUSES": "WIP,Pending,Archived,Done,To Review",
"STATUS_WIP": "WIP",
"STATUS_TODO": "Pending",
"AUTO_WIP": "false"
}
}
File Formats
Markdown (.md) - Human-Readable
# Tasks - File Name
## In Progress
- [ ] Write user registration
## To Do
- [ ] Implement authentication
- [ ] Set up CI/CD pipeline
## Backlog
- [ ] Plan architecture
- [ ] Design database schema
## Done
- [x] Set up project structure
- [x] Initialize repository
## Reminders
- [ ] Don't move to Done until you verified it works
- [ ] After you move to Done, commit all the changes, use the task name as the commit message
## Notes
- [ ] The task tools were really great to use!
JSON (.json) - Structured Data
{
"groups": {
"In Progress": [
"Write user registration"
],
"To Do": [
"Implement authentication",
"Set up CI/CD pipeline"
],
"Backlog": [
"Plan architecture",
"Design database schema"
],
"Done": [
"Set up project structure",
"Initialize repository"
],
"Reminders": [
"Don't move to Done until you verified it works",
"After you move to Done, commit all the changes, use the task name as the commit message"
],
"Notes": [
"The task tools were really great to use!"
]
}
}
YAML (.yml) - Configuration-Friendly
groups:
"In Progress":
- Write user registration
"To Do":
- Implement authentication
- Set up CI/CD pipeline
Backlog:
- Plan architecture
- Design database schema
Done:
- Set up project structure
- Initialize repository
Reminders:
- Don't move to Done until you verified it works
- After you move to Done, commit all the changes, use the task name as the commit message
Server Usage
mcp-tasks --help
mcp-tasks
TRANSPORT=http mcp-tasks
TRANSPORT=http PORT=8080 mcp-tasks
STATUS_WIP="Working" AUTO_WIP=false mcp-tasks
CLI Usage
You can also use mcp-tasks (or npx mcp-tasks) as a command-line tool for quick task management:
mcp-tasks setup tasks.md $PWD
mcp-tasks add "Implement authentication"
mcp-tasks add "Write tests" "Backlog"
mcp-tasks add "Fix critical bug" "In Progress" 0
mcp-tasks search
mcp-tasks search "" "auth,login"
mcp-tasks search "To Do,Done" ""
mcp-tasks search "In Progress" "bug"
mcp-tasks update m3Qw,p9Lx Done
mcp-tasks summary
mcp-tasks add "Don't move to Done until you verified it works" Reminders
CLI Features:
- Direct access to all MCP tool functionality
- JSON output for easy parsing and scripting
- Same reliability and duplicate prevention as MCP tools
- Perfect for automation scripts and CI/CD pipelines
๐ง Technical Details
Development
git clone https://github.com/flesler/mcp-tasks
cd mcp-tasks
npm install
npm run dev
npm run dev:http
npm run build
npm run lint
npm run lint:full
Troubleshooting
Requirements
- Node.js โฅ20 - This package requires Node.js version 20 or higher
Common Issues
ERR_MODULE_NOT_FOUND when running npx-tasks
Where are my tasks stored?
- Tasks are stored in the file path you specified by the AI in
tasks_setup
- The absolute path is returned in every tool call response under
source.path
- If you forgot the location, check any tool response or ask the AI to show it to you
Lost content in Markdown files:
- โ ๏ธ The tools will rewrite the entire file, preserving only tasks under recognized status sections
- Non-task content (notes, documentation) may be lost when tools modify the file
- Use a dedicated task file rather than mixing tasks with other content
Why not just have AI edit the task files directly?
- File parsing complexity: AI must read entire files, parse markdown structure, and understand current state - expensive and error-prone
- Multi-step operations: Moving a task from "In Progress" to "Done" requires multiple
read_file, grep_search, sed calls to locate and modify correct sections
- Context loss: Large task files forcing AI to work with incomplete chunks due to token restrictions and lose track of overall structure
- State comprehension: AI struggles to understand true project state when reading fragmented file sections - which tasks are actually in progress?
- Edit precision: Manual editing risks corrupting markdown formatting, losing tasks, or accidentally modifying the wrong sections
- Concurrent editing conflicts: When AI directly edits files, humans can't safely make manual changes without creating conflicts or overwrites
- Token inefficiency: Reading+parsing+editing cycles consume far more tokens than structured tool calls with clear inputs/outputs
- Safety: AI can accidentally change or delete tasks when directly editing files, but with these tools it cannot rewrite or delete your tasks
๐ค Contributing
We welcome contributions! Please:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes with tests
- Run:
npm run lint:full
- Submit a pull request
๐ License
MIT License - see LICENSE for details.
๐ Links