A task manager an AI can operate. Instead of clicking buttons, you tell an AI host something like "add study Python tomorrow, high priority" and it calls a tool on this server to actually do it.
Built with the MCP Python SDK as a small learning project to understand how MCP tools work end to end: natural language in, structured tool call, real data out.
User -> AI -> MCP Task Server -> tasks.json
- Add task - title, priority, optional due date
- List tasks - all tasks with id, priority and status
- Complete task - mark a task done by id
- Delete task - remove a task by id
- Search tasks - find tasks by a keyword in the title
- Update task - change title, priority and/or due date on an existing task
Priorities are low / medium / high. Status is Pending / Completed. Bad input (missing task id, invalid priority, empty title) returns a plain error message instead of crashing.
server.py MCP server and the 6 tools
tasks.json task storage (plain JSON list)
test_server.py pytest tests for every tool, including bad input
requirements.txt dependencies
Requires Python 3.10+.
uv venv
source .venv/bin/activate
uv pip install -r requirements.txtUse the MCP Inspector to test the server and call its tools directly:
uv run mcp dev server.pyThis opens the Inspector in your browser, where you can see and call each tool: add_task, list_tasks, complete_task, delete_task, search_tasks, update_task.
pytestUser: Add study Python, high priority, due Friday.
AI: Added task 1: Study Python (high)
User: Show my tasks.
AI: 1. Study Python - high - Pending - due Friday
User: Mark it completed.
AI: Task 1 (Study Python) marked as completed.
This is intentionally small: one server file, one data file, one test file, six tools. No frontend, no database, no auth. The point was learning how an AI turns a natural-language request into a structured tool call, not building a full product. More on what I learned in LEARNING.md.