The Bear Notes MCP Server connects your personal Bear Notes knowledge base to AI assistants using semantic search and RAG (Retrieval-Augmented Generation). This allows AI assistants to understand the meaning of your notes, not just perform simple text matching, creating more intelligent interactions with your personal knowledge base.
git clone [your-repo-url]
cd bear-mcp-server
npm install
chmod +x src/bear-mcp-server.js
chmod +x src/create-index.js
Before using the server, create vector embeddings of your notes:
npm run index
This process may take several minutes depending on how many notes you have, as it converts all notes into mathematical vectors that capture their meaning.
Update your MCP configuration file with the following settings:
{
"mcpServers": {
"bear-notes": {
"command": "node",
"args": [
"/absolute/path/to/bear-mcp-server/src/bear-mcp-server.js"
],
"env": {
"BEAR_DATABASE_PATH": "/Users/yourusername/Library/Group Containers/9K33E3U3T4.net.shinyfrog.net.bear/Application Data/database.sqlite"
}
}
}
}
Make sure to replace the paths with your actual installation locations.
This server uses the Xenova implementation of transformers.js with the all-MiniLM-L6-v2 model to:
The server provides these tools for AI assistants:
search_notes: Find notes that match a query
query
(required), limit
(optional, default: 10), semantic
(optional, default: true)get_note: Fetch a specific note by its ID
id
(required)get_tags: List all tags used in your Bear Notes
retrieve_for_rag: Get notes semantically similar to a query, formatted for RAG
query
(required), limit
(optional, default: 5)If you encounter issues:
npm run index
docker build -t bear-mcp-server .
docker run \
-v /path/to/your/NoteDatabase.sqlite:/app/database.sqlite \
-e BEAR_DATABASE_PATH=/app/database.sqlite \
bear-mcp-server \
npm run index
docker run \
-v /path/to/your/NoteDatabase.sqlite:/app/database.sqlite \
-e BEAR_DATABASE_PATH=/app/database.sqlite \
-p 8000:8000 \
bear-mcp-server
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "bear-notes" '{"command":"node","args":["/absolute/path/to/bear-mcp-server/src/bear-mcp-server.js"],"env":{"BEAR_DATABASE_PATH":"/Users/yourusername/Library/Group Containers/9K33E3U3T4.net.shinyfrog.net.bear/Application Data/database.sqlite"}}'
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": {
"bear-notes": {
"command": "node",
"args": [
"/absolute/path/to/bear-mcp-server/src/bear-mcp-server.js"
],
"env": {
"BEAR_DATABASE_PATH": "/Users/yourusername/Library/Group Containers/9K33E3U3T4.net.shinyfrog.net.bear/Application Data/database.sqlite"
}
}
}
}
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": {
"bear-notes": {
"command": "node",
"args": [
"/absolute/path/to/bear-mcp-server/src/bear-mcp-server.js"
],
"env": {
"BEAR_DATABASE_PATH": "/Users/yourusername/Library/Group Containers/9K33E3U3T4.net.shinyfrog.net.bear/Application Data/database.sqlite"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect