Skip to main content
Glama
ntwkrgr

bear-mcp

by ntwkrgr
README.md
# bear-mcp

An MCP server that gives Claude direct access to your Bear notes via [`better-bear-cli`](https://github.com/nicholasgasior/better-bear-cli) (`bcli`).

`bcli` talks to Bear through CloudKit (the same path Bear Web uses), so it's safe to run alongside Bear without touching the local SQLite database.

---

## Prerequisites

1. **[better-bear-cli](https://github.com/nicholasgasior/better-bear-cli)** installed and authenticated:
   ```sh
   brew install bcli   # or however you install it
   bcli auth           # authenticate with Bear / iCloud
   ```

2. **Node.js 18+**

---

## Setup

```sh
cd /path/to/bear-mcp
npm install
npm run build
```

Then register in `~/.claude.json` under the project you want bear-mcp available in:

```json
{
  "mcpServers": {
    "bear-mcp": {
      "command": "node",
      "args": ["/Users/you/Developer/MCP Servers/bear-mcp/dist/index.js"]
    }
  }
}
```

---

## Available Tools

| Tool | Description |
|------|-------------|
| `bear_list_notes` | List notes, optionally filtered by tag or including archived/trashed |
| `bear_get_note` | Get the full content of a note by ID |
| `bear_list_tags` | List all tags across your notes |
| `bear_search_notes` | Full-text search across notes |
| `bear_create_note` | Create a new note with title, body, and tags |
| `bear_edit_note` | Append text to an existing note |
| `bear_trash_note` | Move a note to trash |
| `bear_export_notes` | Export notes as Markdown files to a directory |

---

## Environment Variables

| Variable | Default | Purpose |
|----------|---------|---------|
| `BEAR_BCLI_PATH` | PATH lookup | Override path to the `bcli` binary |
| `BEAR_MCP_LOG` | off | Set to `debug` to enable stderr logging |

---

## Development

```sh
npm run dev    # TypeScript watch mode
npm run build  # Compile to dist/
npm start      # Run compiled server
```