Skip to main content

note-tool

PyPI version Python versions License

✨ v0.4 新亮点:搜索优化 + 富内容支持

note search 支持 --from <平台> 过滤、--sort date 按时间排序、--limit N 限制数量。 OneNote 和 Notion 的表格现在自动转为 Markdown,图片 URL 完整保留。

note-tool 是一个多平台笔记 MCP Server,已发布到 PyPI。装一个包,把飞书、OneNote、Obsidian、语雀、Notion、印象笔记整合到一个标准 MCP 入口。你的 AI Agent(Claude Code、Cursor、Cline、Hermes……)就能直接在对话中查你的笔记。

快速开始

# 1. 安装
pip install note-tool

# 2. 运行安装向导
note setup

# 3. 配置到你的 AI Agent(详见各 Agent 的 MCP 配置文档)
# Claude Code / Cursor / Cline:
# {
#   "note-tool": {
#     "command": "note",
#     "args": ["mcp"]
#   }
# }

支持的平台

平台 状态 配置难度 配置时间 指南
🟣 Obsidian ✅ 可用 自动 0 分钟 指南
🟢 语雀 (Yuque) ✅ 可用 简单 2 分钟 指南
⚪ Notion ✅ 可用 简单 2 分钟 指南
🔵 飞书 (Feishu) ✅ 可用 中等 10 分钟 指南
🔵 OneNote ✅ 可用 中等 15 分钟 指南
🟢 印象笔记 (Evernote) ✅ 可用 复杂 5 天审批 指南

未配置的平台不会出现在 Agent 的工具列表中。 运行时配置任意组合,互不干扰。

架构

AI Agent (Claude Code / Cursor / Cline / Hermes / ...)
    │
    ▼  MCP stdio 协议 (JSON-RPC)
┌──────────────────────┐
│   note mcp           │  ← MCP Server,标准协议
│   tools/list         │
│   tools/call         │
└──────┬───────────────┘
       │
┌──────▼────┐ ┌──────▼──────┐ ┌──────▼──────┐
│ Obsidian  │ │ 飞书        │ │ OneNote     │  ← 每个平台独立 adapter
│ (本地文件)  │ │ (Feishu)    │ │ (Microsoft  │
│           │ │             │ │  Graph)     │
└───────────┘ └─────────────┘ └─────────────┘
                   ...

设计原则:

  • MCP 优先 — 主入口是 MCP Server,所有 Agent 统一接入
  • 可插拔 — 每个平台一个 adapter,互不影响
  • 零噪音 — 只暴露已配置平台的 tool,未配的自动隐藏
  • CLI 副产品 — Agent 不直接调的,终端用户也能用 note <platform> <command>

用法

# 安装向导(推荐)
note setup

# 跨平台搜索(新)
note search 关键词                    # 搜所有平台
note search 关键词 --from obsidian   # 仅 Obsidian
note search API --from feishu,notion --sort -date --limit 10

# 平台 CLI
note feishu search "关键词"
note onenote search "keyword"
note obsidian search "关键词"
note yuque search "关键词"
note notion search "keyword"
note evernote search "keyword"

# MCP Server(给 Agent 用)
note mcp

MCP 配置

将以下配置添加到你的 AI Agent 的 MCP 配置文件中:

{
  "note-tool": {
    "command": "note",
    "args": ["mcp"]
  }
}

支持的 Agent:

  • Claude Code — ~/.claude/settings.json 或项目级 CLAUDE.md
  • Cursor — ~/.cursor/mcp.json
  • Cline — ~/.cline/mcp_settings.json
  • Hermes — ~/.hermes/config.yaml 中配置 MCP tool

Tool 列表

每个已配置的平台会暴露以下 tool(前缀为平台名):

Tool 参数 说明
{platform}_search query 搜索笔记,返回标题+链接+摘要
{platform}_read page_id / filepath 读取笔记全文(Markdown)
{platform}_list_notebooks — 列出笔记本/知识库
{platform}_list_sections notebook_id? 列出分区
{platform}_create section_id, title 创建笔记

各平台具体实现略有差异,详见平台指南。

开发

git clone https://github.com/your-username/note-tool.git
cd note-tool
pip install -e .

项目状态

note-tool 处于早期开发阶段。当前已覆盖 6 个平台,代码就绪,部分平台需用户自行获取 API 凭证。

License

MIT

Metadata

Release files for note-tool 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for note-tool 0.4.0
File Size Uploaded Provenance Actions
note_tool-0.4.0.tar.gz 48.0 kB Without provenance Details for note_tool-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for note-tool 0.4.0
File Interpreter ABI Platform Actions
note_tool-0.4.0-py3-none-any.whl Python 3 none any Details for note_tool-0.4.0-py3-none-any.whl

Total release size: 99.4 kB

Release files / note_tool-0.4.0.tar.gz

Download URL note_tool-0.4.0.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6d8a728f2b8895c91bbb88e53a66ca9a590ea9336eaa8bf4af67642b93225b7d
BLAKE2b-256 checksum
How to use checksums
72b929ecaf3b9eb673051471c8a05a1e432bc1414727126aebdb7dc150dae45d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / note_tool-0.4.0-py3-none-any.whl

Download URL note_tool-0.4.0-py3-none-any.whl
Size 51.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6dbc0aa21163856f290038a767d0ef38ffd9f826004cb7ec76fe1fc66dca7106
BLAKE2b-256 checksum
How to use checksums
de0cc2ef5677f5bde669a052f7bc2d94ff3fa62f2033e6f236fd6b56eedfd936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for note-tool 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page