Skip to main content
Glama
mcp-notes-server

mcp-notes-server

by ByteTrooper

mcp-notes-server

A small notes server that speaks the Model Context Protocol over stdio, written with the Python standard library only. An MCP client can let an LLM save, list, search and delete notes through tool calls. Notes live in a single JSON file.

The point of the repo is to show what an MCP tool server actually does on the wire, with no SDK in the way: about 150 lines you can read in one sitting.

Tools

tool

arguments

what it does

add_note

text (required), title, tags[]

saves a note and returns its id

list_notes

limit (default 20)

newest first

search_notes

query

notes containing every word of the query, in title, text or tags

delete_note

id

removes a note

Bad arguments come back as a tool result with isError: true, so the model can see the error and retry. Protocol-level problems (unknown method, malformed JSON) use JSON-RPC error codes.

Related MCP server: mcp-server-example

What is implemented

  • initialize, ping, tools/list, tools/call

  • notifications (such as notifications/initialized) are accepted and never answered

  • newline-delimited JSON-RPC 2.0 on stdin/stdout, logs to stderr only

  • atomic writes (temp file then rename), so a crash never leaves a half-written notes file

  • Unicode notes (Telugu, Hindi, and so on) are stored as-is

Not implemented: resources, prompts, sampling, progress or cancellation. It only covers tools.

Run it

python -m pytest -q          # 7 tests, each talks to the real server process over stdio
NOTES_FILE=./notes.json python mcp_notes_server.py

Then type one JSON message per line:

{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"cli","version":"0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"add_note","arguments":{"text":"Try LangGraph checkpoints","tags":["ideas"]}}}
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_notes","arguments":{"query":"langgraph"}}}

To register it with an MCP client, point the client's server config at:

{ "command": "python3", "args": ["/path/to/mcp_notes_server.py"], "env": { "NOTES_FILE": "/path/to/notes.json" } }

Status

The tests use a small client that follows the protocol's stdio framing. I have not verified the server against every MCP client, so if one rejects the handshake, please open an issue with its log.

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
      C
      maintenance
      Enables saving and searching notes stored in a local JSON file via a minimal MCP server, supporting three primitives: tools (add_note, search_notes), resources (notes://all), and prompts (weekly_review).
      2
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage in-memory notes by listing, fetching, and creating notes through MCP tools over stdio.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Claude Desktop to add, retrieve, update, delete, and list notes persisted in a JSON file whose path is set via MCP_NOTES_FILE or --notes-file, with atomic, lock-protected saves.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables managing plain-text notes on disk through MCP resources, tools, and prompts, so natural-language requests can create, read, search, delete, and summarize notes via an interactive client.
      MIT