Notion APIサーバー
リファレンスビデオ
Notion APIを使いやすくするためのカスタムサーバーです。 Express.jsを使用して実装されており、Notion APIのさまざまな機能をREST APIとして提供しています。
インストール方法
必要なパッケージのインストール:
サーバーの実行:
サーバーは http://localhost:3000で実行されます。
設定方法
server.jsファイルの
NOTION_TOKEN
変数にNotion APIトークンを設定します。
必要に応じて、PORT変数を変更して別のポートで実行できます。
API機能
検索API
POST /api/search
: ノッションワークスペース内のページとデータベースの検索
データベースAPI
POST /api/databases
: データベースの作成GET /api/databases/:id
: データベース照会PATCH /api/databases/:id
: データベースの更新POST /api/databases/:id/query
: データベースクエリ
ページAPI
POST /api/pages
: ページの生成GET /api/pages/:id
: ページ情報の照会PATCH /api/pages/:id
: ページの更新GET /api/pages/:page_id/properties/:property_id
: ページ属性の検索
Block API
GET /api/blocks/:id
: ブロック照会GET /api/blocks/:id/children
: ブロック内容の照会PATCH /api/blocks/:id
: ブロック更新PATCH /api/blocks/:id/children
: ブロック内容の追加DELETE /api/blocks/:id
: ブロックの削除
ユーザーAPI
GET /api/users
: ユーザーリストの検索GET /api/users/:id
: ユーザー検索GET /api/users/me
:自分のユーザー情報を検索する
コメントAPI
POST /api/comments
: コメントの生成GET /api/comments?block_id=...
: コメントの照会
Cursor MCP統合
.cursor/mcp.json
ファイルに次の設定を追加します。
サーバーの実行中にCursorのMCP機能を使用してNotion APIにアクセスできます。
使用例
検索リクエストの例
ページ生成の例
データベース生成の例
APIドキュメント
API ドキュメントは、サーバーの実行時に次の URL で確認できます。
Swagger UI: http://localhost:3000/api-docs
OpenAPI スキーマ: http://localhost:3000/openapi.json
This server cannot be installed
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.
A custom server that provides a REST API interface for Notion, allowing easy access to Notion's functionality through Cursor's MCP feature.
Related MCP Servers
- AsecurityAlicenseAqualityMCP Server for the Notion API, enabling Claude to interact with Notion workspaces.Last updated -18329825MIT License
- AsecurityFlicenseAqualityA high-performance MCP server that integrates Notion into AI workflows, enabling interaction with Notion pages, databases, and comments through a standardized protocol.Last updated -1824
- AsecurityAlicenseAqualityNotion MCP Server is a MCP server implementation that enables AI assistants to interact with Notion's API.Last updated -13305136MIT License
Notion MCP Serverofficial
AsecurityAlicenseAqualityAn MCP server that enables AI assistants to interact with the Notion API, allowing them to search, read, comment on, and create content in Notion workspaces through natural language commands.Last updated -1912,7353,269MIT License