Get the FREE Ultimate OpenClaw Setup Guide →

bear

Connect your Bear app via MCP (Model Context Protocol) allowing AI assistants to search and retrieve your notes

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ruanodendaal-bear-mcp-server node /absolute/path/to/bear-mcp-server/src/bear-mcp-server.js \
  --env BEAR_DATABASE_PATH="<path-to-your Bear Notes database.sqlite>"

How to use

Bear Notes MCP Server with RAG exposes semantic search, note retrieval, tag discovery, and RAG-friendly note provisioning to AI assistants. The server uses a local Bear Notes database to generate vector embeddings and perform semantic matching, enabling you to ask complex questions and receive contextually relevant notes. The available tools for AI assistants include search_notes (semantic search for notes), get_note (fetch a specific note by ID), get_tags (list all used tags), and retrieve_for_rag (notes formatted for RAG workflows). Connect your assistant to this MCP server and use these tools to query your notes, pull in related context, and present results from your Bear Notes locally, without sending any data to external services.

To use, configure the MCP server with your Bear Notes database path, start the server, and then invoke the tools from your AI assistant as needed. For example, use search_notes to find notes related to a topic, then use retrieve_for_rag to pull relevant notes for AI responses that require context from your library.

How to install

Prerequisites:

  • Node.js v16 or higher and npm
  • Bear Notes for macOS installed
  • Access to your Bear Notes database file (sqlite)
  1. Clone the repository (or place the server files locally): git clone <your-repo-url> cd bear-mcp-server

  2. Install dependencies: npm install

  3. Ensure the server scripts are executable (as needed): chmod +x src/bear-mcp-server.js chmod +x src/create-index.js

  4. Index your notes (generate embeddings): npm run index

  5. Configure the MCP server (see mcp_config section) by setting BEAR_DATABASE_PATH to your Bear Notes database path.

  6. Start the MCP server (example): node src/bear-mcp-server.js

Optional (Docker):

  • Build the image: docker build -t bear-mcp-server .
  • Run with indexing and database path mounted as needed, then start the server inside the container.

Notes:

  • The first startup may take longer as the model loads. Subsequent starts are faster.
  • If you update your Bear Notes database, re-run npm run index to refresh embeddings.

Additional notes

Tips and caveats:

  • BEAR_DATABASE_PATH must point to the Bear Notes SQLite database. Ensure permissions allow the MCP server to read it.
  • All processing runs locally; no data leaves your machine.
  • If you add many new notes, re-run npm run index to rebuild the vector index.
  • The server is designed for macOS Bear Notes; Windows/Linux support is not guaranteed.
  • When using Docker, ensure proper volume mounts for the Bear database and set BEAR_DATABASE_PATH accordingly inside the container.
  • If semantic search fails, the server will gracefully fall back to traditional search (as noted in the docs).
  • Use retrieve_for_rag to get a compact, semantically similar set of notes tailored for RAG prompts.

Related MCP Servers

Sponsor this space

Reach thousands of developers