Skip to main content
Glama

Bear MCP Server

Bear MCP Server

A Model Context Protocol (MCP) server that provides access to your Bear notes. This server allows AI assistants like Claude to search and read your Bear notes.

Features

  • Search notes by title, content, or tags

  • Open specific notes by title or ID

  • Browse all tags with note counts

  • View notes by tag to explore related content

  • Direct SQLite queries for fast results

Installation

Option 1: Install from npm (when published)

npm install -g @mcp/bear-server

Option 2: Install from source

# Clone the repository git clone https://github.com/quanticsoul4772/bear-mcp cd bear-mcp # Install dependencies npm install # Build the project npm run build # Install globally npm link

Configuration

For Claude Desktop

Add this to your configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json:

{ "mcpServers": { "bear-mcp": { "command": "node", "args": [ "--max-old-space-size=4096", "--expose-gc", "--max-semi-space-size=64", "/Users/yourusername/Projects/mcp-servers/bear-mcp/dist/index.js" ], "type": "stdio" } } }

Custom Database Path

If your Bear database is in a non-standard location, you can specify it:

{ "mcpServers": { "bear-mcp": { "command": "node", "args": [ "--max-old-space-size=4096", "--expose-gc", "--max-semi-space-size=64", "/path/to/bear-mcp/dist/index.js", "--db-path", "/custom/path/to/database.sqlite" ], "type": "stdio" } } }

Available Tools

open_note

Open a specific note by its title or unique ID.

Example usage:

  • "Open my note titled 'Project Ideas'"

  • "Show me the note with ID 123ABC-456DEF"

search_notes

Search for notes containing specific terms or tags.

Example usage:

  • "Search for notes about machine learning"

  • "Find all notes tagged with #work"

  • "Search for 'API' in notes with tag #documentation"

get_tags

List all tags in your Bear notes, organized by frequency.

Example usage:

  • "What tags do I use in Bear?"

  • "Show me all my Bear tags"

open_tag

Display all notes that have a specific tag.

Example usage:

  • "Show me all notes tagged #recipes"

  • "List notes with the #meeting tag"

Development

Prerequisites

  • Node.js 18 or higher

  • Bear app installed on macOS

  • TypeScript knowledge for contributions

Building from source

# Install dependencies npm install # Build TypeScript npm run build # Run in development mode npm run dev # Watch for changes npm run watch

Project Structure

bear-mcp/ ├── src/ │ ├── index.ts # Main server entry point │ ├── bearDB.ts # Database connection and queries │ ├── types.ts # TypeScript type definitions │ └── tools/ # Tool implementations │ ├── index.ts │ ├── openNote.ts │ ├── searchNotes.ts │ ├── getTags.ts │ └── openTag.ts ├── dist/ # Compiled JavaScript (generated) ├── package.json ├── tsconfig.json └── README.md

Security

This server implements several security measures:

  1. Local access only - Runs via stdio, not network accessible

  2. Filtered results - Trashed notes are automatically excluded

Troubleshooting

"Bear database not found"

  • Ensure Bear is installed and has been opened at least once

  • Check if the database exists at ~/Library/Group Containers/9K33E3U3T4.net.shinyfrog.bear/Application Data/database.sqlite

  • Use the --db-path option if your database is elsewhere

"Permission denied"

  • The server needs read access to the Bear database

  • Check file permissions on the database file

No results returned

  • Verify that you have notes in Bear

  • Check that notes aren't in the trash

  • Ensure search terms are spelled correctly

Contributing

Contributions are welcome! Please:

  1. Fork the repository

  2. Create a feature branch

  3. Add tests for new functionality

  4. Ensure all tests pass

  5. Submit a pull request

License

MIT License - see LICENSE file for details

Acknowledgments

  • Inspired by the Bear app team

  • Thanks to the MCP community for the protocol and SDKs

  • Based on patterns from other MCP server implementations

Disclaimer

This server is not affiliated with or endorsed by Bear (Shiny Frog Ltd.). It's an independent tool that provides access to the Bear database.

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Enables AI assistants to search, read, and browse Bear notes directly from your local Bear database. Supports searching by title, content, or tags, opening specific notes, and exploring tag-based organization.

  1. Features
    1. Installation
      1. Option 1: Install from npm (when published)
      2. Option 2: Install from source
    2. Configuration
      1. For Claude Desktop
      2. Custom Database Path
    3. Available Tools
      1. open_note
      2. search_notes
      3. get_tags
      4. open_tag
    4. Development
      1. Prerequisites
      2. Building from source
      3. Project Structure
    5. Security
      1. Troubleshooting
        1. "Bear database not found"
        2. "Permission denied"
        3. No results returned
      2. Contributing
        1. License
          1. Acknowledgments
            1. Disclaimer

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/quanticsoul4772/bear-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server