@leonvanzyl/mcp-todo-server
v1.0.3
Published
MCP server for TODO application
Maintainers
Readme
MCP Todo Server
A Model Context Protocol (MCP) server for managing a todo list application.
Features
- List all todos
- Add new todos
- Mark todos as completed
- Update todo details
- Delete individual todos
- Delete all todos
Technologies Used
- TypeScript
- SQLite (for local database)
- Model Context Protocol (MCP)
- Zod (for validation)
Prerequisites
- Node.js (v16 or higher)
- npm
Installation
Global Installation
npm install -g @leonvanzyl/mcp-todo-serverLocal Installation
npm install @leonvanzyl/mcp-todo-serverUsage
Command Line Interface
After installing globally, you can run the server using:
mcp-todo-serverOptions
--db <path>: Path to the SQLite database file (default: ./todo.db)--port <number>: Port for HTTP server (default: 3000, only used with --http)--http: Use HTTP transport instead of stdio (Note: HTTP transport may not be available in all MCP SDK versions)--help: Show help message
Note: The HTTP transport option requires a compatible version of the MCP SDK. If the HTTP transport is not available, the server will automatically fall back to stdio transport.
Using in MCP Client Configuration
You can use this server in your MCP client configuration:
{
"mcpServers": {
"todo": {
"command": "npx",
"args": ["-y", "@leonvanzyl/mcp-todo-server"]
}
}
}Or with custom options:
{
"mcpServers": {
"todo": {
"command": "npx",
"args": [
"-y",
"@leonvanzyl/mcp-todo-server",
"--db",
"/path/to/custom.db"
]
}
}
}Programmatic Usage
You can also use the server programmatically in your Node.js applications:
import todoServer from "@leonvanzyl/mcp-todo-server";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
// Connect to stdio transport
const transport = new StdioServerTransport();
await todoServer.connect(transport);Available Tools
The server provides the following MCP tools:
listTodos: Get all todosaddTodo: Add a new todocompleteTodo: Mark a todo as completedupdateTodo: Update a todo's title or completion statusdeleteTodo: Delete a tododeleteAllTodos: Delete all todos
Development
Setup
git clone https://github.com/yourusername/mcp-todo-server.git
cd mcp-todo-server
npm installBuild
npm run buildRun in Development Mode
npm run devTroubleshooting
HTTP Transport Not Available
If you encounter an error related to the HTTP transport not being available, it means your version of the MCP SDK does not include the HTTP transport module. In this case, the server will automatically fall back to using stdio transport.
To use HTTP transport, you may need to update your MCP SDK version or use a different transport method.
Publishing
To publish the package to npm:
npm login
npm publish --access publicLicense
ISC
