Skip to main content
Glama

Notion MCP Server

by snowan

Not MCP 服务器

连接到 Notion API 并通过 Claude 的机器上下文协议 (MCP) 公开功能的服务器。

特征

  • 按标题或内容搜索 Not 页面
  • 检索页面详细信息和内容
  • 查询 Notion 数据库
  • 在 Notion 中创建新页面

设置

  1. 克隆此存储库:
git clone https://github.com/yourusername/notion-mcp-server.git cd notion-mcp-server
  1. 安装依赖项:
npm install
  1. 在根目录中创建一个.env文件,其内容如下:
NOTION_API_KEY=your_notion_api_key_here PORT=3000 # Optional: if you want to query a specific database by default NOTION_DATABASE_ID=your_notion_database_id_here
  1. 获取您的 Notion API 密钥:
  2. 将您的 Notion 集成连接到您的工作区:
    • 转到 Notion 工作区中的页面或数据库
    • 点击右上角的“...”菜单
    • 选择“添加连接”
    • 查找并添加您的集成

运行服务器

以开发模式启动服务器:

npm run dev

或者在生产模式下:

npm start

服务器将在您的.env文件中指定的端口上运行(默认值:3000)。

API 端点

常规 HTTP 端点

  • POST /api/notion/search
    • 在 Notion 中搜索页面
    • 正文: { "query": "search term" }
  • POST /api/notion/page
    • 通过 ID 获取页面
    • 正文: { "page_id": "page-id-here" }
  • POST /api/notion/database/查询
    • 查询数据库
    • 正文: { "database_id": "database-id-here", "filter": {}, "sorts": [] }
  • POST /api/notion/page/create
    • 创建新页面
    • 主体: { "parent": {}, "properties": {}, "children": [] }

MCP 集成

服务器在/mcp/manifest.json中公开了一个 MCP 清单,其中描述了可用的功能。

要调用 MCP 函数,请向/api/notion/mcp/invoke发送 POST 请求,其结构如下:

{ "function_name": "search_pages", "parameters": { "query": "search term" } }

可用的 MCP 功能

  • search_pages - 按标题或内容搜索 Notion 页面
  • get_page - 通过 ID 获取 Notion 页面
  • query_database - 查询 Notion 数据库
  • create_page - 在 Notion 中创建新页面

执照

麻省理工学院

-
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 API 并通过 Claude 的机器上下文协议公开功能的服务器,支持搜索、检索、查询和创建 Notion 页面和数据库。

  1. 特征
    1. 设置
      1. 运行服务器
        1. API 端点
          1. 常规 HTTP 端点
          2. MCP 集成
        2. 可用的 MCP 功能
          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,466
              802
              TypeScript
              MIT License
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that enables Claude and other LLMs to interact with Notion workspaces, providing capabilities like searching, retrieving, creating and updating pages, as well as managing databases.
              Last updated -
              10
              947
              3
              TypeScript
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that provides a standardized interface for interacting with Notion's API, enabling users to list databases, create pages, and search across their Notion workspace.
              Last updated -
              111
              Python
              MIT License
              • Apple
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that connects Claude and other AI assistants to your Notion workspace, allowing AIs to interact with databases, pages, and blocks.
              Last updated -
              12
              1
              11
              JavaScript
              • Apple

            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/snowan/notion-mcp-server'

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