Skip to main content
Glama
mcp-todo-server

mcp-todo-server

mcp-todo-server

Einfacher MCP-Server (Model Context Protocol), der eine Aufgabenliste (To-do-Liste) bereitstellt, implementiert in TypeScript mit dem offiziellen SDK @modelcontextprotocol/sdk.

Hausaufgabe 1 — Programmierung IV — Model Context Protocol.

Bereitgestellte Funktionen

Typ

Name

Beschreibung

Resource

tasks://list

Gibt die vollständige Liste der in tasks.json gespeicherten Aufgaben zurück

Tool

add_task

Fügt eine neue Aufgabe hinzu (Name, Beschreibung, Priorität)

Tool

complete_task

Markiert eine vorhandene Aufgabe als abgeschlossen, anhand ihrer ID

Prompt

daily_summary

Erstellt eine Vorlage für eine Zusammenfassung des aktuellen Aufgabenstands

Related MCP server: MCP Todo Server

Projektstruktur

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

Voraussetzungen

  • Node.js 18 oder höher

  • npm

Installation

npm install

Dies installiert die Abhängigkeiten: @modelcontextprotocol/sdk, zod (Schemaprüfung) sowie die Entwicklungsabhängigkeiten typescript, @types/node und tsx.

Ausführung

Entwicklungsmodus (führt TypeScript direkt aus, ohne zu kompilieren):

npm run dev

Produktionsmodus (kompiliert zu JavaScript und führt dann aus):

npm run build
npm start

Der Server kommuniziert über stdio (Standard-Eingabe/Ausgabe), das Transportprotokoll, das von Claude Desktop und den meisten MCP-Clients verwendet wird. Beim erfolgreichen Start siehst du in der Konsole:

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

Diese Meldung erscheint absichtlich über stderr, um die JSON-RPC-Kommunikation über stdout nicht zu beeinträchtigen.

So testest du ohne grafische Oberfläche

Du kannst den offiziellen Inspector von MCP verwenden, der eine Weboberfläche zum Aufrufen von Resources, Tools und Prompts bereitstellt:

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

Verwendungsbeispiele für jede Funktion

Resource „Aufgaben lesen“ → gibt das Array tasks aus tasks.json im JSON-Format zurück.

Tool add_task, Argumente:

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

Tool complete_task, Argumente:

{ "id": 1 }

Prompt daily_summary benötigt keine Argumente: erstellt automatisch eine Zusammenfassung der offenen und abgeschlossenen Aufgaben, gruppiert nach Priorität.

Autor

Camila — Universidad Nacional de Costa Rica, Programmierung IV.

Available Tools

2 tools
add_taskAgregar tareaC

Agrega una nueva tarea con nombre, descripción y prioridad

Inputs: name (required), priority (required), description (required).

complete_taskCompletar tareaB

Marca una tarea existente como completada dado su ID

Inputs: id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools target clearly separate actions (create vs. mark-complete) on the same resource, so there is no realistic chance of misselection. An agent can tell them apart from the names alone.

    Naming Consistency4/5

    Both names follow the same verb_noun snake_case pattern (add_task, complete_task), which is consistent and readable. Minor quibble: 'add' and 'complete' are different verb families (create vs. state-change), but the pattern itself is uniform.

    Tool Count2/5

    With only two tools the surface is very thin for a todo domain, which typically needs listing, updating, and deleting. Two is at the low end that reads as under-scoped rather than focused.

    Completeness2/5

    There is no way to list or fetch tasks, so an agent cannot discover the IDs that complete_task requires — a hard dead end. Update, delete, and read operations are all missing, leaving only a partial lifecycle.

    Related MCP Connectors

    Related MCP Servers