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.
ParametersJSON Schema
NameRequiredDescriptionDefault
messageYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Because no annotations are provided, the description carries the burden of explaining behavior. It clarifies that notes are appended rather than overwritten and that confirmation is returned. However, it does not mention what happens if the notes file does not exist or whether any permissions are required.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short, starts with a one-sentence summary, and then cleanly lists the parameter and return value. It avoids unnecessary detail, though the Returns section is slightly redundant with the output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter append operation, the description covers the action, the parameter semantics, and the return value. It does not specify file location or creation behavior, but those details are not essential for an agent to correctly invoke this simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must add meaning beyond the bare parameter name. It does this by defining message as 'the note to append', which clarifies exactly how the parameter is used. For a single simple string parameter, this is sufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line uses a specific verb ('Append') and a concrete resource ('the notes file'), which makes the tool's purpose immediately clear. The append-versus-read contrast is enough to distinguish it from the sibling tool read_notes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description establishes a clear context: this tool is for adding new content to the notes file. Although it does not explicitly say 'use read_notes for reading', the action of appending versus reading makes the appropriate usage obvious.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_notesA

Read every stored note.

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and does a good job: it discloses the return type (str), the ordering (newest last), and the no-notes fallback message. This goes beyond a simple one-liner and gives the agent useful behavioral expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded with the core purpose. The Returns section adds essential details without any fluff. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple, parameterless read tool, the description fully covers what an agent needs to know: what it does, what it returns, ordering, and the empty case. There is no missing information that would prevent correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the schema already covers everything. The description sensibly focuses on return behavior rather than parameters, which is appropriate for a parameterless tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Read every stored note') and is unambiguously distinct from the only sibling, add_note, which writes instead of reads. Even without looking at the schema, an agent knows exactly what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool: when the agent needs to read all stored notes. However, there is no explicit guidance about when not to use it or a contrast with the sibling add_note, so the usage context is only implied rather than clearly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4.1/5.0
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

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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
    Not graded
    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.
    17
  • A
    license
    A
    quality
    B
    maintenance
    Provides cross-session persistent memory for coding agents via MCP tools to store, retrieve, and manage notes with hybrid keyword/semantic search and automatic deduplication.
    8
    218
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    Provides an in-memory notebook interface with tools to create, retrieve, list, update, and delete notes, designed to test agent behavior through realistic MCP tool interactions.
    5
    1

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DinaMMahfouz/mcp-server-demo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server