MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Server
A small task manager that AI agents can use through the Model Context Protocol (MCP). An agent can create tasks, list tasks, and update task status. The tasks are stored in a local SQLite file.
This is a learning project. It shows every layer of an MCP application in five small Python files, from the SQL statements to a chat agent.
I built this project by following the video Build MCP Server for AI application (Full Project, step-by-step).
What MCP does in this project
Without MCP, each AI application needs its own custom code for each tool. With MCP, a program publishes its tools once, and any MCP client can discover and call them.
In this project, three different clients use one set of tools:
flowchart LR
A["client.py<br/>fixed Python calls"] -->|MCP over HTTP| S
B["langchain_client.py<br/>Claude agent"] -->|MCP over HTTP| S
C["MCP hosts<br/>configured by .mcp.json"] -->|MCP over HTTP| S
S["server.py<br/>tool definitions"] --> D["database.py<br/>SQL"]
D --> F[("data/tasks.db")]Related MCP server: Productivity Tracker MCP Server
Project structure
.
├── src/mcp_server/
│ ├── __init__.py # Package overview and a placeholder main()
│ ├── database.py # SQLite functions. All the SQL is in this file
│ ├── server.py # The MCP server and its three tools
│ ├── client.py # A script that calls the tools without an LLM
│ └── langchain_client.py # A terminal chat with a Claude agent
├── .env.template # The environment variable that the agent needs
├── .mcp.json # The server address for MCP hosts
├── LICENSE # The MIT License
├── pyproject.toml # Project metadata and dependencies
└── uv.lock # Exact dependency versionsThe database file, data/tasks.db, and your .env file are not in Git.
If you are new to this code, read the files in this order: database.py, server.py, client.py, and langchain_client.py. Each file starts with a docstring that explains its job and how to run it.
Set up and run the project
You need uv, which installs the correct Python version (3.12) for you. The chat agent also needs an Anthropic API key.
Clone the repository and install the dependencies.
git clone https://github.com/AdamXiang/MCP_Server.git cd MCP_Server uv syncCreate the database and one sample task. Run this command only once, because a second run stops with a
UNIQUE constraint failederror.uv run python -m mcp_server.databaseYou see the sample task:
[{'task_id': '1', 'title': 'new task', 'description': 'test', 'priority': 'low', 'status': 'todo'}]Start the server. The server keeps running in this terminal, at
http://127.0.0.1:8000/mcp.uv run python -m mcp_server.serverOpen a second terminal and run the test client. The client lists the tools, creates a task, and sets the sample task to
in progress.uv run python -m mcp_server.clientThe output starts with the tool names:
create_task list_tasks update_task_statusOptional: chat with the agent. To do this, copy the template and add your API key to
.env. Each model call uses your Anthropic API credits.cp .env.template .env uv run python -m mcp_server.langchain_clientTry "Add a high priority task to write tests". Type
qto exit.
To stop the server, press Ctrl+C in its terminal. To delete all the tasks, stop the server, delete data/tasks.db, and repeat step 2.
Connect an MCP host
.mcp.json tells an MCP host, such as Claude Code, where the server is. Claude Code reads this file from the project root and asks you to approve the server. Start the server before you use its tools from the host.
Tools reference
Tool | Arguments | Returns |
|
| The new task |
| None | A list of all the tasks |
|
| The updated task, or |
Task fields
All the columns in the tasks table have the type TEXT, and none of them can be null.
Column | Meaning |
| The primary key. |
| The short name of the task |
| The details of the task. This value can be an empty string |
| The importance of the task |
| The progress of the task |
Future work
I found these problems by running the current code. None of them is fixed yet. The list starts with the problems that a new user meets first.
Problem | What happens now | Planned fix |
The server does not create the database | Before you run step 2, tool calls fail with | Call |
| Each Ctrl+C adds a task with the title | Delete the |
| The database has two spellings of one status, and a caller cannot set a task back to | Define |
| A second run stops with | Use |
| A caller can save a value such as | Define |
The | The command does not start the server | Add a |
| These PyPI packages are not needed, because the imports use the Python standard library | Run |
The project has no automated tests | You check changes by running | Add |
Technologies
FastMCP for the MCP server and the test client.
LangChain and LangGraph for the chat agent.
Claude (
claude-haiku-4-5) for the chat agent model.SQLite for storage, through the Python standard library.
uv for dependencies and for running the code.
Acknowledgments
The idea and the structure of this project come from the video Build MCP Server for AI application (Full Project, step-by-step).
License
This project uses the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI-native task management: list, create, update and archive tasks with rich context for AI agents
Shared task layer for AI agents: tasks, handoffs and decisions that persist across tools.
Personal task list for AI agents: read, add and delegate tasks over MCP, reports return to the task.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Related MCP Servers
- AlicenseAqualityDmaintenanceA local Model Context Protocol server providing backend tools for AI agents to manage projects and tasks with persistent storage in SQLite, enabling structured tracking of project tasks with dependencies, priorities, and statuses.127 npm25GPL 3.0
- FlicenseNot gradedqualityDmaintenanceEnables natural language task management including logging, updating, and summarizing productivity activities across multiple categories using a local SQLite database. It allows users to manage workflows and generate time-based summaries through standardized Model Context Protocol tools.1-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with SQLite databases by executing read and write queries, listing tables, and inspecting schemas. It provides a secure, local interface for database management and data retrieval through the Model Context Protocol.2MIT
- AlicenseAqualityCmaintenanceEnables AI agents to manage hierarchical tasks and stories stored as Markdown files, providing tools for creating, listing, editing, and updating task status through the Model Context Protocol.9MIT