ai-todo v3.0+ includes a built-in Model Context Protocol (MCP) server. This allows Cursor's AI agent to directly interact with your task list—reading tasks, adding items, and marking them complete—without you needing to type CLI commands or paste file contents.
- uv installed (
curl -LsSf https://astral.sh/uv/install.sh | sh) - Cursor IDE (latest version)
Create a .cursor/mcp.json file in your project root:
{
"mcpServers": {
"ai-todo": {
"command": "uvx",
"args": ["ai-todo", "serve", "--root", "${workspaceFolder}"]
}
}
}This configuration:
- Uses
uvxto runai-todoon-demand without permanent installation. - Runs the
servecommand to start the MCP server. - Sets the
--rootto the current workspace folder, ensuring the correctTODO.mdis used.
If you prefer a global setup (not recommended for multiple projects), you can configure it in Cursor Settings:
-
Install ai-todo:
uv tool install ai-todo
-
Locate the Command:
which ai-todo -
Configure Cursor:
- Name:
ai-todo - Type:
stdio - Command:
ai-todo(or full path) - Arguments:
serve
Note: Without the
--rootargument, the global server will look forTODO.mdin the directory where Cursor was launched. - Name:
-
Verify Connection:
Once added, the status indicator next to
ai-todoshould turn green.
Once connected, you can ask Cursor's AI (Composer or Chat) to manage your tasks naturally.
Examples:
- "Add a task to check the logs for errors."
- "What are my high priority tasks?"
- "Mark task #15 as complete."
- "Create a subtask under #10 for writing tests."
Cursor will automatically call the appropriate ai-todo tools (add_task, list_tasks, complete_task) to perform the action.
The MCP server also supports maintenance operations for keeping your TODO.md clean:
Prune Old Archived Tasks:
- "Prune archived tasks older than 60 days"
- "Remove tasks #1 through #50 from the archive"
- "Preview what would be pruned with a dry run"
The prune_tasks tool creates automatic backups in .ai-todo/archives/ before making changes, preserving complete task metadata for restoration if needed.
Permanently remove expired deleted tasks (30-day retention).
Examples:
- "Empty the trash"
- "Remove expired deleted tasks"
- "Preview what would be removed from trash"
The empty_trash tool permanently removes deleted tasks where the expiration date (expires_at) has passed. This operation runs automatically on MCP server startup and provides a manual tool for explicit cleanup. No backup is created (true "Empty Trash" semantics).
In addition to tools, the ai-todo MCP server exposes resources for read-only access to task data:
| Resource URI | Description |
|---|---|
tasks://open |
All open tasks (pending + in-progress) |
tasks://active |
Currently active tasks (#inprogress) |
tasks://{id} |
Single task details with subtasks |
config://settings |
Current ai-todo configuration |
Resources return JSON data and can be accessed by MCP clients for building task panels or monitoring task state.
- The MCP server runs locally on your machine.
- It only accesses the
TODO.mdfile in the specified root directory. - No data is sent to external servers.