Skip to main content
Glama

minimal mcp server

A single file MCP server backed by an in memory todo list. It touches all three MCP primitives (tools, resources, prompts) plus elicitation, in about 250 lines.

Architecture

The list lives in memory only. Nothing is written to disk, so every restart starts fresh with two seeded todos.

Three tools let Claude add a todo, mark one done, or delete one. Deleting is the only action that pauses mid call and asks you to confirm first, since it can't be undone; the other two just run.

Two resources expose the same data as read only content instead of actions. One returns the whole list as a markdown checklist. The other takes an id through a URI template and returns just that one item, converting the id from text to a number itself since URI segments always arrive as strings.

One prompt, plan_my_day, bundles the full list with an instruction asking Claude to pick the three most important undone items. Triggering it attaches the resource and sends the request in a single click instead of doing both by hand.

Related MCP server: Basic MCP Server

Run it

uv sync
uv run python smoke_test.py     # drives the server as a real client, 13 checks
uv run mcp dev todo_server.py   # opens the MCP Inspector

Connect it to a host

claude mcp add todos -- uv --directory "<path to this repo>" run python todo_server.py

Available Tools

3 tools
add_todoA

Add a new todo item.

Use when the user asks to add, create, or note down a task.

Inputs: text (required). Returns: What a todo looks like once it crosses the wire.

complete_todoA
Idempotent

Mark a todo as done, by id.

Read todos://all first if you do not already know the id.

Inputs: todo_id (required). Returns: What a todo looks like once it crosses the wire.

remove_todoA
Destructive

Permanently delete a todo, after asking the user to confirm.

Use when the user asks to delete or remove a task.

Inputs: todo_id (required). Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a distinct action on todos: adding, completing, and removing. There is no overlap or ambiguity between them.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern: add_todo, complete_todo, remove_todo. This makes the tool set predictable and easy to navigate.

    Tool Count5/5

    With only 3 tools, the set is appropriately scoped for a minimal todo server. Each tool is essential and there is no unnecessary complexity.

    Completeness4/5

    The tools cover create (add), update (complete), and delete (remove) operations. Reading is handled via a resource (todos://all), but there is no dedicated update for task text; still, the core lifecycle is covered for a minimal todo server.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A minimal demonstration server showcasing MCP protocol capabilities including tools, resources, and prompts with basic examples like hello world functionality.
      6 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A minimal template MCP server demonstrating basic tools, resources, and prompts functionality. Includes example implementations like a hello tool, history resource, and greet prompt for learning MCP development.
      6 npm
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      A sample MCP server that exposes tools, resources, and prompts for managing users and todos, supporting both stdio and Streamable HTTP transports.
      ISC