Skip to main content
Glama
Notion MCP Server
by makenotion

Notion MCP サーバー

ノーション-MCP-SM

このプロジェクトは、Notion API用のMCP サーバーを実装します。

mcp-デモ

インストール

1. Notionでの統合の設定:

https://www.notion.so/profile/integrationsにアクセスし、新しい内部統合を作成するか、既存の統合を選択します。

Notion統合トークンの作成

Notion APIの公開範囲は限定されています(例えば、MCP経由でデータベースを削除することはできません)。しかし、ワークスペースデータをLLMに公開することで、データへのリスクはゼロではありません。セキュリティを重視するユーザーは、統合機能をさらに設定することをお勧めします。

たとえば、「構成」タブから「コンテンツの読み取り」アクセス権のみを付与することで、読み取り専用の統合トークンを作成できます。

Notion統合トークン機能でコンテンツの読み取りがチェックされていることを示す

2. コンテンツを統合に接続する:

関連するページとデータベースが統合に接続されていることを確認します。

これを行うには、そのページにアクセスし、3 つのドットをクリックして、「統合に接続」を選択する必要があります。

Notion Connectionsへの統合トークンの追加

3. クライアントに MCP 構成を追加する:

npm を使用する場合:

.cursor/mcp.jsonまたはclaude_desktop_config.jsonに次のコードを追加します (MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json )

{
  "mcpServers": {
    "notionApi": {
      "command": "npx",
      "args": ["-y", "@notionhq/notion-mcp-server"],
      "env": {
        "OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"
      }
    }
  }
}
Docker の使用:

Docker を使用して MCP サーバーを実行するには、次の 2 つのオプションがあります。

オプション 1: 公式 Docker Hub イメージを使用する:

.cursor/mcp.jsonまたはclaude_desktop_config.jsonに以下を追加します。

{
  "mcpServers": {
    "notionApi": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e", "OPENAPI_MCP_HEADERS",
        "mcp/notion"
      ],
      "env": {
        "OPENAPI_MCP_HEADERS": "{\"Authorization\":\"Bearer ntn_****\",\"Notion-Version\":\"2022-06-28\"}"
      }
    }
  }
}

このアプローチ:

  • 公式Docker Hubイメージを使用

  • 環境変数を介してJSONエスケープを適切に処理します

  • より信頼性の高い構成方法を提供します

オプション 2: ローカルで Docker イメージをビルドする:

Dockerイメージをローカルでビルドして実行することもできます。まず、Dockerイメージをビルドします。

docker-compose build

次に、 .cursor/mcp.jsonまたはclaude_desktop_config.jsonに次のコードを追加します。

{
  "mcpServers": {
    "notionApi": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "OPENAPI_MCP_HEADERS={\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\"}",
        "notion-mcp-server"
      ]
    }
  }
}

ntn_****統合シークレットに置き換えることを忘れないでください。統合設定タブから確認することができます。

開発者ポータルの[構成]タブから統合トークンをコピーする

例

  1. 次の命令を使用して

Comment "Hello MCP" on page "Getting started"

AIはタスクを達成するために、 v1/searchとv1/comments 2つのAPI呼び出しを正しく計画します。

  1. 同様に、次の命令を実行すると、「Notion MCP」という名前の新しいページが親ページ「Development」に追加されます。

Add a page titled "Notion MCP" to page "Development"
  1. コンテンツIDを直接参照することもできます

Get the content of page 1a6b35e6e67f802fa7e1d27686f017f2

発達

建てる

npm run build

実行する

npx -y --prefix /path/to/local/notion-mcp-server @notionhq/notion-mcp-server

公開

npm publish --access public

Available Tools

19 tools
API-create-a-commentC

Notion | Create comment

Inputs: parent (required), rich_text (required).

API-create-a-databaseC

Notion | Create a database

Inputs: parent (required), properties (required), title.

API-delete-a-blockC

Notion | Delete a block

Inputs: block_id (required).

API-get-block-childrenC

Notion | Retrieve block children

Inputs: block_id (required), page_size, start_cursor.

API-get-selfB

Notion | Retrieve your token's bot user

Inputs: no named parameters.

API-get-userC

Notion | Retrieve a user

Inputs: user_id (required).

API-get-usersC

Notion | List all users

Inputs: page_size, start_cursor.

API-patch-block-childrenC

Notion | Append block children

Inputs: block_id (required), children (required), after.

API-patch-pageC

Notion | Update page properties

Inputs: page_id (required), archived, cover, icon, +2 more.

API-post-database-queryC

Notion | Query a database

Inputs: database_id (required), archived, filter, filter_properties, +4 more.

API-post-pageC

Notion | Create a page

Inputs: parent (required), properties (required), children, cover, +1 more.

API-post-searchC

Notion | Search by title

Inputs: filter, page_size, query, sort, +1 more.

API-retrieve-a-blockC

Notion | Retrieve a block

Inputs: block_id (required).

API-retrieve-a-commentC

Notion | Retrieve comments

Inputs: block_id (required), page_size, start_cursor.

API-retrieve-a-databaseC

Notion | Retrieve a database

Inputs: database_id (required).

API-retrieve-a-pageC

Notion | Retrieve a page

Inputs: page_id (required), filter_properties.

API-retrieve-a-page-propertyC

Notion | Retrieve a page property item

Inputs: page_id (required), property_id (required), page_size, start_cursor.

API-update-a-blockC

Notion | Update a block

Inputs: block_id (required), archived, type.

API-update-a-databaseC

Notion | Update a database

Inputs: database_id (required), description, properties, title.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 19 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific Notion resources and actions, with clear separation between operations like create, retrieve, update, and delete. However, some potential overlap exists between 'API-retrieve-a-block' and 'API-get-block-children', as both involve block retrieval but with different scopes, which could cause minor confusion.

    Naming Consistency5/5

    Tool names follow a highly consistent pattern throughout, using a structured 'API-verb-a-resource' format with hyphens separating components. All tools maintain this convention, making them predictable and easy to parse, with no deviations in style or structure.

    Tool Count4/5

    With 19 tools, the count is slightly high but reasonable for a comprehensive Notion API server, covering a wide range of operations. It might feel a bit heavy, but each tool appears to serve a specific function in the Notion domain, justifying its inclusion without being excessive.

    Completeness5/5

    The tool set provides excellent coverage of the Notion API domain, including full CRUD operations for key resources like pages, databases, blocks, and comments, along with search, query, and user management. No obvious gaps are present, enabling agents to handle complete workflows without dead ends.

    Maintenance

    ActivityMaintained
    ResponsivenessMostly unanswered

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      An MCP server that enables natural language interaction with the Notion API, allowing users to search, comment, create pages, and access content within their Notion workspace.
      320,999 npm
      -
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server for Notion API with optimized token efficiency and full database property filtering, enabling AI assistants to manage pages, databases, and blocks.
      32
      57 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for the Notion API, enabling management of pages, blocks, databases, data sources, comments, and users through natural language.
      15 npm
      3
      MIT