AnthonyAltieri/mcp-server-todo-list
If you are the rightful owner of mcp-server-todo-list and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP Todo Server is a Model Context Protocol server that provides todo list management functionality using SQLite and Drizzle ORM.
create_todo
Create a new todo item.
list_todos
List todos with optional filtering.
get_todo
Get a specific todo by its ID.
update_todo
Update an existing todo.
delete_todo
Delete a todo by its ID.
complete_todo
Mark a todo as completed.
MCP Todo Server
A Model Context Protocol (MCP) server that provides todo list management functionality using SQLite and Drizzle ORM.
Features
- Create, read, update, and delete todos
- Mark todos as completed
- Filter todos by completion status and priority
- Priority levels: low, medium, high
- SQLite database with automatic initialization
Installation
- Install dependencies:
pnpm install
- Run database migrations:
pnpm db:migrate
- Build the project:
pnpm build
Usage
Development
pnpm dev
Production
pnpm start
Available Tools
The MCP server exposes the following tools that can be used by MCP clients:
create_todo
Create a new todo item.
Parameters:
title
(string, required): The title of the tododescription
(string, optional): Detailed descriptionpriority
(enum, optional): Priority level - "low", "medium", or "high" (default: "medium")
list_todos
List todos with optional filtering.
Parameters:
completed
(boolean, optional): Filter by completion statuspriority
(enum, optional): Filter by priority - "low", "medium", or "high"limit
(number, optional): Maximum number of todos to return (default: 20, max: 100)
get_todo
Get a specific todo by its ID.
Parameters:
id
(number, required): The ID of the todo to retrieve
update_todo
Update an existing todo.
Parameters:
id
(number, required): The ID of the todo to updatetitle
(string, optional): New titledescription
(string, optional): New descriptioncompleted
(boolean, optional): Completion statuspriority
(enum, optional): New priority level
delete_todo
Delete a todo by its ID.
Parameters:
id
(number, required): The ID of the todo to delete
complete_todo
Mark a todo as completed.
Parameters:
id
(number, required): The ID of the todo to mark as completed
Database Schema
The server uses a SQLite database with the following schema:
CREATE TABLE todos (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
description TEXT,
completed INTEGER DEFAULT 0,
priority TEXT DEFAULT 'medium',
created_at TEXT DEFAULT (datetime('now')),
updated_at TEXT DEFAULT (datetime('now'))
);
Example Usage with MCP Client
Here's how you might use this server with an MCP client:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const transport = new StdioClientTransport({
command: "node",
args: ["dist/index.js"],
});
const client = new Client({
name: "todo-client",
version: "1.0.0",
});
await client.connect(transport);
// Create a todo
await client.callTool({
name: "create_todo",
arguments: {
title: "Buy groceries",
description: "Milk, eggs, bread",
priority: "high",
},
});
// List all todos
await client.callTool({
name: "list_todos",
arguments: {},
});
Files
src/index.ts
- Main MCP server implementationsrc/db/schema.ts
- Database schema definitionsrc/db/index.ts
- Database connection and initializationdrizzle.config.ts
- Drizzle ORM configuration
Development
The server uses:
- Model Context Protocol SDK for MCP functionality
- Drizzle ORM for database operations
- better-sqlite3 for SQLite database
- Zod for parameter validation
- TypeScript for type safety
The database file (todos.db
) will be created automatically when the server starts.