Task / To-Do Manager — MCP Server
Click on "Deploy 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 / To-Do Manager — MCP ServerAdd a task to buy groceries and then list my pending tasks."
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.
Task / To-Do Manager — MCP Server
A small MCP server that gives an AI assistant a menu of 5 things it can do with a personal to-do list: add a task, list tasks, look one up, mark it done, and delete it. Built for the "Building an MCP Server" beginner lab.
What it does
The server exposes:
5 tools — the actions the AI assistant can trigger
1 bonus resource — a read-only view of pending tasks
Storage — a single JSON file (
tasks.json), created automatically the first time you add a task. No database.Transport — stdio (standard input/output), the simplest option, as used throughout this lab.
Related MCP server: Task MCP Server
Setup
# 1. Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windows
# 2. Install dependencies
pip install -r requirements.txtNote on SDK version: this server is written against MCP Python SDK v2 (
mcp>=2.0.0), which is whatpip install mcpgives you today. If you followed an older guide that usesfrom mcp.server.fastmcp import FastMCP, that class was renamed — this server uses the current equivalent,from mcp.server.mcpserver import MCPServer. The tool and resource decorators (@mcp.tool(),@mcp.resource()) work the same way either version.
Running it
python server.pyThe server communicates over stdio, so it's meant to be launched by an MCP client (like MCP Inspector or an AI assistant), not run and watched directly.
To test it by hand, point MCP Inspector at it:
npx @modelcontextprotocol/inspector python server.pyThen open the URL Inspector prints, and you'll see all 5 tools plus the resource listed — click into any of them to call it and see the result.
Tools
1. add_task(title, notes="")
Adds a new task. title is required and cannot be empty.
Example call:
{ "title": "Buy milk", "notes": "Get 2% not whole" }Returns:
{ "status": "created", "task": { "id": "1", "title": "Buy milk", "notes": "Get 2% not whole", "done": false, "created_at": "..." } }2. list_tasks(only_pending=False)
Lists all tasks, newest first. Set only_pending: true to see just the
tasks that aren't done yet.
Example call:
{ "only_pending": true }Returns:
{ "count": 1, "tasks": [ { "id": "2", "title": "Write report", "...": "..." } ] }3. get_task(task_id)
Fetches the full details of one task by its ID.
Example call:
{ "task_id": "1" }Returns: { "task": { ... } } or { "error": "No task found with id '1'." }
4. complete_task(task_id)
Marks a task as done and stamps it with completed_at.
Example call:
{ "task_id": "1" }Returns: { "status": "completed", "task": { ... } }
5. delete_task(task_id)
Permanently removes a task.
Example call:
{ "task_id": "1" }Returns: { "status": "deleted", "task": { ... } }
Bonus resource
tasks://pending
A read-only JSON snapshot of every task that hasn't been completed yet. Unlike a tool, this doesn't do anything — it just hands over data.
Error handling
add_taskwith an empty/missingtitle→ a clear JSON error, not a crash ({"error": "title is required and cannot be empty."}).get_task,complete_task,delete_taskwith an unknowntask_id→ a clear JSON error naming the missing ID.complete_taskcalled twice on the same task → returns{"status": "already_done", ...}instead of a duplicate-completion error.Missing required fields entirely (e.g. calling
add_taskwith notitlekey at all) are caught automatically by the tool's input schema before the code even runs, and reported back as a validation error.If
tasks.jsonis ever manually corrupted, the server treats it as an empty list instead of crashing on startup.
Example end-to-end walkthrough
A realistic request like "add a task and then show me all my pending tasks" looks like this:
add_task({"title": "Finish lab report"})→ task1created.list_tasks({"only_pending": true})→ returns[task 1].complete_task({"task_id": "1"})→ task1marked done.list_tasks({"only_pending": true})→ returns[].
Project structure
todo-mcp-server/
├── server.py # the MCP server: tools, resource, entry point
├── tasks.json # created automatically on first add_task call
├── requirements.txt
└── README.mdThis server cannot be deployed
Maintenance
Related MCP Connectors
Manage Superlist tasks and lists in plain language from any MCP-compatible AI agent.
AI-native task management: list, create, update and archive tasks with rich context for AI agents
- mcpOAuthnet.todoist
Official Todoist MCP server for AI assistants to manage tasks, projects, and workflows.
Manage tasks, Focus Zone, notes, projects, and task history from compatible AI assistants.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA persistent todo list server that enables AI assistants to manage tasks across different platforms using the Model Context Protocol. It provides tools for creating, listing, updating, and deleting todos with support for priorities, tags, and due dates.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI clients to manage todo tasks through Tools for adding, listing, completing, and searching, alongside Prompts for daily reviews and task breakdowns. Exposes task lists and statistics as Resources with local JSON file persistence.-
- AlicenseAqualityDmaintenanceEnables AI assistants to manage a todo list with add, list, complete, and delete tasks.45 npmMIT
- AlicenseAqualityCmaintenanceEnables AI clients like Claude to read and manage Microsoft To Do task lists and tasks via the Microsoft Graph API, running locally over stdio with secure token storage.1025 npmMIT