ToDo-List MCP Server

ToDo-List MCP Server

A simple, beginner-friendly Model Context Protocol (MCP) server written in Python. It lets any MCP-compatible AI client (like Claude Desktop) manage a to-do list on your computer through five tools: add, view, get by ID, complete, and delete.

Category
Visit Server

README

Todo List MCP Server

A simple, beginner-friendly Model Context Protocol (MCP) server written in Python. It lets any MCP-compatible AI client (like Claude Desktop) manage a to-do list on your computer through five tools: add, view, get by ID, complete, and delete.

Built with the official MCP Python SDK (mcp[cli]) and its high-level FastMCP interface. Data is stored locally in a plain JSON file — no database required.


1. What This Project Does

This MCP server exposes 5 tools to any connected AI client:

Tool What it does
add_todo(title, description) Adds a new todo
list_todos() Returns every todo currently saved
get_todo(todo_id) Returns one todo by its ID
complete_todo(todo_id) Marks a todo as completed
delete_todo(todo_id) Removes a todo permanently

All data lives in todos.json, created automatically the first time you add a todo.


2. Project Structure

todo-mcp-server/
├── server.py          # Main MCP server — defines the 5 tools
├── storage.py          # Handles reading/writing todos.json
├── todos.json           # Auto-created data file (not committed to git)
├── requirements.txt     # Python dependencies     
├── .gitignore            # Files Git should ignore
└── README.md             

3. Setup

Prerequisites

  • Python 3.10 or newer
  • pip (comes with Python)

Steps

# 1. Clone or download this project, then move into it
cd todo-mcp-server

# 2. Create a virtual environment
python -m venv venv

# 3. Activate it
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate

# 4. Install dependencies
pip install -r requirements.txt

4. Running the Server

Option A — MCP Inspector (recommended for testing):

mcp dev server.py

This opens a browser-based UI where you can call each tool manually and see the JSON responses.

Option B — Install into Claude Desktop:

mcp install server.py --name "Todo List MCP Server"

This registers the server so Claude Desktop starts it automatically.

Option C — Run directly:

python server.py

5. Testing / Example Prompts (in Claude Desktop)

Once connected in Claude Desktop, try:

  • "Add a todo: Buy groceries, with description Milk, eggs, and bread"
  • "Show me all my todos"
  • "Get the todo with ID 1"
  • "Mark todo 1 as completed"
  • "Delete todo 2"

6. Architecture

 MCP Client (Claude Desktop)
          │  (stdio / JSON-RPC)
          ▼
     server.py  (FastMCP tools)
          │
          ▼
     storage.py (reads/writes JSON)
          │
          ▼
     todos.json  (local data file)

The client never touches the JSON file directly — it only calls tools, and the server decides how the data is stored. This separation is a core MCP design idea: the client doesn't need to know how a tool works internally, only what it does.


7. Learning Outcomes

Through this project I learned:

  • What the Model Context Protocol (MCP) is and how it standardizes tool access for LLMs
  • The difference between an MCP server, client, and tools/resources/prompts
  • How to use the official Python SDK's FastMCP interface to build tools quickly from plain Python functions and type hints
  • How to store and manage data locally with a JSON file
  • How to connect and test a custom MCP server inside Claude Desktop
  • How to package, document, and publish a small Python project on GitHub
  • The basics of publishing an MCP server to a marketplace like Smithery

License

MIT — free to use, modify, and share.


Author

Haseeba Yasin

If you found this project helpful, feel free to ⭐ the repository.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured