t

tkc

@tkc/notion-mcp
0 Stars 304 次浏览 tkc 更新于 2026-08-23

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "notion": {
      "args": [
        "run",
        "\u003cyour path\u003e/src/notion/index.ts",
        "your_notion_integration_key_here"
      ],
      "command": "~/.bun/bin/bun"
    }
  }
}

服务介绍

Claude Desktop Notion MCP 服务器

这是一个为 Claude Desktop 实现的文件系统模型上下文协议(MCP)服务器。该服务器为 Claude 提供了文件系统功能,使其能够读取、写入和操作您系统上的文件。

image

功能

  • 使用 glob 模式匹配列出文件
  • 读取文件内容
  • 写入文件
  • 通过 diff 输出编辑文件
  • 删除文件
  • 安全路径规范化以防止目录遍历攻击

前提条件

  • Bun v1.2.5 或更高版本

安装

克隆仓库并安装依赖项:

bash
git clone https://github.com/yourusername/claude-desktop-mcp.git
cd claude-desktop-mcp
bun install

使用方法

claude_desktop_config.json

json
{
"mcpServers": {
"notion": {
"command": "~/.bun/bin/bun",
"args": [
"run",
"/src/notion/index.ts",
"your_notion_integration_key_here"
]
}
}
}

如果没有提供基础目录,则使用当前工作目录。

可用工具

服务器提供了以下工具:

  • list_files: 列出与 glob 模式匹配的文件
  • read_file: 读取文件内容
  • write_file: 将内容写入文件
  • edit_file: 使用提供的内容编辑现有文件,并显示差异
  • delete_file: 删除文件

安全性

服务器实现了路径规范化和验证,确保操作被限制在指定的基础目录内,从而防止目录遍历攻击。

许可证

MIT

致谢

相关 MCP 服务