A TypeScript-based server implementation for managing todos, built with the Model Context Protocol (MCP) SDK.
This project provides a server implementation that allows interaction with a todo management system. It integrates with the Model Context Protocol SDK and provides functionality to fetch and manage todo items.
- Todo item retrieval by ID
- Integration with MCP SDK
- TypeScript support
- Development mode with hot reloading
- Built-in debugging capabilities
- Node.js (Latest LTS version recommended)
- Yarn package manager
- Cursor IDE
- Claude Desktop App
# Clone the repository
git clone git@github.com:jrmatos/mcp-server.git
cd mcp-todo-server
# Install dependencies
yarn install
# Build and link the package
yarn build:binary-
First, ensure you have built and linked the package using
yarn build:binary -
In Cursor:
- Open Settings
- Navigate to the Extensions or MCP section
- Click "Add MCP"
- Enter
mcp-todo-serveras the package name - The MCP will be automatically detected since it's linked globally
-
In Claude Desktop:
- Open Settings
- Go to the Integrations or MCP section
- Click "Add New MCP"
- Type
mcp-todo-serveras the package name - The MCP will be automatically detected and available for use
-
Verify Installation:
- In either app, you can test the installation by trying to get a todo:
const todo = await getTodo({ id: "1" });
To run the server in development mode with hot reloading:
yarn devThis will start the server using ts-node-dev with automatic reloading on file changes.
To build the project:
yarn buildThis will:
- Clean the previous build
- Compile TypeScript to JavaScript
- Make the binary executable
- Set up binary linking
yarn start- Run the built server in development mode with debuggingyarn dev- Run the server in development mode with hot reloadingyarn build- Build the TypeScript projectyarn test- Run testsyarn prepare- Build the project (used in CI/CD)yarn clean- Remove build artifactsyarn rebuild- Clean and rebuild the projectyarn link-binary- Set up binary linking
The project uses environment variables for configuration. Create a .env file in the root directory with the following variables:
NODE_ENV=development
DEBUG=*@modelcontextprotocol/sdk: ^1.9.0axios: ^1.6.7debug: ^4.3.4zod: ^3.22.4
@types/debug: ^4.1.12@types/node: ^20.11.24ts-node-dev: ^2.0.0typescript: ^5.3.3
// Example of getting a todo by ID
const todo = await getTodo({ id: "5" });Here are some example prompts you can use with Claude in Cursor or Claude Desktop to interact with the todo MCP:
use getTodo to get todo 1
get todos 1, 2, and 3 and compare their completion status
get todo 5 and format it as a markdown list
check if todo 4 is completed
get todo 7 and summarize its title in a more concise way
get todos 1 and 2, then tell me which one is completed
These prompts demonstrate different ways to interact with the getTodo tool. Claude will understand these natural language requests and use the getTodo tool appropriately to fetch and process the todo information.
This project is licensed under the MIT License.