Skip to main content
Glama
balachandranAAIRC

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: claude-bridge

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

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
    Not graded
    quality
    B
    maintenance
    Exposes one SQLite-backed notes store over both stdio and an HTTPS/SSE endpoint, letting Claude Code, Claude Desktop, Claude web, and Claude mobile read and write the same shared state with full-text search. Provides write, read, search, and list tools so a note created on one surface is immediately visible from any other.
    814 npm
    4
    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.
    15 npm
    MIT