Notion MCP Server

by ccabanillas

Integrations

  • Provides a standardized interface for interacting with Notion's API, allowing users to list and query databases, create and update pages, and search across a Notion workspace.

Notion MCP サーバー

Notion統合のためのモデルコンテキストプロトコル(MCP)サーバー実装。Notion APIとの連携のための標準化されたインターフェースを提供します。Claude Desktopおよびその他のMCPクライアントと互換性があります。

特徴

  • Notionデータベースの一覧表示とクエリ
  • ページの作成と更新
  • Notionワークスペース全体を検索
  • データベースの詳細を取得し、子をブロックする
  • httpx による完全な async/await サポート
  • Pydantic v2 モデルによる型安全
  • 詳細なログ記録による適切なエラー処理
  • MCP 1.6.0との互換性

インストール

  1. リポジトリをクローンします。
git clone https://github.com/ccabanillas/notion-mcp.git cd notion-mcp
  1. 仮想環境を作成し、依存関係をインストールします (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 .
  1. プロジェクト ルートに.envファイルを作成します。
NOTION_API_KEY=your_notion_integration_token

使用法

  1. サーバーをテストします (エラーなしで実行されるはずです)。
python -m notion_mcp
  1. Claude 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統合トークンが必要です。設定方法は次のとおりです。

  1. https://www.notion.so/my-integrationsにアクセスしてください。
  2. 適切な機能(必要に応じて読み取り/書き込み)を備えた新しい統合を作成します
  3. 統合トークンをコピーする
  4. プロジェクトのルート ディレクトリの.envファイルに追加します。
NOTION_API_KEY=your_notion_integration_token
  1. Notionデータベースを統合して共有する(データベースの「共有」メニューから)

貢献

  1. リポジトリをフォークする
  2. 機能ブランチを作成します( git checkout -b feature/amazing-feature
  3. 変更をコミットします ( git commit -m 'Add some amazing feature' )
  4. ブランチにプッシュする ( git push origin feature/amazing-feature )
  5. プルリクエストを開く

ライセンス

MITライセンス - 自己責任で使用してください

トラブルシューティング

よくある問題

  • 接続エラー: Notion APIキーが正しいこと、インターネットにアクセスできることを確認してください
  • 権限エラー: 統合に、アクセスしようとしているデータベースへのアクセス権が付与されていることを確認してください
  • Claude デスクトップ統合: Claude デスクトップが接続しない場合は、設定パスが正しいことと、サーバーが stdout にログ出力せずに実行されていることを確認してください。

謝辞

  • Claude Desktop やその他の MCP クライアントと連携するように構築されています
  • NotionのAPIを使用(最新の互換バージョン2022-02-22)
  • MCP 1.6.0 との互換性を維持
  • danhilseさんに特別な感謝を申し上げます。私は彼のnotion-mcp-serverプロジェクトを参考にしました。
-
security - not tested
A
license - permissive license
-
quality - not tested

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.

Notion の API と対話するための標準化されたインターフェースを提供するモデル コンテキスト プロトコル サーバー。これにより、ユーザーはデータベースの一覧表示、ページの作成、および Notion ワークスペース全体の検索を実行できます。

  1. 特徴
    1. インストール
      1. 使用法
        1. 発達
          1. プロジェクト構造
          2. テストの実行
        2. 構成
          1. 貢献
            1. ライセンス
              1. トラブルシューティング
                1. よくある問題
              2. 謝辞

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that integrates with Notion's API to manage personal todo lists, allowing users to view, add, and update tasks directly from Claude.
                  Last updated -
                  3
                  Python
                  MIT License
                • -
                  security
                  F
                  license
                  -
                  quality
                  A 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.
                  Last updated -
                  275
                  2
                  TypeScript
                • -
                  security
                  F
                  license
                  -
                  quality
                  A Model Context Protocol server that provides a comprehensive interface for interacting with the ConnectWise Manage API, simplifying API discovery, execution, and management for both developers and AI assistants.
                  Last updated -
                  46
                  2
                  Python
                  • Linux
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  A 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.
                  Last updated -
                  275
                  JavaScript
                  • Apple

                View all related MCP servers

                ID: 694u8ecn1f