u/ResearcherGlobal4060

Unofficial, opinionated Bear MCP server v3 — full-text search and a read-only safety gate

Unofficial, opinionated Bear MCP server v3 — full-text search and a read-only safety gate

Hi there, Bear community! 🙌 🐻

Today I released v3 of bear-notes-mcp, an unofficial, opinionated MCP server for Bear, with full-text search ranked by relevance and an enforced read-only mode by default.

I was searching for one thing in my notes, and Claude gave up after 27 attempts -- "I don't know, can you give me more clues?" Bear's search did return matches, but the right note just never made it to the top, and my agent stopped opening them before it got to the right one. So I rebuilt the search around ranking in my unofficial MCP.

Btw, Bear shipped its own MCP in 2.8 -- `bearcli mcp-server`, pre-installed with Bear -- and it's good with a variety of tools.

This post isn't about "mine is better."

It's about "mine is different on purpose."

Full-text search

Bear's search returns results that contain full words and partial matches. For a human scrolling the UI, that's fine. For an LLM constructing natural-language queries, the right note is often buried below newer ones -- the agent opens top results, doesn't find what it needs, and retries with new keywords until it gives up.

To fix this, I put a real full-text index in front of search: in-memory SQLite FTS5 + BM25 ranking. Notes match by word overlap, then rank by relevance. More to that: search results carry snippets that surround the findings. The snippet hints to the agent which result has the answer -- much fewer wrong notes being opened just to inspect them.

The FTS index is built once at the MCP server startup in a fraction of a second.

I tested this on different prompts (the eval suite is in the repo) – Sonnet 4.6, identical Bear corpus, 4 different prompt categories x 15 runs for each, native bearcli mcp-server vs mine:

  • Word-mismatch lookup (when query words differ from note words) pass 13/15 vs 15/15 · tool calls 21 vs 3 · turns 29 vs 6 · tokens 6,148 vs 1,061
  • Discoverable prompt (specific saved note among many similar) pass 8/15 vs 15/15 · tool calls 20 vs 3 · turns 29 vs 6 · tokens 4,913 vs 1,069
  • Synthesis (across multiple related notes) pass 15/15 vs 15/15 · tool calls 10 vs 8 · turns 12 vs 11 · tokens 2,873 vs 2,651
  • Verbatim quote (from a known recent note) pass 8/15 vs 15/15 · tool calls 14 vs 3 · turns 17 vs 6 · tokens 2,246 vs 841

Read-only by default

The eight write tools don't appear in the MCP server's tools/list until you enable Edit Mode explicitly – they aren't registered. But you can enable full write access with a single ENV variable (or a toggle in Claude Desktop).

---

Give it a try! I am very curious to know if this makes a difference for you.

Source, issues, PRs: github.com/vasylenko/bear-notes-mcp

Setup guide: bear-notes-mcp.vercel.app (or in the project's README)

Questions, suggestions, gaps, "does it do X?" -- drop them in the comments.

u/ResearcherGlobal4060 — 2 days ago