Skip to main content
Glama

πŸ—’οΈ notes-mcp

Your markdown notes, searchable by any AI assistant.

A tiny, read-only Model Context Protocol server that lets your assistant search, list and read the notes you already keep: an Obsidian vault, a ~/notes folder, a docs repo.

CI TypeScript Node MCP License

Features Β· Quick start Β· Tools Β· How it works Β· Safety Β· Development


You: what did I decide about the Postgres backups?

Assistant: calls search_notes β†’ In projects/homelab.md you decided to move the backup job to the NAS, run it nightly at 03:00, and test a restore once a month.

No uploads, no sync service, no database. The server reads the folder you point it at, on your machine, and nothing else.

✨ Features

πŸ”Ž Ranked full-text search

Every word must match. Title and tag hits rank above body hits, and results come with the matching lines.

🏷️ Tags that just work

Reads frontmatter tags: [a, b], YAML lists and inline #tags, then lets you filter by any of them.

πŸ“‚ Folder-aware

Walks subfolders, skips .git, .obsidian and other hidden folders, indexes .md, .markdown and .mdx.

πŸ”’ Read-only and sandboxed

No write tools. ../ and symlinks that leave the folder are refused.

πŸ“Ž Resources too

Every note is also an MCP resource at note:///<path>, for clients that attach files directly.

πŸͺΆ Two dependencies

The official MCP SDK and zod. Starts in milliseconds.

Related MCP server: mor

πŸš€ Quick start

git clone https://github.com/shadow-lo/notes-mcp.git
cd notes-mcp
npm install          # installs and builds dist/

Then register it with your MCP client. Most clients accept a config block like this:

{
  "mcpServers": {
    "notes": {
      "command": "node",
      "args": ["/absolute/path/to/notes-mcp/dist/index.js", "/absolute/path/to/your/notes"]
    }
  }
}

Restart the client and ask it about your notes. The notes folder can also be set with the NOTES_DIR environment variable instead of the second argument.

npx @modelcontextprotocol/inspector node dist/index.js examples/notes

This opens a local web UI where you can call each tool by hand against the sample notes in examples/notes.

🧰 Tools

Tool

Arguments

Returns

search_notes

query, tag?, limit? (default 10)

Best matches with path, title, tags and up to 3 matching lines

read_note

path

The full markdown of one note

list_notes

folder?, tag?, limit? (default 100)

Every matching note with title and tags

All tools are marked readOnlyHint, so clients can run them without asking for confirmation each time.

Example output

search_notes { "query": "postgres backup" }

1 note(s) match "postgres backup":

- projects/homelab.md β€” Homelab plan  [#infra #postgres]
    L8: Move the Postgres backup job to the NAS and run it nightly at 03:00.
    L9: Check restore once a month, a backup you never restored is not a backup.

How titles are picked: frontmatter title: β†’ first # heading β†’ filename.

🧠 How it works

flowchart LR
    A[MCP client] -- stdio / JSON-RPC --> B[server.ts<br/>tools + resources]
    B --> C[notes.ts<br/>walk Β· parse Β· rank]
    C -- realpath check --> D[(your notes folder)]
src/
β”œβ”€β”€ index.ts    CLI entry point, stdio transport, logs to stderr only
β”œβ”€β”€ server.ts   MCP tools and resources (thin layer)
└── notes.ts    folder walking, frontmatter, search ranking, path sandbox (no MCP code)

Ranking is deliberately simple and predictable: +10 per term found in the title, +5 in a tag, +2 in the path, and +1 per occurrence in the body (capped at 20 per term).

πŸ”’ Safety

  • Read-only. There is no tool that writes, renames or deletes.

  • Sandboxed paths. Every path goes through realpath and must stay inside the notes folder, so ../secret and symlinks pointing elsewhere are rejected.

  • Bounded output. Notes over 1 MB are skipped, so one giant export can't flood the context window.

  • Clean protocol channel. Logs go to stderr; stdout carries only MCP messages.

πŸ§ͺ Development

npm test             # vitest: unit tests + an in-memory MCP client/server round trip
npm run typecheck    # tsc --noEmit
npm run build        # compile to dist/

CI runs typecheck, tests, build and a real stdio smoke test on Node 20, 22 and 24.

πŸ“„ License

MIT Β© shadow-lo

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
      Not graded
      quality
      D
      maintenance
      A read-only toolkit for searching and analyzing Markdown note directories and Obsidian vaults through AI clients. It enables metadata extraction, full-text search, and natural language querying of note content, tags, and backlinks.
      4
      AGPL 3.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to search, read, create, update, and remove personal markdown notes stored locally, providing persistent memory across sessions.
      104 npm
      3
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to interact with a local folder of Markdown notes, supporting listing, reading, searching, creating, and appending to notes with strict security boundaries.
      5
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to read, create, update, delete, and search markdown notes stored locally.
      -