Skip to main content
Glama
revanthpp

MCP Notes Server

by revanthpp

MCP Notes Server

A beginner-friendly, production-aware Model Context Protocol server for a local Markdown notes workspace.

Give an AI assistant useful access to a folder of Markdown notes without giving it your whole hard drive.

Python 3.11+ MCP SDK License: MIT

What this project is

This repository is a small, inspectable MCP server for local Markdown notes. An MCP-compatible AI application can discover its tools, validate their inputs, and invoke them over a standard protocol.

The server can:

  • list notes

  • read one note

  • search notes

  • create a safely named note

  • append to an existing note

  • expose a read-only note index as a resource

  • provide a reusable summarize_note prompt

The important part is what it cannot do: access a file outside the configured notes workspace.

Related MCP server: mor

Why MCP exists

Without a protocol, every AI application and every tool provider needs a custom integration. MCP standardizes the conversation: servers describe capabilities, clients discover them, and hosts decide when and how the model may use them.

MCP is not magic and it is not the model itself. It is a contract around context and actions. Permissions, validation, user intent, and operational security are still your responsibility.

Architecture

flowchart LR
    U["User"] --> H["MCP Host<br/>AI application"]
    H --> C["MCP Client"]
    C <-->|"MCP over stdio"| S["MCP Notes Server"]
    S --> V["Validation and safe path resolution"]
    V --> W[("Configured notes workspace<br/>Markdown only")]
    V -. "blocked" .-> X["Everything outside"]

The host owns the user experience and model. Its MCP client connects to this server. The server advertises tools, validates each request, and touches only the configured directory. See ARCHITECTURE.md for the full model.

Quick start

Prerequisites: Python 3.11+ and, optionally, uv.

git clone https://github.com/revanthpp/mcp-notes-server.git
cd mcp-notes-server

python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"

cp .env.example .env
export MCP_NOTES_DIR="$PWD/examples/sample_notes"
mcp-notes-server

The process waits for MCP messages on stdin. That quiet terminal is normal. Logs go to stderr so they do not corrupt the stdio protocol.

With uv, the equivalent setup is:

uv sync --extra dev
MCP_NOTES_DIR="$PWD/examples/sample_notes" uv run mcp-notes-server

Run the tests

pytest
ruff check .

The tests cover normal note workflows and attacks involving absolute paths, .. traversal, hidden files, non-Markdown files, and symlinks that point outside the workspace.

Connect an MCP-compatible client

Most local clients accept a command, arguments, and environment variables for a stdio server. Use an absolute repository path:

{
  "mcpServers": {
    "notes": {
      "command": "/absolute/path/to/mcp-notes-server/.venv/bin/mcp-notes-server",
      "args": [],
      "env": {
        "MCP_NOTES_DIR": "/absolute/path/to/mcp-notes-server/examples/sample_notes",
        "MCP_NOTES_LOG_LEVEL": "INFO"
      }
    }
  }
}

Configuration filenames and UI steps differ by client. Use its documentation, restart or reconnect the client, then check that these five tools appear.

You can also inspect the server interactively:

MCP_NOTES_DIR="$PWD/examples/sample_notes" \
  npx -y @modelcontextprotocol/inspector \
  .venv/bin/mcp-notes-server

Tools and schemas

Capability

Input

Result

list_notes

none

titles and workspace-relative paths

read_note

filename

title, path, and Markdown content

search_notes

query

matching notes and short snippets

create_note

title, content

created path and status message

append_to_note

filename, content

updated path and status message

Resource notes://index

none

read-only JSON note index

Prompt summarize_note

filename

reusable summarization instruction

Python type hints and Pydantic models become MCP input and output schemas through the official SDK. This lets clients discover more than function names. They can see the shape of a valid call before making one.

Example tool calls

The wire format is handled by your MCP client, but the logical calls look like:

{"name": "list_notes", "arguments": {}}
{"name": "read_note", "arguments": {"filename": "mcp-basics.md"}}
{
  "name": "create_note",
  "arguments": {
    "title": "My First MCP Note",
    "content": "The protocol connects hosts, clients, and servers."
  }
}

The last call creates my-first-mcp-note.md. It will not overwrite an existing file with that name.

The security boundary

Every user-supplied filename passes through the same resolver. It:

  1. rejects empty and absolute paths

  2. rejects any .. component

  3. rejects hidden paths and non-.md files

  4. resolves symlinks and normalizes the target

  5. proves the resolved target is still under the configured workspace

This is defense in depth, not a claim of perfect isolation. Run the process as a low-privilege user and configure the smallest useful directory. Read the threat model in SECURITY.md.

What can go wrong?

  • A broadly configured workspace exposes more notes than intended.

  • A model may invoke the wrong tool or append unwanted text.

  • Sensitive content in a note can flow into model context or provider logs.

  • Concurrent writes can interleave because this teaching project has no locking.

  • Huge workspaces can make listing and searching slow.

  • A remotely exposed server needs authentication, authorization, rate limits, transport security, and tenant isolation that this local stdio demo does not add.

The host should show tool activity and ask for confirmation before writes. The server should still validate everything because model behavior is not a security boundary.

Production considerations

For a real deployment, add identity and per-user authorization, audit events with redaction, file size and request limits, atomic writes and locking, pagination or an index, encrypted storage, retention controls, telemetry, dependency scanning, and explicit approval policies for mutations. Pin and regularly update the MCP SDK. Keep local stdio and remote HTTP threat models separate.

The current dependency uses the maintained MCP Python SDK 1.x line and includes an upper bound before the forthcoming 2.x breaking release. Upgrade deliberately after reviewing its migration guide.

Repository tour

src/mcp_notes_server/
├── server.py          # MCP registration and stdio entry point
├── tools.py           # application-facing tool service
├── note_store.py      # filesystem boundary and note operations
├── schemas.py         # typed inputs and outputs
├── config.py          # environment configuration
└── logging_config.py  # structured stderr logging

tests/ proves behavior and boundaries. examples/ contains safe sample notes. diagrams/, articles/, and video-scripts/ turn the implementation into reusable teaching material.

Next steps

Try the sample workspace, connect your preferred MCP client, and inspect every tool call. Then experiment with one improvement at a time: frontmatter metadata, tags, an approval step for writes, or SQLite-backed search.

If you are learning, start with ARCHITECTURE.md. If you are deploying, start with SECURITY.md. Contributions are welcome.

Created by revanthpp as part of a practical beginner series on AI systems.

Available Tools

5 tools
append_to_noteA

Append text to an existing workspace-relative Markdown note.

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYes
filenameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYes
messageYes

TDQS

A3.8/5.0
Behavior2/5

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

With no annotations provided, the description carries full responsibility for disclosing behavioral traits. It states 'append' (implying mutation) and 'existing' (implying no creation), but it omits important side effects such as whether the file is modified in place, error behavior for non-existent files, or any permissions required. The description is too minimal to fully disclose the tool's behavior.

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 a single, front-loaded sentence that communicates the core action and target without any filler. Every word contributes to the meaning.

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 simple append operation with two string parameters, the description, combined with the schema, conveys the essential information: it appends to an existing workspace-relative Markdown note. It does not explain return values (though an output schema exists) or error conditions, but the low complexity of the tool means these are less critical. The description is largely sufficient for correct invocation.

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

Parameters3/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 compensate. It provides some clarification: 'workspace-relative' hints at the expected format for filename, and 'text' clarifies the nature of content. However, it does not explain details like whether content is appended with a newline or how filename path resolution works. The compensation is partial but adequate for simple string parameters.

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 clearly states the action ('Append text') and the target resource ('an existing workspace-relative Markdown note'). This is specific and distinguishes it from sibling tools like create_note (create new), read_note (read), and search_notes (search).

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 implies when to use the tool: when you need to add text to an existing note. The word 'existing' signals a precondition and implicitly contrasts with create_note, but it does not explicitly mention alternatives or scenarios where this tool should not be used (e.g., for overwriting content). Clear context without explicit exclusions.

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

create_noteA

Create a Markdown note using a safe filename derived from its title.

ParametersJSON Schema
NameRequiredDescriptionDefault
titleYes
contentNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYes
messageYes

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral disclosure burden. It adds one useful detail ('safe filename derived from its title'), but does not mention other behaviors such as handling of duplicate titles, whether content is required, or error conditions.

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 a single, focused sentence with no redundant words. It front-loads the core action and includes a key detail, making it highly concise and readable.

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 simple create tool with an output schema and two parameters, the description covers the main purpose and a notable behavior. It does not explicitly guide against using append_to_note, but the name and description imply the difference. Missing details like overwrite behavior are not critical for basic invocation.

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

Parameters3/5

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

The description explains the role of 'title' in filename generation, adding meaning beyond the schema. However, it says nothing about the 'content' parameter, leaving its purpose to schema inference. Given the 0% formal schema description coverage, partial compensation is acceptable.

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 clearly states the tool creates a Markdown note, with a specific detail about filename derivation from the title. It distinguishes itself from sibling tools (list, read, search, append) by being the creation operation.

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

Usage Guidelines2/5

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

The description does not mention when to use this tool versus alternatives like append_to_note, nor does it state any prerequisites or exclusions. It relies solely on the name and implied purpose.

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

list_notesA

List note titles and workspace-relative Markdown paths.

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 burden of behavioral disclosure. 'List' clearly indicates a read-only operation, and specifying the output fields (titles and paths) adds useful context. It does not mention possible limitations or sort order, but for a simple zero-parameter tool, this is sufficient.

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 a single sentence with no redundancy. It is front-loaded with the action verb 'List' and concisely states the resource and output details. Every word 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 listing tool with no parameters and an output schema, the description is complete. It clearly states what is returned (titles and workspace-relative paths), and with an output schema present, no further detail on return values is needed. The tool's simplicity means nothing is missing.

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?

There are zero parameters, and the schema coverage is trivially 100%. The description need not explain parameters, and per the rubric, a baseline of 4 applies for tools with no parameters.

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 uses the specific verb 'list' with the resource 'notes' and specifies the output scope as 'titles and workspace-relative Markdown paths.' This clearly distinguishes it from siblings like read_note (which reads content), search_notes (which searches), and create_note/append_to_note (which modify).

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 usage by stating the tool enumerates note titles and paths, but it does not explicitly discuss when to use this tool versus the alternatives. There are no exclusions or specific context given, so it stays at an implied level.

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

read_noteA

Read one Markdown note by its workspace-relative filename.

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYes
titleYes
contentYes

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the responsibility for disclosing behavior. The word 'read' clearly indicates a non-destructive operation, and 'by workspace-relative filename' specifies the addressing scheme. It does not discuss error handling or return format, but the presence of an output schema covers return structure. This is adequate for a simple read tool.

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 a single sentence, directly communicates the action, and contains no filler. It is perfectly structured with the verb first and the qualifier last.

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 read operation with a single parameter and an output schema, the description provides all essential information: what it does (reads one note), which parameter to use (filename), and how it is interpreted (workspace-relative). It is complete enough for an AI to invoke correctly without extra documentation.

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 schema only defines 'filename' as a string with no description. The description adds crucial semantics by specifying that the filename is 'workspace-relative', which clarifies the expected input format. This helps the agent construct the correct argument value.

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 uses the specific verb 'read' plus resource 'one Markdown note' and specifies the key qualifier 'workspace-relative filename', which clearly differentiates it from sibling tools like list_notes (listing) and search_notes (searching). It precisely identifies the function without ambiguity.

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 usage: you should use this tool when you have the workspace-relative filename and want to retrieve a single note's content. However, it does not explicitly mention when not to use it or compare it with alternatives, such as suggesting search_notes when the filename is unknown. So it relies on context.

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

search_notesA

Search note titles and contents, returning short matching snippets.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool returns snippets, implying a read-only nature, but it does not explicitly state whether it modifies data, how it handles no matches, or any other edge behavior.

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 a single, front-loaded sentence with no filler words. Every word contributes to meaning, and it is appropriately sized for the tool's simplicity.

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 simple tool with one parameter and an output schema, the description covers the core purpose and output behavior (snippets). It lacks explicit usage guidance, but the tool is simple enough that this is a minor gap.

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

Parameters3/5

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

Schema coverage is 0%, so the description must compensate. It explains that 'query' is used to search titles and contents, adding meaning to the bare parameter name. However, it does not provide constraints, formatting, or example values.

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 uses a specific verb ('Search') and resource ('note titles and contents'), and clarifies the result format ('short matching snippets'). This clearly distinguishes it from sibling tools like list_notes, read_note, create_note, and append_to_note.

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 usage (when you need to search notes), but it does not explicitly state when to use this tool versus alternatives like list_notes or read_note, or mention any exclusions.

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

TDQS

A4/5.0
Disambiguation5/5

Each tool has a distinct purpose: listing, reading, searching, creating, and appending. There is no overlap or ambiguity between the operations.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case. Collection-level operations use plural (list_notes, search_notes) while single-item operations use singular (read_note, create_note, append_to_note), which is a clear and predictable convention.

Tool Count5/5

With 5 tools, the server is well-scoped for a notes management purpose. Each tool covers an essential operation without unnecessary bloat.

Completeness3/5

The server provides create, read, list, search, and append, but it lacks a delete operation and does not support full overwrite updates. These are notable gaps for a notes domain, limiting the completeness of the tool surface.

Maintenance

ActivityStale
ResponsivenessSyncing

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

  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to search, read, create, update, and remove personal markdown notes stored locally, providing persistent memory across sessions.
    95
    2
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to list, search, read, and append to Markdown notes through MCP tool calls, making it easy to interact with a second brain folder.
  • F
    license
    Not graded
    quality
    B
    maintenance
    Provides controlled, read-only or write-enabled access to a private local Yaps Markdown vault, enabling AI clients to search, read, and manage notes securely.

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/revanthpp/mcp-notes-server'

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