Skip to main content
Glama

Notion MCP Server

by ghubnerr

Notion MCP サーバー

Notionワークスペースと統合するためのモデルコンテキストプロトコル(MCP)サーバー。このサーバーは、AIモデルがNotion内のコンテンツにアクセス、クエリ、変更するための標準化されたインターフェースを提供します。

前提条件

  • Node.js (v16 以上)
  • Notion APIキー( Notion統合から)
  • 適切な権限を持つ接続された Notion ワークスペース

インストール

  1. このリポジトリをクローンします:
    git clone https://github.com/yourusername/notion-mcp-server.git cd notion-mcp-server
  2. 依存関係をインストールします:
    npm install
  3. ルート ディレクトリに Notion API キーを使用して.envファイルを作成します。
    # Required NOTION_API_KEY=your_notion_api_key_here # Optional settings DEBUG=false REQUIRE_CONFIRMATION_FOR_CREATE=true REQUIRE_CONFIRMATION_FOR_UPDATE=true REQUIRE_CONFIRMATION_FOR_DELETE=true UPDATE_POLLING_INTERVAL=60000 MAX_BLOCK_DEPTH=3 BACKUP_DIR=./backups BACKUP_RETENTION_DAYS=30 MAX_BACKUPS_PER_PAGE=5
  4. プロジェクトをビルドします。
    npm run build
  5. サーバーを起動します。
    npm start

Claude for Desktop と併用

この Notion MCP サーバーを Claude for Desktop で使用するには:

  1. Claude for Desktopがインストールされ、最新バージョンに更新されていることを確認してください
  2. Claude for Desktop の設定ファイルを開きます。
    • macOSの場合: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows の場合: %APPDATA%\Claude\claude_desktop_config.json
  3. サーバー構成を追加します。
    { "mcpServers": { "notion": { "command": "node", "args": ["/path/to/notion-mcp-server/build/index.js"], "env": { "NOTION_API_KEY": "your_notion_api_key_here" } } } }
  4. ファイルを保存し、Claude for Desktopを再起動します。

リソース

サーバーは次のリソースを公開します。

リソースURI説明
notion://databasesワークスペース内のすべてのデータベースを一覧表示します
notion://databases/{databaseId}/schema特定のデータベースのスキーマを取得します
notion://databases/{databaseId}/content特定のデータベースからすべてのページ/アイテムを取得します
notion://pages/{pageId}特定のページのコンテンツを取得します
notion://updatesワークスペース内の最近の更新と変更を取得します

ツール

サーバーは次のツールを提供します。

プロンプト

サーバーには、次の事前構成されたプロンプトが含まれています。

プロンプト名説明
upcoming-deadlines今後の締め切りのリストを取得する
project-statusプロジェクトの状況を要約する
daily-tasks今日のタスクリストを取得する

クエリの例

Claude に接続すると、Notion ワークスペースについて自然言語で質問できるようになります。

  1. 「私のワークスペースで今日期限が切れるタスクは何ですか?」
  2. 「プロジェクトXのステータスを教えてください」
  3. 「「アイデア」データベースに「新機能コンセプト」というタイトルの新しいページを作成します」
  4. 「タスクYのステータスを「完了」に更新する」
  5. 「過去 24 時間以内にワークスペースにどのような変更が加えられましたか?」
  6. 「来週の締め切りをまとめます」
  7. 「ページ abc123 のすべてのバックアップを表示」
  8. 「バックアップファイルpage_abc123_2023-01-01.jsonからページabc123を復元する」

サーバーの拡張

新しい機能を追加するには:

  1. リソースの追加: index.tsのリソース ハンドラーを拡張します。
  2. ツールの追加: index.tsに新しいツール定義を作成する
  3. プロンプトの追加: index.tsに新しいプロンプト テンプレートを定義します。
  4. API統合の強化notion-api.tsに新しいAPI関数を追加

ログ

詳細なエラー情報については、サーバー ログを確認してください。

  • Claude のデスクトップ ログ: MCP 関連のログについては、Claude のログ ディレクトリを参照してください。
  • サーバー出力: サーバーログの標準出力とエラーストリームを確認します
-
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.

AI モデルが Notion ワークスペース内のコンテンツにアクセスし、クエリを実行し、変更するための標準化されたインターフェースを提供するモデル コンテキスト プロトコル サーバー。

  1. 前提条件
    1. インストール
      1. Claude for Desktop と併用
        1. リソース
          1. ツール
            1. プロンプト
            2. クエリの例

          Related MCP Servers

          • A
            security
            F
            license
            A
            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 -
            10
            947
            3
            TypeScript
          • -
            security
            A
            license
            -
            quality
            A 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 -
            111
            Python
            MIT License
            • Apple
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol (MCP) server that exposes the official Notion SDK, allowing AI models to interact with Notion workspaces.
            Last updated -
            17
            513
            8
            TypeScript
            Apache 2.0
            • Apple
            • Linux
          • A
            security
            F
            license
            A
            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 -
            12
            947
            1
            JavaScript
            • Apple

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/ghubnerr/Notion-MCP'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server