NoteDiscovery includes a built-in Model Context Protocol (MCP) server that enables AI assistants like Cursor, Claude Desktop, and other MCP-compatible clients to interact with your notes.
MCP (Model Context Protocol) is an open standard that allows AI assistants to securely access external tools and data sources. With the NoteDiscovery MCP server, your AI assistant can:
- π Search through your notes
- π Read note contents
- π·οΈ Browse by tags
- π Create new notes
- βοΈ Append to existing notes (journals, logs)
- π Organize notes (move, rename, folders)
- π Use templates to create structured notes
- π Explore the knowledge graph
Add this to your ~/.cursor/mcp.json (or Claude Desktop config):
{
"mcpServers": {
"notediscovery": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "NOTEDISCOVERY_URL",
"-e", "NOTEDISCOVERY_API_KEY",
"ghcr.io/gamosoft/notediscovery:latest",
"python", "-m", "mcp_server"
],
"env": {
"NOTEDISCOVERY_URL": "http://host.docker.internal:8000",
"NOTEDISCOVERY_API_KEY": ""
}
}
}
}-
Install NoteDiscovery (if not already):
pip install notediscovery # or from source: pip install .
-
Add to your MCP config:
{ "mcpServers": { "notediscovery": { "command": "notediscovery-mcp", "env": { "NOTEDISCOVERY_URL": "http://localhost:8000", "NOTEDISCOVERY_API_KEY": "" } } } }
{
"mcpServers": {
"notediscovery": {
"command": "python",
"args": ["-m", "mcp_server"],
"cwd": "/path/to/NoteDiscovery",
"env": {
"PYTHONPATH": "/path/to/NoteDiscovery",
"NOTEDISCOVERY_URL": "http://localhost:8000"
}
}
}
}Note: The
PYTHONPATHis required so Python can find themcp_servermodule. On Windows, use backslashes:"PYTHONPATH": "C:\\path\\to\\NoteDiscovery"
| Variable | Required | Default | Description |
|---|---|---|---|
NOTEDISCOVERY_URL |
Yes | http://localhost:8000 |
URL where NoteDiscovery is running |
NOTEDISCOVERY_API_KEY |
If auth enabled | - | API key from config.yaml |
NOTEDISCOVERY_TIMEOUT |
No | 30 |
Request timeout in seconds |
NOTEDISCOVERY_MAX_RETRIES |
No | 3 |
Max retry attempts for failed requests |
| Your Setup | NOTEDISCOVERY_URL |
|---|---|
Local Python (run.py) |
http://localhost:8000 |
Docker with -p 8000:8000 |
http://host.docker.internal:8000 |
Docker with -p 3000:8000 |
http://host.docker.internal:3000 |
| Remote server | https://notes.example.com |
The MCP server provides these tools to AI assistants:
| Tool | Description |
|---|---|
search_notes |
Full-text search across all notes |
list_notes |
List all notes with metadata |
get_note |
Read a specific note's content |
get_recent_notes |
Get recently modified notes (last N days) |
| Tool | Description |
|---|---|
list_tags |
List all tags with note counts |
get_notes_by_tag |
Find notes with a specific tag |
get_graph |
Get knowledge graph data |
| Tool | Description |
|---|---|
create_note |
Create or update a note |
append_to_note |
Append content to an existing note (great for journals/logs) |
move_note |
Move or rename a note |
delete_note |
Delete a note |
create_folder |
Create a new folder |
| Tool | Description |
|---|---|
list_templates |
List available templates |
get_template |
Get template content |
create_note_from_template |
Create a note from a template with variable substitution |
| Tool | Description |
|---|---|
health_check |
Verify server connectivity |
Append content to an existing note without overwriting. Perfect for journals, logs, or collecting ideas.
| Parameter | Type | Required | Description |
|---|---|---|---|
path |
string | Yes | Path to existing note |
content |
string | Yes | Content to append |
add_timestamp |
boolean | No | Add timestamp header before content |
Example prompt: "Add this meeting summary to my daily-journal.md with a timestamp"
Move or rename a note to a different location.
| Parameter | Type | Required | Description |
|---|---|---|---|
old_path |
string | Yes | Current note path |
new_path |
string | Yes | New path (can include folder) |
Example prompt: "Move draft.md to published/final-article.md"
Get recently modified notes. Useful for context about what you've been working on.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
days |
integer | No | 7 | Notes modified in last N days |
limit |
integer | No | 10 | Max notes to return |
Example prompt: "What was I working on this week?"
Create a new note from a template with variable substitution.
| Parameter | Type | Required | Description |
|---|---|---|---|
template_name |
string | Yes | Template name (e.g., "meeting-notes") |
note_path |
string | Yes | Path for the new note |
variables |
object | No | Variables to substitute (e.g., {"project": "Alpha"}) |
Built-in placeholders: {{date}}, {{time}}, {{datetime}}, {{title}}, {{folder}}
Example prompt: "Create a new meeting note for Project Alpha using the meeting-notes template"
Once configured, you can interact with your notes naturally:
User: "What did I write about Kubernetes?"
AI: Uses
search_notesto find relevant notes, thenget_noteto read them"I found 3 notes about Kubernetes. In your 'devops/k8s-setup.md' note from last week, you documented..."
User: "Create a new note summarizing our conversation"
AI: Uses
create_noteto save the summary"Done! I've created 'meetings/ai-discussion-2024-03-13.md' with the summary."
User: "Show me all notes tagged with #project"
AI: Uses
get_notes_by_tagto find them"You have 7 notes with the #project tag..."
User: "Add this to my daily journal with a timestamp"
AI: Uses
append_to_notewithadd_timestamp: true"Done! I've appended your entry to 'daily-journal.md' with today's timestamp."
User: "What was I working on last week?"
AI: Uses
get_recent_noteswithdays: 7"You modified 5 notes in the last week: project-roadmap.md, meeting-notes.md..."
User: "Create a meeting note for the design review using my template"
AI: Uses
create_note_from_templatewith the meeting-notes template"Created 'meetings/design-review-2024-03-13.md' from your meeting-notes template."
If you have authentication enabled in NoteDiscovery:
-
Generate an API key in
config.yaml:authentication: enabled: true api_key: "your-secure-api-key-here"
-
Add the key to your MCP config:
"env": { "NOTEDISCOVERY_URL": "http://localhost:8000", "NOTEDISCOVERY_API_KEY": "your-secure-api-key-here" }
- Ensure NoteDiscovery is running
- Check the
NOTEDISCOVERY_URLis correct - For Docker: use
host.docker.internalinstead oflocalhost
- Check that your API key is correct
- Ensure the API key in MCP config matches
config.yaml
- Check Cursor/Claude Desktop logs for errors
- Try running manually:
python -m mcp_server - Verify Python 3.10+ is installed
# Set environment variables
export NOTEDISCOVERY_URL=http://localhost:8000
export NOTEDISCOVERY_API_KEY=your-key
# Run the MCP server (Ctrl+C to stop)
python -m mcp_serverThen in another terminal:
# Test the health endpoint directly
curl http://localhost:8000/healthβββββββββββββββββββ stdio (JSON-RPC) βββββββββββββββββββ
β AI Assistant β ββββββββββββββββββββββββΊ β MCP Server β
β (Cursor/Claude) β β (notediscovery- β
βββββββββββββββββββ β mcp) β
ββββββββββ¬βββββββββ
β
β HTTP/REST
βΌ
βββββββββββββββββββ
β NoteDiscovery β
β Server β
β (port 8000) β
βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Your Notes β
β (./data/*.md) β
βββββββββββββββββββ
The MCP server is a separate process that:
- Communicates with AI assistants via stdio (stdin/stdout)
- Translates MCP requests into HTTP API calls
- Returns results back to the AI assistant
Your notes stay local. The MCP server just provides a bridge for AI access.
- Notes stay local: The MCP server only accesses notes through NoteDiscovery's API
- No external calls: No data is sent to external services
- API key protected: Use authentication to control access
- Read what you allow: AI can only access notes NoteDiscovery serves
NoteDiscovery/
βββ mcp_server/
β βββ __init__.py # Package entry point
β βββ __main__.py # Module runner
β βββ server.py # MCP protocol implementation
β βββ client.py # HTTP client for NoteDiscovery API
β βββ config.py # Configuration management
β βββ tools.py # Tool definitions
βββ ...