Skip to main content
Glama

mcp-server-demo

A minimal Model Context Protocol server that gives an LLM a persistent scratchpad. It exists to demonstrate all three MCP primitives — tools, resources, and prompts — in about 80 lines of Python.

Built against the Python SDK v2 (mcp>=2.1.1), where FastMCP was renamed to MCPServer.

What it exposes

Primitive

Name

Purpose

Tool

add_note(message)

Appends a note. Model-invoked.

Tool

read_notes()

Returns every stored note.

Resource

notes://latest

The most recent note, as read-only context.

Prompt

note_summary_prompt

A reusable prompt that pulls the notes in and asks for a summary.

The tool/resource split is the point worth noticing. read_notes is a tool because the model decides when to call it. notes://latest is a resource because the client decides when to attach it — it's context, not an action.

Related MCP server: flomo-mcp

Install

Requires Python 3.12+ and uv.

git clone https://github.com/DinaMMahfouz/mcp-server-demo.git
cd mcp-server-demo
uv sync

Verify it imports cleanly:

uv run python -c "import mcp_server_demo.main; print('ok')"

Run

uv run mcp-server-demo

The process will appear to hang. That is correct — it speaks JSON-RPC over stdio and is waiting for a client. Ctrl+C to exit.

To poke at it interactively:

uv run mcp dev src/mcp_server_demo/main.py

Connect to Claude Desktop

Edit claude_desktop_config.json:

  • Windows — %APPDATA%\Claude\claude_desktop_config.json

  • macOS — ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "sticky-notes": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/mcp-server-demo",
        "run",
        "mcp-server-demo"
      ]
    }
  }
}

The path must be absolute. Restart Claude Desktop; the tools appear in the tools menu.

Storage

Notes are written to a per-user data directory, not into the package:

  • Windows — %LOCALAPPDATA%\mcp-server-demo\notes.txt

  • Linux/macOS — $XDG_DATA_HOME/mcp-server-demo/notes.txt, falling back to ~/.local/share/

Override with the STICKY_NOTES_FILE environment variable.

Scope

This is a learning project. It has no tests, no concurrency handling, and no input validation beyond stripping whitespace — a plain-text file appended to by one process. Don't build on it.

License

MIT.

Available Tools

2 tools
add_noteA

Append a note to the notes file.

Parameters
----------
message : str
    The note to append.

Returns
-------
str
    Confirmation that the note was stored.

Inputs: message (required). Returns: result

read_notesA

Read every stored note.

Returns ------- str All notes, newest last, or a message saying there are none.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have completely distinct purposes: one reads all notes and the other appends a note. There is no overlap or ambiguity between them.

    Naming Consistency5/5

    Both tools follow the same lowercase verb_noun pattern: read_notes and add_note. The naming is simple, predictable, and consistent.

    Tool Count3/5

    With only two tools, the server feels minimal but not unreasonable for a basic sticky-notes utility. However, it is on the thin side and offers little beyond append and read-all functionality.

    Completeness3/5

    The server supports creating and reading notes, but lacks update and delete operations, which are common expectations for a note-taking tool. Agents can work around this limitation only if no note modifications or removals are required.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      A simple notes system that allows creating, storing, and accessing text notes through MCP resources and tools, with built-in prompt support for generating summaries of stored notes.
      -
    • F
      license
      B
      quality
      D
      maintenance
      Enables writing and managing notes to flomo via MCP. Provides tools for creating notes, resources for accessing them, and prompts for summarization.
      1
      24 npm
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to manage in-memory notes by listing, fetching, and creating notes through MCP tools over stdio.
      118 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables LLM clients to read, search, create, update, and delete notes in a self-hosted shared memory bank over MCP, using hybrid vector and full-text search with optional summarization.
      4
      MIT