Skip to main content

OpenNote MCP Server - Model Context Protocol 服务

Project description

open-note-mcp

OpenNote MCP Server - Model Context Protocol 服务。

功能

提供标准 MCP 协议的笔记管理工具,可集成到 Claude Desktop、Cursor、Windsurf、OpenCode、Cline 等 AI 编辑器中。

可用工具

工具名 描述 参数
search_notes 搜索笔记 query, limit, category, tags, favorites_only
list_notes 列出笔记 limit, category, favorites_only
get_note 查看笔记详情 note_id
create_note 创建笔记 title, content, category, tags, format
update_note 编辑笔记 note_id, title, content
delete_note 删除笔记 note_id

安装

pip install open-note-mcp

使用

独立运行

# 启动 MCP 服务器(默认行为)
open-note-mcp

# 或使用子命令
open-note-mcp server

命令行选项

# 查看帮助
open-note-mcp --help

# 查看版本
open-note-mcp --version

# 列出可用工具
open-note-mcp tools

# 检查服务器状态
open-note-mcp status

OpenCode 配置格式

OpenCode 使用不同的配置格式,配置添加到项目根目录的 opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "open-note": {
      "type": "local",
      "command": ["open-note-mcp"],
      "enabled": true
    }
  }
}

注意:OpenCode 使用 mcp 字段(而非 mcpServers),命令格式为数组 [command](而非 command + args),环境变量字段为 environment(而非 env)。

集成到 AI 编辑器

1. Cursor

设置路径Settings → Features → MCP

配置文件~/.cursor/mcp.json

{
  "mcpServers": {
    "open-note": {
      "type": "stdio",
      "command": "open-note-mcp",
      "args": []
    }
  }
}

2. Claude Desktop

设置路径Settings → Developer → Edit Config

配置文件路径

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "open-note": {
      "type": "stdio",
      "command": "open-note-mcp",
      "args": []
    }
  }
}

3. Cline (VS Code 扩展)

设置路径:Cline 面板 → Settings → MCP Servers

{
  "mcpServers": {
    "open-note": {
      "type": "stdio",
      "command": "open-note-mcp",
      "args": [],
      "autoApprove": [
        "list_notes",
        "get_note",
        "search_notes"
      ],
      "timeout": 60
    }
  }
}

4. Windsurf (Cascade)

设置路径Settings → MCP

配置文件路径~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "open-note": {
      "type": "stdio",
      "command": "open-note-mcp",
      "args": []
    }
  }
}

5. OpenCode

配置文件:项目根目录 opencode.json 或全局配置 ~/.config/opencode/opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "open-note": {
      "type": "local",
      "command": ["open-note-mcp"],
      "enabled": true
    }
  }
}

注意:OpenCode 使用 mcp 字段(而非 mcpServers),命令格式为数组 [command](而非 command + args)。

6. VS Code (GitHub Copilot)

设置路径Settings → Features → GitHub Copilot → MCP Servers

点击 Add Server,选择 stdio 类型:

  • Name: open-note
  • Command: open-note-mcp

配置字段说明

Cline 等工具的扩展字段

字段 类型 说明 是否必须
type string 传输类型:stdio(标准输入输出)或 sse/http(HTTP) 建议
command string 启动命令 必须
args array 命令参数 必须
env object 环境变量,如 {"OPENNOTE_DB_PATH": "/path/to/db"} 可选
autoApprove array 自动批准的工具列表,Agent 调用时无需用户确认 可选
disabled boolean 是否禁用该服务器 可选
timeout number 超时时间(秒) 可选

autoApprove 推荐配置

工具 推荐自动批准 原因
list_notes 只读操作,安全
get_note 只读操作,安全
search_notes 只读操作,安全
create_note ⚠️ 可选 会创建新笔记
update_note ❌ 不推荐 会修改内容
delete_note ❌ 不推荐 会删除内容

自定义数据库路径

如果需要使用自定义数据库路径,在配置中添加 env 字段:

{
  "mcpServers": {
    "open-note": {
      "type": "stdio",
      "command": "open-note-mcp",
      "args": [],
      "env": {
        "OPENNOTE_DB_PATH": "/path/to/your/opennote.db"
      }
    }
  }
}

须知:如自定义数据库路径,则桌面端OpenNote应用无法读取

许可证

  • MIT
  • Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_note_mcp-0.2.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_note_mcp-0.2.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file open_note_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: open_note_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for open_note_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 76241cca3aada2d957c7515a4832c012895fea33ed97a1b9706543f744d84f4d
MD5 8b6506b009d16ed58c54a95a88a81cbe
BLAKE2b-256 7c1a98a42f72642739baabab5eadae4b6e5ebdb1ad8ffebb05282561e60461e1

See more details on using hashes here.

File details

Details for the file open_note_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: open_note_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for open_note_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cc31b6ac3012ca52b4356e8292f181f8a07a058c3a4db294fa40eb067734b2c
MD5 2517453c7976b1528136f0cfc64a31c0
BLAKE2b-256 b16509db95dc67b7381601b19fbf7f3c2d5e45b60329521d5834b1aaec30217d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page