Skip to main content
Glama
README.md
# bear-mcp

An MCP (Model Context Protocol) server that gives Claude and other AI assistants read and write access to your [Bear](https://bear.app) notes on macOS.

## Features

- Read notes directly from Bear's SQLite database (no Bear app required to be open for reads)
- Create notes and append/prepend text via Bear's URL scheme
- Search notes by text or tag
- List all tags
- Open notes in the Bear app

## Requirements

- macOS
- [Bear](https://bear.app) installed
- Node.js 18+

## Installation

```bash
git clone https://github.com/dineshs99/bear-mcp.git
cd bear-mcp
npm install
```

## Usage

### Claude Desktop

Add the server to your Claude Desktop config at `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "bear": {
      "command": "node",
      "args": ["/path/to/bear-mcp/index.js"]
    }
  }
}
```

Restart Claude Desktop. You should see Bear tools available in the chat input.

### Claude Code

```bash
claude mcp add bear node /path/to/bear-mcp/index.js
```

## Tools

| Tool | Description |
|------|-------------|
| `get_recent_notes` | Get notes created or modified in the past N days |
| `search_notes` | Search notes by text query and/or tag |
| `get_note` | Fetch the full content of a note by ID or title |
| `get_all_tags` | List all tags in your Bear library |
| `get_notes_by_tag` | Get all notes with a specific tag |
| `create_note` | Create a new note (opens in Bear) |
| `add_text_to_note` | Append, prepend, or replace text in a note |
| `open_note` | Open a specific note in the Bear app |

## Example prompts

- *"Summarise my Bear notes from the past 7 days"*
- *"Find all notes tagged #work and give me a bullet-point summary"*
- *"Create a Bear note titled 'Meeting Notes' with today's date"*
- *"Append a summary of our conversation to my note titled 'Project Ideas'"*

## How it works

Read operations query Bear's SQLite database directly at:

```
~/Library/Group Containers/9K33E3U3T4.net.shinyfrog.bear/Application Data/database.sqlite
```

Write operations (create, add text, open) use Bear's [x-callback-url](https://bear.app/faq/X-callback-url-Scheme-documentation/) API, which requires Bear to be installed and the URL scheme to be available.

## License

MIT