Skip to main content
Glama

Bear MCP Server

by bart6114

Bear MCP 服务器

模型上下文协议 (MCP) 服务器,允许像 Claude 这样的 AI 助手读取Bear笔记应用中的笔记。此实现以只读模式直接连接到 Bear SQLite 数据库,确保您的笔记安全无虞,不会被篡改。

快速入门

选项 1:从 GitHub 安装(推荐)

npx github:bart6114/my-bear-mcp-server

就这样!服务器将开始运行并连接到您的 Bear 数据库。

选项 2:克隆并在本地运行

# Clone the repository git clone https://github.com/bart6114/my-bear-mcp-server.git cd my-bear-mcp-server # Install dependencies npm install # Build and run npm run build npm start

先决条件

  • 安装了 Bear 应用的 macOS
  • Node.js 18 或更高版本

配置

对于克劳德桌面应用程序

将其添加到您的配置文件~/Library/Application Support/Claude/claude_desktop_config.json中:

{ "mcpServers": { "bear": { "command": "npx", "args": ["github:bart6114/my-bear-mcp-server"], "env": {}, "disabled": false, "autoApprove": [] } } }

对于 Claude VS Code 扩展

将其添加到您的配置文件~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

{ "mcpServers": { "bear": { "command": "npx", "args": ["github:bart6114/my-bear-mcp-server"], "env": {}, "disabled": false, "autoApprove": [] } } }

可用工具

Bear MCP 服务器提供以下只读工具(所有操作都是非破坏性的,不能修改您的 Bear 数据库):

打开笔记

按标题或 ID 打开笔记。

搜索笔记

按术语或标签搜索笔记。

获取标签

获取 Bear 中的所有标签。

open_tag

显示带有特定标签的所有笔记。

示例用法

以下是如何通过 AI 助手与 Bear MCP 工具交互的示例:

搜索笔记

让你的人工智能助手搜索包含特定术语的笔记:

Can you find all my notes about "project management"?

打开特定笔记

要求你的人工智能助手按标题检索特定的笔记:

Show me my note titled "Meeting Notes - March 2025"

查看标签

让你的 AI 助手列出你所有的 Bear 标签:

What tags do I have in my Bear notes?

查找具有特定标签的笔记

让你的人工智能助手显示带有特定标签的笔记:

Show me all notes with the #work tag

高级选项

如果您的 Bear 数据库位于非标准位置:

npx github:bart6114/my-bear-mcp-server --db-path /path/to/your/database.sqlite

技术细节

只读实现

此 MCP 服务器使用严格只读连接连接到您的 Bear SQLite 数据库。此连接在数据库驱动程序级别强制执行:

// From src/bear-db.ts this.db = new Database(dbPath, { readonly: true });

这确保了:

  • 无法对数据库执行任何写入操作
  • 您的笔记和标签无法被修改、删除或损坏
  • 如果尝试写入权限,数据库连接将失败

该服务器执行的所有操作都是 SELECT 查询,仅检索数据而不修改数据。

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

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

模型上下文协议服务器允许像 Claude 这样的 AI 助手以安全的只读模式读取 Bear 笔记应用程序中的笔记。

  1. 快速入门
    1. 选项 1:从 GitHub 安装(推荐)
    2. 选项 2:克隆并在本地运行
  2. 先决条件
    1. 配置
      1. 对于克劳德桌面应用程序
      2. 对于 Claude VS Code 扩展
    2. 可用工具
      1. 打开笔记
      2. 搜索笔记
      3. 获取标签
      4. open_tag
    3. 示例用法
      1. 搜索笔记
      2. 打开特定笔记
      3. 查看标签
      4. 查找具有特定标签的笔记
    4. 高级选项
      1. 技术细节
        1. 只读实现
      2. 执照

        Related MCP Servers

        • A
          security
          F
          license
          A
          quality
          A Model Context Protocol server that connects AI assistants like Claude to Notion workspaces, enabling them to view, search, create, and update Notion databases, pages, and content blocks.
          Last updated -
          12
          947
          1
          JavaScript
          • Apple
        • -
          security
          F
          license
          -
          quality
          A Model Context Protocol server that extends AI capabilities by providing file system access and management functionalities to Claude or other AI assistants.
          Last updated -
          339
          6
          TypeScript
          • Apple
        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that enables AI language models like Claude to securely interact with Microsoft OneNote data, allowing for reading, writing, searching, and comprehensive editing of notebooks, sections, and pages directly through an AI interface.
          Last updated -
          13
          JavaScript
          MIT License
          • Apple
        • -
          security
          F
          license
          -
          quality
          A Model Context Protocol server that provides Claude with access to search, retrieve, and analyze notes from the Bear App through natural language queries.
          Last updated -
          2
          Python
          • Apple

        View all related MCP servers

        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/bart6114/my-bear-mcp-server'

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