Notion MCP Server

MIT License
22,292
948
  • Apple

Notion MCP サーバー

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

インストール

1. Notionでの統合の設定:

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

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

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

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

.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\" }" } } } }

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

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

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

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

  1. 次の命令を使用して
Comment "Hello MCP" on page "Getting started"

AIはタスクを達成するために、 v1/searchv1/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
-
security - not tested
A
license - permissive license
-
quality - not tested

AI アシスタントが Notion API と対話し、自然言語コマンドを使用して Notion ワークスペースでコンテンツを検索、読み取り、コメント、作成できるようにする MCP サーバー。

  1. Installation
    1. 1. Setting up Integration in Notion:
    2. 2. Adding MCP config to your client:
    3. 3. Connecting content to integration:
  2. Examples
    1. Development
      ID: gfhe0y0m15