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.
To get started with the MCP Notes Server, follow these steps:
pip install -r requirements.txt
Configure the notes directory by editing line 110 in main.py, changing the notes_dir
property to your preferred directory path.
Set up Cursor to use the MCP server by configuring the .cursor/mcp.json
file, which Cursor will automatically detect and use.
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"
}
}
}
}
To add the MCP server globally:
.cursor
folder in your user directory, orThe 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.
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 filepath
: The full path to the created filecreated_at
: ISO timestamp of creationRead an existing markdown note by its title:
Parameters:
title
: The title of the note to read (required)Returns:
title
: The title of the notecontent
: The content of the notepath
: The full path to the filecreated_at
: ISO timestamp of creationmodified_at
: ISO timestamp of last modificationUpdate 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 filepath
: The full path to the fileupdated_at
: ISO timestamp of updateList all markdown notes in the vault:
Parameters: None
Returns:
notes
: Array of note objects, each containing:
title
: The title of the notepath
: The full path to the filecreated_at
: ISO timestamp of creationmodified_at
: ISO timestamp of last modificationtotal
: Total number of notesThe server handles various error scenarios including:
All errors are logged and returned with appropriate error codes and descriptive messages.
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.
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.
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"
}
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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