- Explore MCP Servers
- mcp-notion
Mcp Notion
What is Mcp Notion
mcp-notion is a Model Context Protocol server that integrates with the Notion API, enabling interaction with Notion workspaces.
Use cases
Use cases include automating content management in Notion, integrating Notion with other applications, and enhancing productivity through streamlined workflows.
How to use
To use mcp-notion, create a Notion integration, add it to your workspace, and set up the project by installing dependencies and building the server. Configure your environment settings in Claude Desktop.
Key features
Key features include block operations (create, retrieve, update, delete), page operations (retrieve, update properties), database operations (create, query, retrieve, update), comment operations (create, retrieve), user information retrieval, and search functionality.
Where to use
mcp-notion can be used in various fields such as project management, note-taking, and collaborative workspaces where Notion is utilized.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Notion
mcp-notion is a Model Context Protocol server that integrates with the Notion API, enabling interaction with Notion workspaces.
Use cases
Use cases include automating content management in Notion, integrating Notion with other applications, and enhancing productivity through streamlined workflows.
How to use
To use mcp-notion, create a Notion integration, add it to your workspace, and set up the project by installing dependencies and building the server. Configure your environment settings in Claude Desktop.
Key features
Key features include block operations (create, retrieve, update, delete), page operations (retrieve, update properties), database operations (create, query, retrieve, update), comment operations (create, retrieve), user information retrieval, and search functionality.
Where to use
mcp-notion can be used in various fields such as project management, note-taking, and collaborative workspaces where Notion is utilized.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Notion MCP サーバー
Notion API と連携する Model Context Protocol サーバー。Notion ワークスペースとの対話を可能にします。
より詳細な解説は以下の記事をご参照ください:
- 英語版: https://dev.to/suekou/operating-notion-via-claude-desktop-using-mcp-c0h
- 日本語版: https://qiita.com/suekou/items/44c864583f5e3e6325d9
この TypeScript ベースの MCP サーバーは、Notion API との統合を提供します。以下の機能を実装しています:
- ブロックの操作(作成、取得、更新、削除)
- ページの操作(取得、プロパティ更新)
- データベースの操作(作成、クエリ、取得、更新)
- コメントの操作(作成、取得)
- ユーザー情報の取得
- 検索機能
セットアップ
1. Notion インテグレーションの作成
- Notion Your Integrationsにアクセス
- 「New Integration」をクリック
- インテグレーションの名前を入力し、適切な権限を選択(例:「Read content」、「Update content」)
- 生成された「Internal Integration Token」を保存
2. インテグレーションをワークスペースに追加
- Notion で、インテグレーションにアクセスさせたいページまたはデータベースを開く
- 右上のナビゲーションボタンをクリック
- 「Connect to」ボタンをクリックし、作成したインテグレーションを選択
3. プロジェクトのセットアップ
初期セットアップ(依存関係のインストール & ビルド):
make init
開発
ビルドのみ実行:
make build
開発時の自動リビルド:
make watch
クリーンアップ:
make clean
インストール
Claude Desktop で使用するには、以下の設定を追加してください:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"notion": {
"command": "node",
"args": [
"your-built-file-path"
],
"env": {
"NOTION_API_TOKEN": "your-integration-token"
}
}
}
}
トラブルシューティング
権限エラーが発生した場合:
- インテグレーションが必要な権限を持っているか確認
- インテグレーションが該当のページやデータベースに招待されているか確認
- トークンと設定が
claude_desktop_config.json
に正しく設定されているか確認
利用可能なツール
ブロック操作
-
notion_append_block_children
- 親ブロックに子ブロックを追加
- 必須パラメータ:
block_id
(string): 親ブロックの IDchildren
(array): 追加するブロックオブジェクトの配列
-
notion_retrieve_block
- 特定のブロックの情報を取得
- 必須パラメータ:
block_id
(string): 取得するブロックの ID
-
notion_retrieve_block_children
- 特定のブロックの子ブロックを取得
- 必須パラメータ:
block_id
(string): 親ブロックの ID
- オプションパラメータ:
start_cursor
(string): 次のページの結果用カーソルpage_size
(number, デフォルト: 100, 最大: 100): 取得するブロック数
-
notion_delete_block
- 特定のブロックを削除
- 必須パラメータ:
block_id
(string): 削除するブロックの ID
ページ操作
-
notion_retrieve_page
- 特定のページの情報を取得
- 必須パラメータ:
page_id
(string): 取得するページの ID
-
notion_update_page_properties
- ページのプロパティを更新
- 必須パラメータ:
page_id
(string): 更新するページの IDproperties
(object): 更新するプロパティ
データベース操作
-
notion_create_database
- 新しいデータベースを作成
- 必須パラメータ:
parent
(object): データベースの親オブジェクトtitle
(array): データベースのタイトル(リッチテキスト配列)properties
(object): データベースのプロパティスキーマ
-
notion_query_database
- データベースをクエリ
- 必須パラメータ:
database_id
(string): クエリするデータベースの ID
- オプションパラメータ:
filter
(object): フィルター条件sorts
(array): ソート条件start_cursor
(string): ページネーションカーソルpage_size
(number, デフォルト: 100, 最大: 100): 取得する結果数
-
notion_retrieve_database
- データベースの情報を取得
- 必須パラメータ:
database_id
(string): 取得するデータベースの ID
-
notion_update_database
- データベースの情報を更新
- 必須パラメータ:
database_id
(string): 更新するデータベースの ID
- オプションパラメータ:
title
(array): 新しいタイトルdescription
(array): 新しい説明properties
(object): 更新するプロパティスキーマ
-
notion_create_database_item
- データベースに新しいアイテムを作成
- 必須パラメータ:
database_id
(string): アイテムを追加するデータベースの IDproperties
(object): 新しいアイテムのプロパティ(データベーススキーマに一致する必要あり)
検索
notion_search
- ページまたはデータベースをタイトルで検索
- オプションパラメータ:
query
(string): 検索するテキストfilter
(object): ページまたはデータベースに結果を限定する条件sort
(object): 結果のソート条件start_cursor
(string): ページネーション開始カーソルpage_size
(number, デフォルト: 100, 最大: 100): 取得する結果数
ユーザー操作
-
notion_list_all_users
- ワークスペース内の全ユーザーを一覧表示
- 注意: この機能には Notion エンタープライズプランと Organization API キーが必要
- オプションパラメータ:
start_cursor
(string): ユーザー一覧のページネーションカーソルpage_size
(number, 最大: 100): 取得するユーザー数
-
notion_retrieve_user
- 特定のユーザーの情報を取得
- 注意: この機能には Notion エンタープライズプランと Organization API キーが必要
- 必須パラメータ:
user_id
(string): 取得するユーザーの ID
-
notion_retrieve_bot_user
- 現在のトークンに関連付けられたボットユーザーの情報を取得
コメント操作
-
notion_create_comment
- コメントを作成
- インテグレーションに’insert comment’権限が必要
parent
(page_id
を含む)またはdiscussion_id
のいずれかを指定(両方は不可)- 必須パラメータ:
rich_text
(array): コメント内容のリッチテキストオブジェクト配列
- オプションパラメータ:
parent
(object):page_id
を含むオブジェクトdiscussion_id
(string): 既存のディスカッションスレッド ID
-
notion_retrieve_comments
- ページまたはブロックの未解決コメントを取得
- インテグレーションに’read comment’権限が必要
- 必須パラメータ:
block_id
(string): コメントを取得するブロックまたはページの ID
- オプションパラメータ:
start_cursor
(string): ページネーションカーソルpage_size
(number, 最大: 100): 取得するコメント数
使用例
// データベースのクエリ
<use_mcp_tool>
<server_name>notion</server_name>
<tool_name>notion_query_database</tool_name>
<arguments>
{
"database_id": "your_database_id",
"filter": {
"property": "Status",
"status": {
"equals": "Done"
}
}
}
</arguments>
</use_mcp_tool>
// ページのプロパティ更新
<use_mcp_tool>
<server_name>notion</server_name>
<tool_name>notion_update_page_properties</tool_name>
<arguments>
{
"page_id": "your_page_id",
"properties": {
"Status": {
"status": {
"name": "In Progress"
}
}
}
}
</arguments>
</use_mcp_tool>
デバッグ
MCP サーバーは stdio を介して通信するため、デバッグが難しい場合があります。MCP Inspectorの使用をお勧めします:
pnpm run inspector
Inspector は、ブラウザでデバッグツールにアクセスするための URL を提供します。
ライセンス
この MCP サーバーは MIT ライセンスの下で提供されています。これは、MIT ライセンスの条件に従って、ソフトウェアを自由に使用、修正、配布できることを意味します。詳細については、プロジェクトリポジトリの LICENSE ファイルをご覧ください。
DevTools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.