- Explore MCP Servers
- mcp_notion_client
Mcp Notion Client
What is Mcp Notion Client
mcp_notion_client is a sample application that connects to the Notion MCP server via SSE using the mcp_client library.
Use cases
Use cases include automating tasks in Notion, real-time collaboration on documents, and integrating Notion with other applications for enhanced productivity.
How to use
To use mcp_notion_client, you need to set up your environment by creating a .env file with your GEMINI_API_KEY, NOTION_API_KEY, and SERVER_IP. Then, run the local server using the provided command with supergateway.
Key features
Key features include SSE connection to the Notion MCP server, integration with Google and Notion accounts, and the ability to convert standard input/output to SSE using supergateway.
Where to use
mcp_notion_client can be used in fields that require integration with Notion for project management, note-taking, or any application that benefits from real-time data updates.
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 Client
mcp_notion_client is a sample application that connects to the Notion MCP server via SSE using the mcp_client library.
Use cases
Use cases include automating tasks in Notion, real-time collaboration on documents, and integrating Notion with other applications for enhanced productivity.
How to use
To use mcp_notion_client, you need to set up your environment by creating a .env file with your GEMINI_API_KEY, NOTION_API_KEY, and SERVER_IP. Then, run the local server using the provided command with supergateway.
Key features
Key features include SSE connection to the Notion MCP server, integration with Google and Notion accounts, and the ability to convert standard input/output to SSE using supergateway.
Where to use
mcp_notion_client can be used in fields that require integration with Notion for project management, note-taking, or any application that benefits from real-time data updates.
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
mcp_notion_client
概要
mcp_clientライブラリを使用して gemini経由でNotion MCPサーバーにsse接続するサンプルアプリです。
sse接続するサーバーは、ローカルPC上に立ててアプリはそこへ接続しています
アプリの場合は、stdio接続ではなくsseで接続するため、Notion MCPのstdioをsseに変換するためにsupergatewayを使用しています。
詳細はこちらの方の記事がわかりやすかったです。
https://notai.jp/supergateway/
事前準備
事前に以下のアカウントが必要です
- Google アカウント
- Notion アカウント
起動前に.envに以下の設定を行ってください
- GEMINI_API_KEY
- https://aistudio.google.com/app/apikey から api keyを取得して設定してください
- NOTION_API_KEY
- notionのインテグレーション で取得したAPI Keyを設定してください
- SERVER_IP
- ローカルPCのIPアドレス(ifconfigなどで取得したローカルIPアドレスを設定してください)
GEMINI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NOTION_API_KEY=ntn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SERVER_IP=xxx.xxx.xx.xx
demo
https://x.com/i/status/1917635132045025587
実際に叩いた時のローカルサーバのコマンド
supergatewayを使用してNotion MCPサーバーをローカルPC上で立ち上げた時のコマンドです。
OPENAPI_MCP_HEADERS='{"Authorization":"Bearer ntn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","Notion-Version":"2022-06-28"}' \ npx -y supergateway --stdio "npx -y @notionhq/notion-mcp-server"
notionのtokenは
インテグレーションページで作成したapi keyを適用してください
また、こちらのCursorでの設定方法の5.に記載されているように操作したいページにMCPの接続設定をしておかないと操作できないため、注意してください。
notion page idの取得方法
Notionのページ操作をする際にpage idが必要になることがあるので
こちらのページを参照して取得してください
Dev Tools 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.










