Skip to the content.

Notes MCP server (Python template)

A minimal, complete MCP server built with the official Python SDK v2 (mcp>=2.3,<3, class MCPServer).

Run

uv sync --extra dev                            # or: python -m venv .venv && .venv/bin/pip install -e ".[dev]"
uv run notes-mcp-server                        # stdio
uv run notes-mcp-server --http --port 8000     # Streamable HTTP at http://127.0.0.1:8000/mcp
uv run pytest                                  # 8 tests, including a real stdio subprocess

Set NOTES_FILE=/path/notes.json to persist notes between runs.

Connect

claude mcp add notes -- uv run --directory /absolute/path/to/this/folder notes-mcp-server

Make it yours

  1. Rename the package (src/notes_server), the project name in pyproject.toml, and the server name in MCPServer("notes").
  2. Replace store.py with your real logic. Keep it free of MCP imports so it stays easy to test.
  3. Replace the tools in server.py. Keep docstrings precise: they become the tool descriptions the model reads.