Skip to main content
Glama

Notion Knowledge Base MCP Server

Notion 知识库 MCP 服务器

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

特征

  • 直接从 Cline 查询你的 Notion 知识库
  • 参考 Notion 页面获取详细答案
  • 采用 FastMCP 构建,性能可靠
  • 全面的错误处理和日志记录

先决条件

  • 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

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

连接到您的 Notion 知识库的 MCP 服务器,允许您使用 Cline 扩展直接从 VSCode 查询和检索信息。

  1. 特征
    1. 先决条件
      1. 安装
        1. 用法
          1. 配置
            1. 发展
              1. 故障排除
                1. 贡献
                  1. 执照

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      MCP Server for the Notion API, enabling Claude to interact with Notion workspaces.
                      Last updated -
                      18
                      1,398
                      699
                      TypeScript
                      MIT License
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A VS Code extension provides a MCP server that exposes Roslyn language features. It enables tools like find usages, go to definition, quick info, etc.
                      Last updated -
                      111
                      TypeScript
                      AGPL 3.0
                      • Linux
                      • Apple
                    • A
                      security
                      A
                      license
                      A
                      quality
                      Notion MCP Server is a MCP server implementation that enables AI assistants to interact with Notion's API.
                      Last updated -
                      13
                      275
                      91
                      TypeScript
                      MIT License
                    • A
                      security
                      A
                      license
                      A
                      quality
                      An MCP server that allows integration with Nia's codebase understanding capabilities through function calling in tools like Cursor and Claude Desktop, enabling users to analyze project structure and search codebases via natural language queries.
                      Last updated -
                      1
                      86
                      3
                      JavaScript
                      MIT License

                    View all related MCP servers

                    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