Bear MCP Server
Enables Claude Code to interact with Bear notes on macOS, supporting create, search, update, delete, open notes, and tag management via natural language.
README
Bear MCP Server
这是一个为 Bear 笔记应用设计的 MCP (Model Context Protocol) 服务器,让你能够通过 Claude Code 直接操作 Bear 中的笔记。
功能特性
- ✅ 创建新笔记
- ✅ 搜索笔记
- ✅ 添加文本到现有笔记
- ✅ 删除笔记
- ✅ 打开指定笔记
- ✅ 获取所有标签
- ✅ 获取所有笔记(支持分页)
安装和使用
快速安装(推荐)
使用自动设置脚本:
./setup.sh
脚本会自动完成:
- 依赖安装
- 项目构建
- 生成配置信息
手动安装
1. 安装依赖
npm install
2. 构建项目
npm run build
或者使用构建脚本:
./build.sh
3. 配置 MCP 服务器
在 Claude Code 的配置文件中添加以下配置:
{
"mcpServers": {
"bear": {
"command": "node",
"args": ["/path/to/bear-mcp-server/dist/index.js"],
"env": {}
}
}
}
或者复制 mcp-config.json 文件的内容到你的 Claude 配置中。
4. 重启 Claude Code
配置完成后,重启 Claude Code 以加载新的 MCP 服务器。
可用工具
create_note
创建一个新的 Bear 笔记。
参数:
title(可选): 笔记标题text(可选): 笔记内容tags(可选): 标签数组filename(可选): 自定义文件名pin(可选): 是否固定笔记open_note(可选): 创建后是否打开笔记
示例:
{
"title": "我的新笔记",
"text": "这是笔记内容",
"tags": ["标签1", "标签2"],
"pin": true
}
search_notes
搜索 Bear 中的笔记。
参数:
term(必需): 搜索词token(可选): 分页令牌
示例:
{
"term": "项目"
}
add_text
向现有笔记添加文本。
参数:
id或title(必需其一): 笔记 ID 或标题text(必需): 要添加的文本mode(可选):prepend或append,添加方式
示例:
{
"title": "我的笔记",
"text": "新添加的内容",
"mode": "append"
}
delete_note
删除笔记。
参数:
id或title(必需其一): 笔记 ID 或标题
示例:
{
"title": "要删除的笔记"
}
open_note
在 Bear 中打开指定笔记。
参数:
id或title(必需其一): 笔记 ID 或标题new_window(可选): 是否在新窗口中打开
示例:
{
"title": "我的笔记",
"new_window": true
}
get_tags
获取 Bear 中所有标签。
参数:无
get_all_notes
获取所有笔记列表。
参数:
token(可选): 分页令牌
系统要求
- macOS (Bear 目前仅支持 macOS)
- Node.js 18+
- Bear 应用已安装
开发
开发模式运行
npm run dev
构建生产版本
npm run build
Bear x-callback-url 支持
此 MCP 服务器基于 Bear 的 x-callback-url scheme 实现,支持以下 URL 操作:
bear://x-callback-url/createbear://x-callback-url/add-textbear://x-callback-url/deletebear://x-callback-url/openbear://x-callback-url/searchbear://x-callback-url/tags
更多关于 Bear x-callback-url 的信息,请参考:Bear 文档
许可证
MIT License
贡献
欢迎提交 Issue 和 Pull Request!
注意事项
- 确保 Bear 应用已安装并运行
- 某些操作可能需要 Bear 应用在前台
- 批量操作时请注意性能,避免一次性操作过多笔记
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.