todo-mcp-server
Todo MCP Server
A robust, persistent task management server built on the Model Context Protocol (MCP) using Python and FastMCP.
Overview
The Todo MCP Server provides language models and AI agents with a persistent, stateful task management interface. Built using the official Python MCP SDK (FastMCP), it exposes tools that allow AI assistants to create, track, filter, and complete tasks directly within their workflow.
State is persisted locally to structured JSON storage (tasks.json), ensuring task data survives server restarts, client reconnections, and multi-turn agent sessions. Communication follows the MCP specification using JSON-RPC 2.0 over standard input/output (stdio).
Related MCP server: Task Manager MCP Server
Architecture & Data Flow
+-------------------------------------------------------------------+
| MCP Host / AI Client |
| (Claude Desktop, Cursor, Antigravity) |
+-------------------------------------------------------------------+
|
JSON-RPC 2.0 over stdin / stdout
v
+-------------------------------------------------------------------+
| Todo MCP Server |
| |
| +-----------------------------------------------------------+ |
| | FastMCP Engine | |
| | - Protocol negotiation & schema reflection | |
| | - Tool dispatch & argument validation (Pydantic/Typing) | |
| +-----------------------------------------------------------+ |
| | |
| +-----------------------------+-----------------------------+ |
| | | | |
| v v v |
| [ add_task ] [ list_tasks ] [ complete_task ]
| | | | |
| +-----------------------------+-----------------------------+ |
| | |
| v |
| +-----------------------------------------------------------+ |
| | Storage Controller | |
| | - Atomic read/write operations | |
| | - Schema serialization with ISO 8601 UTC timestamps | |
| +-----------------------------------------------------------+ |
+-------------------------------------------------------------------+
|
v
+-------------------------------------------------------------------+
| Local Storage: tasks.json |
+-------------------------------------------------------------------+Tools Reference
The server exposes three distinct tools for full task lifecycle management.
1. add_task
Creates a new task item and appends it to persistent storage.
Description: Add a new task to the todo list.
Parameters:
title(string, required): Description of the task. Length must be between 1 and 200 characters.priority(string, optional): Urgency level. Accepted values:"low","medium","high". Default:"medium".
Validation Rules:
Empty or whitespace-only strings are rejected.
Titles exceeding 200 characters return an error.
Non-conforming priority values fail schema validation.
Example Request:
{
"title": "Implement integration test suite",
"priority": "high"
}Example Response:
Task added!
ID: 1
Title: Implement integration test suite
Priority: high
Status: pending2. list_tasks
Retrieves saved tasks with optional filtering by completion status.
Description: List tasks from the todo list with optional status filtering.
Parameters:
status(string, optional): Filter criteria. Accepted values:"all","pending","done". Default:"all".
Formatting: Returns a formatted ASCII table summarizing task IDs, status indicators, priority levels, and titles.
Example Request:
{
"status": "pending"
}Example Response:
Tasks (pending) — 2 found:
ID Status Priority Title
———— ————————— ———————— ————————————————————————————————————————
1 pending high Implement integration test suite
2 pending medium Update project documentation3. complete_task
Marks an existing task as completed by its unique integer identifier.
Description: Mark a task as done by its numeric ID.
Parameters:
task_id(integer, required): The unique numeric identifier assigned to the task.
Behavior:
Updates the task status to
"done".Sets the
completed_atfield to the current ISO 8601 UTC timestamp.Idempotent: If the task is already completed, the tool notifies the client without corrupting timestamps.
If the ID does not exist, an error response is returned with the list of currently valid IDs.
Example Request:
{
"task_id": 1
}Example Response:
Task 1 completed!
Title: Implement integration test suite
Completed at: 2026-08-20T09:46:17.466797+00:00Tool Summary Table
Tool | Purpose | Parameters | Return Type |
| Create a new task |
|
|
| Query stored tasks |
|
|
| Mark a task as completed |
|
|
Data Model & Persistence
Task records are serialized as UTF-8 encoded JSON arrays. By default, records are stored in tasks.json in the current working directory. The storage file path can be customized via the TODO_FILE environment variable.
Schema Definition
[
{
"id": 1,
"title": "Implement integration test suite",
"priority": "high",
"status": "done",
"created_at": "2026-08-20T09:46:17.362387+00:00",
"completed_at": "2026-08-20T09:46:17.466797+00:00"
},
{
"id": 2,
"title": "Update project documentation",
"priority": "medium",
"status": "pending",
"created_at": "2026-08-20T09:46:17.384689+00:00",
"completed_at": null
}
]Field Specifications
id(integer): Auto-incrementing positive integer identifier.title(string): Task description string (1-200 chars).priority(string): Urgency classification ("low","medium","high").status(string): Lifecycle stage ("pending"or"done").created_at(string): ISO 8601 formatted UTC timestamp recorded at creation.completed_at(string | null): ISO 8601 formatted UTC timestamp recorded upon completion.
Requirements
Python: Version 3.10 or higher
Dependencies:
mcp[cli]>=1.28,<2
Installation & Setup
1. Clone the Repository
git clone https://github.com/moazhassan751/mcp-todo-server.git
cd mcp-todo-server2. Create a Virtual Environment
# Linux/macOS
python3 -m venv .venv
source .venv/bin/activate
# Windows
python -m venv .venv
.venv\Scripts\activate3. Install Dependencies
pip install -r requirements.txtExecution Modes
Standard Execution (stdio)
Run the server directly for production or MCP host integration:
python server.pyDeveloper Inspection (MCP Inspector)
The MCP Inspector provides an interactive browser-based interface to test tools, inspect schemas, and simulate requests:
mcp dev server.pyThe inspector will launch and provide a local interface URL (typically http://localhost:6274).
Client Integration Guide
To connect the Todo MCP Server to your preferred AI environment, configure the server in your client's MCP configuration file.
Claude Desktop
Edit your Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"todo-server": {
"command": "python",
"args": ["/absolute/path/to/mcp-todo-server/server.py"]
}
}
}Cursor
Add to .cursor/mcp.json in your project or global directory:
{
"mcpServers": {
"todo-server": {
"command": "python",
"args": ["/absolute/path/to/mcp-todo-server/server.py"]
}
}
}Antigravity IDE
Add to .agents/mcp_config.json in your workspace:
{
"mcpServers": {
"todo-server": {
"command": "python",
"args": ["/absolute/path/to/mcp-todo-server/server.py"]
}
}
}Testing & Verification
The repository includes comprehensive automated test scripts:
Standard Test Suite
Tests basic tool calls, parameter validations, and output formatting:
python test_server.pyMulti-Session Audit Test
Simulates separate client connections, restarts the server process across sessions, and validates that persistent storage correctly retains state:
python audit_test.pyProject Structure
mcp-todo-server/
├── server.py # Core MCP server definition and tool implementations
├── test_server.py # Automated stdio protocol unit tests
├── audit_test.py # Multi-session persistence and edge-case verification
├── requirements.txt # Package dependencies
├── .gitignore # Version control ignore definitions
└── README.md # Technical documentation and integration referenceLicense
This project is open source and available under the MIT License.
This server cannot be installed
Maintenance
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA CRUD todo list server that exposes tools to create, list, and conclude tasks, compatible with any MCP host.8MIT
- FlicenseAqualityCmaintenanceA small Model Context Protocol (MCP) server that lets an AI assistant manage a to-do list on your behalf.4
- FlicenseNot gradedqualityBmaintenanceA minimal Python MCP Todo server backed by Appwrite Cloud, providing tools to add, list, get, update, complete, and delete tasks.
- AlicenseBqualityNot gradedmaintenanceA basic MCP server for managing a todo list stored in a local JSON file, enabling task creation, completion, listing, and daily summary generation.28MIT
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
A basic MCP server to operate on the Postman API.
MCP (Model Context Protocol) server for Appwrite
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/moazhassan751/mcp-todo-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server