bear-notes-mcp
CLAUDE.md205 starsChanged 7 months agoApache-2.0View on GitHub
MCP server for Bear Notes, distributed through two channels: - MCP Bundle (.mcpb) — a one-click installable extension for Claude Desktop. MCP Bundles are zip archives containing a local MCP server and a manifest.json, similar to Chrome extensions (.crx) or VS Code extensions (.vsix). - npm package (bear-notes-mcp) — a standalone MCP server for Claude Code, Cursor, Codex, and any other MCP client. src/ is layered as infra → operations → tools. Adapters to external systems (SQLite, filesystem, Bear URL…
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
All project dependencies must be managed ONLY through their respective CLI tools, and NEVER through editing package lock files.
- Distinctive: line 28
Read the relevant reference doc when working in that area:
- Very specific: line 43
All releases go through these steps in order.
- Very specific: line 47
Commit: all release prep files in a single commit: chore: prepare release X.Y.Z
- Very specific: line 50
Trigger release workflow: after CI passes: gh workflow run release.yml --ref vX.Y.Z
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project Purpose
MCP server for Bear Notes, distributed through two channels:
- MCP Bundle (.mcpb) — a one-click installable extension for Claude Desktop. MCP Bundles are zip archives containing a local MCP server and a manifest.json, similar to Chrome extensions (.crx) or VS Code extensions (.vsix).
- npm package (
bear-notes-mcp) — a standalone MCP server for Claude Code, Cursor, Codex, and any other MCP client.
Rules of Absolute Importance
- All project dependencies must be managed ONLY through their respective CLI tools, and NEVER through editing package lock files.
- Tests:
- System tests are the default. Unit tests are justified only when a situation is genuinely hard to recreate via system tests due to test setup complexity. Unit tests are a last resort.
- If the assertion is about something the server decided before calling Bear (input validation, schema rejection, response format with no Bear interaction), it's almost always a misplaced unit test. System tests should verify behavior at the Bear-integration boundary — anything else is paying the spawn-Inspector / open-Bear cost for no integration risk.
- Exception: when an input composition step is exhaustively unit-tested AND one system test exercises the URL roundtrip, additional system tests covering other input shapes are redundant — Bear's URL boundary doesn't discriminate between composed strings.
Core Technical Documentation for this project
- MCP TypeScript SDK - https://github.com/modelcontextprotocol/typescript-sdk/blob/main/README.md
- MCPB (MCP Bundles) - https://github.com/anthropics/mcpb/blob/main/README.md
- MCPB manifest.json specificaton - https://github.com/anthropics/mcpb/blob/main/MANIFEST.md
- MCPB CLI - https://github.com/anthropics/mcpb/blob/main/CLI.md
- Task automation system (build, test, pack, etc) - https://taskfile.dev/docs/guide
Source Layout
src/ is layered as infra → operations → tools. Adapters to external systems (SQLite, filesystem, Bear URL scheme) live in infra/; pure business logic in operations/; MCP tool registrations and handlers in tools/. Dependencies flow downward only — tools/ may import from operations/ and infra/, operations/ from infra/, never the reverse. Tests are co-located with their source files using the .test.ts suffix. Use find src -type f for the current file list; the rules above are what's load-bearing.
Additional technical context
Read the relevant reference doc when working in that area:
docs/dev/SPECIFICATION.md— system boundaries, design constraints, safety gates, hybrid read/write rationale. Read before architectural changes.docs/dev/SECURITY.md— trust model and defenses.- @docs/dev/MCP_STANDARDS.md — this project's standards for designing our MCP server's tool surface (tool description vs schema separation, mutation response conventions, examples). Follow when adding or modifying MCP tools.
- @docs/dev/CODE_STYLE.md — style choices not auto-enforced; the WHY-not-WHAT comments rule.
Core Workflows
Website
Promotional single-page landing at bear-notes-mcp.vercel.app (Vercel free domain, no custom domain). Built with Astro + Tailwind CSS, lives in website/. When adding or removing tools, update the tool count in website/src/components/FeatureGrid.astro, website/src/components/InstallGuide.astro, and website/src/components/FAQ.astro alongside README.md and docs/user/NPM.md.
Release Process
All releases go through these steps in order. See Taskfile.yml for the underlying commands.
task docs:sync— sync manifest.json tools into README.md and docs/user/NPM.mdtask version VERSION=X.Y.Z -y— bump version in package.json, manifest.json, src/config.ts- Commit all release prep files in a single commit:
chore: prepare release X.Y.Z task push-release VERSION=X.Y.Z SHORT_DESCRIPTION="..." -y— creates release commit, tag, and pushes- Wait for CI on the tag —
push-releasetriggers CI on bothmainand thevX.Y.Ztag. The release workflow'sverify-cistep checks CI status on the tag ref, so it must complete before proceeding (usegh run list --workflow=ci.yml --branch vX.Y.Zto verify). - Trigger release workflow after CI passes:
gh workflow run release.yml --ref vX.Y.Z
The release workflow (release.yml) builds the .mcpb bundle, creates a GitHub Release, and publishes to npm with provenance.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

