Integrations
Provides a REST API interface for interacting with Notion's API, allowing for searching, database operations (creation, querying, updating), page management, block manipulation, user information retrieval, and comment functionality.
Integrates Swagger UI to provide interactive API documentation, available at the /api-docs endpoint with OpenAPI schema accessible at /openapi.json.
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
Related MCP Servers
- AsecurityAlicenseAqualityMCP Server for the Notion API, enabling Claude to interact with Notion workspaces.Last updated -181,398699TypeScriptMIT License
- -securityFlicense-qualityEnables interaction with Notion through the Notion API by exposing it as tools for LLMs, allowing operations like reading, creating, updating, and deleting Notion pages seamlessly via natural language.Last updated -4117TypeScript
- -securityAlicense-qualityA 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 -95PythonMIT License
- AsecurityAlicenseAqualityNotion MCP Server is a MCP server implementation that enables AI assistants to interact with Notion's API.Last updated -1327591TypeScriptMIT License