Skip to main content
Glama
cchanquispe08-blip

mcp-todo-server

mcp-todo-server

Basic MCP (Model Context Protocol) server that exposes a to-do list, implemented in TypeScript with the official @modelcontextprotocol/sdk.

Extra Class Assignment 1 — Programming IV — Model Context Protocol.

Exposed capabilities

Type

Name

Description

Resource

tasks://list

Returns the complete list of tasks stored in tasks.json

Tool

add_task

Adds a new task (name, description, priority)

Tool

complete_task

Marks an existing task as completed, given its ID

Prompt

daily_summary

Generates a summary template of the current state of the tasks

Related MCP server: MCP Todo Server

Project structure

mcp-todo-server/
├── src/
│   └── server.ts       # Servidor MCP principal
├── tasks.json           # Almacenamiento de tareas (base de datos simple)
├── tsconfig.json        # Configuración de TypeScript
├── package.json
└── README.md

Requirements

  • Node.js 18 or higher

  • npm

Installation

npm install

This installs the dependencies: @modelcontextprotocol/sdk, zod (schema validation), and as development dependencies typescript, @types/node, and tsx.

Execution

Development mode (runs the TypeScript directly, without compiling):

npm run dev

Production mode (compiles to JavaScript and then runs):

npm run build
npm start

The server communicates via stdio (standard input/output), which is the transport used by Claude Desktop and most local MCP clients. When it starts correctly you will see in the terminal:

Servidor MCP 'mcp-todo-server' corriendo por stdio...

That message goes out through stderr on purpose, so as not to interfere with the JSON-RPC messages that go through stdout.

How to test it without a graphical client

You can use the official MCP Inspector, which opens a web interface to invoke Resources, Tools, and Prompts by hand:

npx @modelcontextprotocol/inspector npx tsx src/server.ts

Example usage of each capability

Read the tasks resource → returns the tasks array from tasks.json in JSON format.

Tool add_task, arguments:

{ "name": "Repasar JSON-RPC", "description": "Leer la especificación 2.0", "priority": "media" }

Tool complete_task, arguments:

{ "id": 1 }

Prompt daily_summary takes no arguments: it automatically builds a summary with the pending and completed tasks, grouped by priority.

Author

Camila — National University of Costa Rica, Programming IV.

Related MCP Connectors

Related MCP Servers