Skip to main content
Glama
rickydata-indexer

Notion Knowledge Base MCP Server

Notion 知识库 MCP 服务器

通过 Cline VSCode 扩展提供对 Notion 知识库的访问的 MCP 服务器。

特征

  • 直接从 Cline 查询你的 Notion 知识库

  • 参考 Notion 页面获取详细答案

  • 采用 FastMCP 构建,性能可靠

  • 全面的错误处理和日志记录

Related MCP server: Memory Box MCP Server

先决条件

  • Python 3.10 或更高版本

  • uv包管理器

  • Cline VSCode 扩展

  • 用于访问 Notion 知识库的 Dify API 密钥

安装

  1. 克隆此存储库:

    git clone https://github.com/yourusername/notion-mcp-server.git
    cd notion-mcp-server
  2. 使用您的 Dify API 密钥创建一个.env文件:

    echo "DIFY_API_BACKEND_KEY=your-api-key-here" > .env
  3. 在 Cline 中安装服务器:

    fastmcp install notion_mcp_server.py

    这将自动:

    • 使用 uv 安装所有必需的依赖项

    • 在 Cline 的设置中配置服务器

    • 使服务器可供 Cline 使用

用法

安装完成后,您可以通过询问有关 Notion 知识库的问题来使用 Cline 中的服务器。例如:

Tell me about internal tooling

服务器将响应来自您的 Notion 知识库的相关信息,包括:

  • 详细解答

  • 相关 Notion 页面的链接

  • 供参考的页面 ID

配置

服务器在安装过程中自动配置,但如果需要,您可以手动更新 Cline 配置文件中的设置:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

示例配置:

{
  "mcpServers": {
    "notion-kb": {
      "command": "uv",
      "args": [
        "run",
        "--with", "fastmcp",
        "--with", "python-dotenv",
        "--with", "requests",
        "fastmcp",
        "run",
        "/absolute/path/to/notion_mcp_server.py"
      ],
      "env": {
        "DIFY_API_BACKEND_KEY": "your-api-key"
      }
    }
  }
}

发展

对于开发和测试:

  1. 安装依赖项:

    pip install -r requirements.txt
  2. 运行开发服务器:

    fastmcp dev notion_mcp_server.py

这将启动 MCP Inspector 界面来测试服务器。

故障排除

  1. 服务器未连接

    • .env文件中验证您的 API 密钥

    • 确保 Cline 配置中的服务器路径是绝对路径

    • 检查 uv 是否已安装并位于你的 PATH 中

  2. 依赖关系问题

    • 尝试使用fastmcp install notion_mcp_server.py --force重新安装

    • 验证 uv 是否安装正确

  3. 服务器挂起

    • 确保您使用配置中指定的 uv run 命令

    • 检查服务器日志是否存在错误

贡献

有关服务器的实现和架构的详细信息,请参阅mcp_instructions.md

执照

麻省理工学院

-
security - not tested
F
license - not found
-
quality - not tested

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Latest Blog Posts

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/rickydata-indexer/notion_mcp_server'

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