Notes MCP server

Manages markdown notes in a specified directory with tools for creating, reading, updating, and listing files while tracking timestamps and maintaining UTF-8 encoding
Back to servers
Setup instructions
Provider
nathannj
Release date
Mar 25, 2025
Language
Python
Stats
1 star

The MCP Notes Server is an implementation of the Model Context Protocol that manages markdown notes in a specified directory. It provides seamless functionality to create, read, update, and list markdown notes using the stdio transport, with automatic file management, timestamp tracking, and validation.

Installation

To get started with the MCP Notes Server, follow these steps:

  1. Install the required dependencies:
pip install -r requirements.txt
  1. Configure the notes directory by editing line 110 in main.py, changing the notes_dir property to your preferred directory path.

  2. Set up Cursor to use the MCP server by configuring the .cursor/mcp.json file, which Cursor will automatically detect and use.

Configuration

Cursor Configuration

The MCP server is configured in .cursor/mcp.json with the following settings:

{
  "mcpServers": {
    "notes-server": {
      "command": "python",
      "args": ["main.py"],
      "env": {
        "PYTHONIOENCODING": "utf-8"
      }
    }
  }
}

Global Configuration

To add the MCP server globally:

  • Add it to the .cursor folder in your user directory, or
  • Go to Cursor Settings → MCP → Add New Global MCP Server
  • Copy and paste the mcp.json content
  • Update the args to point to the correct path to main.py

Running the Server

The server will automatically start when Cursor loads the project. You can also run it manually:

python main.py

The server listens for MCP requests through stdin/stdout and logs operations appropriately.

Using the MCP Notes Server

Creating a Note

Create a new markdown note with a title and optional content:

Parameters:

  • title: The title of the note (required)
  • content: The content of the note (optional, defaults to empty string)

Returns:

  • filename: The name of the created file
  • path: The full path to the created file
  • created_at: ISO timestamp of creation

Reading a Note

Read an existing markdown note by its title:

Parameters:

  • title: The title of the note to read (required)

Returns:

  • title: The title of the note
  • content: The content of the note
  • path: The full path to the file
  • created_at: ISO timestamp of creation
  • modified_at: ISO timestamp of last modification

Updating a Note

Update the content of an existing markdown note:

Parameters:

  • title: The title of the note to update (required)
  • content: The new content for the note (optional, defaults to empty string)

Returns:

  • filename: The name of the updated file
  • path: The full path to the file
  • updated_at: ISO timestamp of update

Listing All Notes

List all markdown notes in the vault:

Parameters: None

Returns:

  • notes: Array of note objects, each containing:
    • title: The title of the note
    • path: The full path to the file
    • created_at: ISO timestamp of creation
    • modified_at: ISO timestamp of last modification
  • total: Total number of notes

Error Handling

The server handles various error scenarios including:

  • Missing required parameters
  • File already exists
  • File not found
  • General exceptions

All errors are logged and returned with appropriate error codes and descriptive messages.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "notes-server" '{"command":"python","args":["main.py"],"env":{"PYTHONIOENCODING":"utf-8"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "notes-server": {
            "command": "python",
            "args": [
                "main.py"
            ],
            "env": {
                "PYTHONIOENCODING": "utf-8"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "notes-server": {
            "command": "python",
            "args": [
                "main.py"
            ],
            "env": {
                "PYTHONIOENCODING": "utf-8"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later