Notion MCP Server
Notion MCP サーバー
Notion統合のためのモデルコンテキストプロトコル(MCP)サーバー実装。Notion APIとの連携のための標準化されたインターフェースを提供します。Claude Desktopおよびその他のMCPクライアントと互換性があります。
特徴
Notionデータベースの一覧表示とクエリ
ページの作成と更新
Notionワークスペース全体を検索
データベースの詳細を取得し、子をブロックする
httpx による完全な async/await サポート
Pydantic v2 モデルによる型安全
詳細なログ記録による適切なエラー処理
MCP 1.6.0との互換性
Related MCP server: Notion MCP Server
インストール
リポジトリをクローンします。
git clone https://github.com/ccabanillas/notion-mcp.git
cd notion-mcp仮想環境を作成し、依存関係をインストールします (uv を使用)。
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .あるいは、標準の venv を使用します。
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e .プロジェクト ルートに
.envファイルを作成します。
NOTION_API_KEY=your_notion_integration_token使用法
サーバーをテストします (エラーなしで実行されるはずです)。
python -m notion_mcpClaude Desktop で使用するには、
claude_desktop_config.jsonファイル (macOS では~/Library/Application Support/Claude/claude_desktop_config.jsonにあります) を調整します。
{
"servers": {
"notion-mcp": {
"command": "/Users/username/Projects/notion-mcp/.venv/bin/python",
"args": ["-m", "notion_mcp"],
"cwd": "/Users/username/Projects/notion-mcp"
}
}
}/Users/username/実際のホーム ディレクトリ パスに置き換えてください。
発達
プロジェクト構造
notion-mcp/
├── src/
│ └── notion_mcp/
│ ├── models/
│ │ ├── __init__.py
│ │ └── notion.py # Pydantic models for Notion objects
│ ├── __init__.py
│ ├── __main__.py # Entry point
│ ├── client.py # Notion API client
│ └── server.py # MCP server implementation
├── .env # Environment variables (add your Notion API key here)
├── .gitignore
├── pyproject.toml # Project dependencies
└── README.mdテストの実行
pytest構成
サーバーにはNotion統合トークンが必要です。設定方法は次のとおりです。
https://www.notion.so/my-integrationsにアクセスしてください。
適切な機能(必要に応じて読み取り/書き込み)を備えた新しい統合を作成します
統合トークンをコピーする
プロジェクトのルート ディレクトリの
.envファイルに追加します。
NOTION_API_KEY=your_notion_integration_tokenNotionデータベースを統合して共有する(データベースの「共有」メニューから)
貢献
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/amazing-feature)変更をコミットします (
git commit -m 'Add some amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
ライセンス
MITライセンス - 自己責任で使用してください
トラブルシューティング
よくある問題
接続エラー: Notion APIキーが正しいこと、インターネットにアクセスできることを確認してください
権限エラー: 統合に、アクセスしようとしているデータベースへのアクセス権が付与されていることを確認してください
Claude デスクトップ統合: Claude デスクトップが接続しない場合は、設定パスが正しいことと、サーバーが stdout にログ出力せずに実行されていることを確認してください。
謝辞
Claude Desktop やその他の MCP クライアントと連携するように構築されています
NotionのAPIを使用(最新の互換バージョン2022-02-22)
MCP 1.6.0 との互換性を維持
danhilseさんに特別な感謝を申し上げます。私は彼のnotion-mcp-serverプロジェクトを参考にしました。
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseDqualityDmaintenanceA Model Context Protocol server that enables Claude and other LLMs to interact with Notion workspaces, providing capabilities like searching, retrieving, creating and updating pages, as well as managing databases.101,0693MIT
- AlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server that exposes the official Notion SDK, allowing AI models to interact with Notion workspaces.173510Apache 2.0
- AlicenseAqualityDmaintenanceA Model Context Protocol server that connects AI assistants like Claude to Notion workspaces, enabling them to view, search, create, and update Notion databases, pages, and content blocks.121,0691MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides a standardized interface for AI models to access, query, and modify content in Notion workspaces.1,0694MIT