MCP Todo
A todo list server built with the Model Context Protocol (MCP) that supports both stdio and HTTP transports.
Quick Start
Setup
Usage
Stdio Transport (MCP Client Integration)
For use with MCP clients like Cursor:
Configure in Cursor's .cursor/mcp.json:
HTTP Transport (Streamable HTTP)
For HTTP-based access with session management:
The server exposes endpoints at http://localhost:3000/mcp:
POST /mcp- JSON-RPC requestsGET /mcp- SSE stream for server notificationsDELETE /mcp- End session
Authentication
Set TODO_MCP_TOKEN environment variable to enable bearer token authentication:
Then include in requests:
Features
Add todos with unique IDs
List all todos with structured output
Toggle todo completion status
Remove todos by ID
Persistent JSON storage in
~/.mcp-todos.jsonSession-based HTTP transport with SSE support
Optional bearer token authentication
Available Tools
list_todos- Get all todos in structured formatadd_todo- Add a new todo (requires title)toggle_todo- Toggle completion status (requires id)remove_todo- Delete a todo (requires id)
Resources
todos://list- JSON resource containing all todos
Architecture
src/server.ts- Core MCP server with todo logic and stdio transportsrc/http.ts- HTTP transport wrapper with Express and session management