Link: https://amanxai.com/2026/02/22/build-your-first-mcp-server-in-python/
A simple Model Context Protocol (MCP) server built with Python that allows AI assistants like Claude Desktop, Cursor, or any MCP-compatible client to manage a task list through natural language.
This project demonstrates how Large Language Models can securely interact with external tools by exposing task management capabilities through MCP.
Model Context Protocol (MCP) is an open standard that enables AI models to connect with external applications, tools, and data sources using a common interface.
Instead of creating custom integrations for every AI application, developers can build an MCP server once and make it accessible to any MCP-compatible client.
The MCP ecosystem consists of three main components:
- MCP Host — The application where users interact with the AI (Claude Desktop, Cursor, etc.)
- MCP Client — Handles communication between the AI model and the MCP server
- MCP Server — Exposes tools, resources, and prompts that the AI can access
User
|
v
AI Assistant (MCP Host)
|
v
MCP Client
|
v
Task Manager MCP Server
|
v
In-memory Task Storage
The MCP server exposes the following tools:
- ➕ Add new tasks
- 📋 View all existing tasks
- 🗑️ Remove completed or unnecessary tasks
- ✏️ Update task information
Read-only data that can provide additional context to the AI.
Reusable templates that help guide the AI in interacting with the MCP server.
- Python 3
- Model Context Protocol (MCP)
- MCP Python SDK
git clone https://github.com/your-username/task-manager-mcp.git
cd task-manager-mcppython -m venv .venvActivate the environment:
Windows
.venv\Scripts\activateLinux/macOS
source .venv/bin/activatepip install -r requirements.txtStart the server:
python server.pyFor development and testing using MCP Inspector:
mcp dev server.pyUser:
Add "Finish the MCP project README" to my tasks.
AI Assistant:
✅ Task added successfully.
User:
What tasks do I have pending?
AI Assistant:
You have 1 pending task:
- Finish the MCP project README
- Persistent storage with SQLite or PostgreSQL
- Task priorities and due dates
- User authentication
- Calendar integrations
- Notifications and reminders
This project is licensed under the MIT License.