Skip to main content
Glama
MCP Notes Server Example

MCP Notes Server Example

MCP Notes Server Example

The companion code for the Model Context Protocol course on the Mind & Matter YouTube channel, from Advanced AI Systems Research Corporation (AAIRC).

It's a small notebook server and client built with the official MCP Python SDK. The same code works over both the stateless 2026-07-28 protocol and the older initialize handshake.

The course is presented by Maya, an AI avatar.

Quick start

You need Python 3.10 or newer.

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

python notes_client.py auto      # discover first, fall back to the handshake if needed
python notes_client.py legacy    # force the initialize handshake

Expected output includes:

tools: ['search_notes', 'add_note', 'reindex']
add_note -> saved note 'stdio'
  progress 1.0/3.0: pass 1 of 3
  progress 2.0/3.0: pass 2 of 3
  progress 3.0/3.0: pass 3 of 3
reindex -> index rebuilt
notes://mcp -> MCP connects AI apps to tools and data.

Related MCP server: Monomem

What's here

File

What it shows

Course chapter

notes_server.py

Tools, structured output, annotations, progress, a resource template and a prompt

12

notes_server_plus.py

A delete tool that asks the user to confirm

12

notes_client.py

A client that launches the server over stdio and uses each feature

13

confirm_client.py

Answering the server's confirmation question

12

agent.py

A small agent: Claude decides, the MCP server acts

13

wiretap.py, traced_client.py

Log every JSON-RPC message between client and server

3, 13

wire_*.log

Sample message traces from both protocol versions

3, 4, 7

See the protocol on the wire

python traced_client.py auto
python confirm_client.py auto      # input_required, then a retry
python confirm_client.py legacy    # a mid-call elicitation/create request

These commands append to the wire_*.log files in this folder.

Run the agent

python agent.py --fake                               # offline, uses a scripted model
python agent.py "What do my notes say about MCP?"    # needs Anthropic credentials

What was tested

With mcp 2.3.0 on Python 3.12, these all ran successfully: notes_client.py, confirm_client.py and traced_client.py in both auto and legacy modes, and agent.py --fake.

The live Claude mode of agent.py has not been run. The fake mode tests the MCP side and the tool conversion, but not a real model.

This is teaching code

Notes live in memory and disappear when the server stops. There's no authentication, and delete_note has no per-user access checks. Before using these patterns in production, add the input validation, access control and safeguards covered in the course's security chapter.

License

MIT

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables users to create, retrieve, update, delete, and full-text search a local knowledge base of notes persisted in SQLite with FTS5, exposed over stdio or authenticated Streamable HTTP. It also surfaces recent/single-note resources and prompts for summarizing notes and drafting replies.
      5
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Shared memory for AI coding agents (Claude Code, Codex, Cursor and others) in one local SQLite file, over MCP or REST. Every note records which agent wrote it and keeps its history; writes that match known prompt-injection patterns are held for your review; you can roll back everything one writer did. Runs on your machine, no cloud or API keys, MIT licensed.
      9
      1,794 npm
      8
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to add, search, and delete persistent namespace-scoped notes through a local stdio server backed by a SQLite database. Namespaces isolate queries and content-derived IDs make repeated writes idempotent.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables capturing, searching, updating, and deleting project notes stored in MongoDB, along with read-only note and tag resources and a reusable prompt template for reviewing open notes. Serves these capabilities to MCP clients over stdio or a stateless Express HTTP endpoint.
      29 npm
      MIT