MCP Todo Skill
Creates a production-ready, stateless Model Context Protocol (MCP) server for managing todo tasks.
What This Skill Does
- •Generates a fully functional Python MCP server using
FastMCP. - •Implements 5 core tools:
add,list,complete,delete,update. - •Enforces strict user isolation via
user_idarguments. - •Persists data to PostgreSQL.
- •Provides instructions for running and registering the server.
What This Skill Does NOT Do
- •Handle user authentication (assumes
user_idis provided by trusted caller). - •Create the database schema (assumes existing or external setup).
- •Deploy the server (provides local execution instructions only).
Before Implementation
Gather context to ensure successful implementation:
| Source | Gather |
|---|---|
| Codebase | DB connection details (DATABASE_URL), existing SQLModel definitions. |
| Conversation | Specific user needs (custom fields, extra status types?). |
| Skill References | references/mcp-concepts.md (server setup), references/user-isolation.md (security). |
| User Guidelines | Project naming conventions, architectural constraints (statelessness). |
Ensure all required context is gathered before implementing. Only ask user for THEIR specific requirements (domain expertise is in this skill).
Implementation Workflow
- •
Verify Prerequisites:
- •Python 3.10+
- •
mcpSDK installed - •
sqlmodelandpsycopg2-binary(or asyncpg) installed
- •
Generate Server Code:
- •Use
assets/server_template.pyas the base. - •Adjust
DATABASE_URLandTodoTaskmodel definition to matchbackend/models.pyif available.
- •Use
- •
Register Extension:
- •Create a
claude_mcp_config.jsonentry or update.claude/mcp-config.json. - •Command:
uvicorn mcp_server:mcp.apporpython mcp_server.py.
- •Create a
- •
Verify Tools:
- •Ensure all 5 tools are exposed.
- •Check error handling (try accessing non-existent task).
Output Checklist
- • Server instantiates
FastMCP("Todo Manager"). - • 5 tools implemented:
add_task,list_tasks,complete_task,delete_task,update_task. - • All tools accept
user_idas first argument. - • No global state or in-memory storage used.
- • Returns strictly typed dictionaries/JSON.
Reference Files
| File | When to Read |
|---|---|
references/mcp-concepts.md | For FastMCP specifics & error handling patterns. |
references/user-isolation.md | For security & stateless design rules. |
assets/server_template.py | Source code for the MCP server implementation. |