Skip to main content
Glama

Notion MCP Server

by SAhmadUmass

Notion MCP サーバー

Notion 統合用のモデル コンテキスト プロトコル サーバー。Claude や他の LLM が Notion ワークスペースと対話できるようになります。

特徴

  • Notionを検索: Notionワークスペース全体を検索
  • ページの取得: 特定のNotionページからコンテンツを取得する
  • ページを作成: Notionワークスペースに新しいページを作成します
  • ページの更新: 既存のページを新しいコンテンツまたはタイトルで更新します
  • データベースの作成: カスタムプロパティを使用して新しいデータベースを作成します
  • データベースのクエリ: フィルターと並べ替えを使用してデータベースをクエリします
  • データベースエントリの更新: データベースエントリのプロパティを更新します
  • データベース行の作成: カスタムプロパティを使用して既存のデータベースに新しい行を追加します

設定

  1. このリポジトリをクローンする
  2. 依存関係をインストールする
    npm install
  3. Notion APIキーを設定する
    • Notion開発者ポータルで統合を作成する
    • APIキーをコピーする
    • 次のいずれかを実行できます。
      • .envファイルを編集し、 your_notion_api_key_here実際のAPIキーに置き換えます。
      • Claude for Desktop 構成に直接渡します (推奨、下記参照)
  4. サーバーを構築する
    npm run build
  5. サーバーの実行
    npm start

Claude for Desktop の設定

  1. Claude for Desktop をインストールします(まだインストールされていない場合)
  2. Claude for Desktop App の構成を開きます。
    • macOSの場合: ~/Library/Application Support/Claude/claude_desktop_config.json
    • ファイルが存在しない場合は作成する
  3. Notion サーバーを設定に追加します。
    { "mcpServers": { "notion": { "command": "node", "args": [ "/Users/shaheerahmad/Documents/notion-mcp-server/dist/index.js", "--notion-api-key=YOUR_ACTUAL_API_KEY_HERE" ] } } }
    交換する:
    • /Users/shaheerahmad/Documents/notion-mcp-serverプロジェクトディレクトリへのフルパスを入力します。
    • YOUR_ACTUAL_API_KEY_HEREを実際の Notion API キーに置き換えます
  4. デスクトップ版のClaudeを再起動する

サーバーの使用

Claude for Desktop に接続すると、次のような質問をしてサーバーを使用できるようになります。

  • 「Notionワークスペースで会議メモを検索する」
  • 「プロジェクト計画ページの内容を取得する」(ページIDが必要です)
  • 「Notionでタスクリストを含む新しいページを作成する」
  • 「ID 1aaada269d1b8003adceda69cf7bcd97 の Notion ページを、「ページに追加する新しいコンテンツがあります。」というコンテンツで更新します。」
  • 「NotionページにID 1aaada269d1b8003adceda69cf7bcd97で新しいデータベースを作成します」
  • 「ID 1aaada269d1b8003adceda69cf7bcd97 の Notion データベースで、ステータスが「完了」のアイテムをクエリします。」

Claude はあなたのリクエストに基づいて適切なツールを自動的に使用します。

ツールの使用例

Notionを検索
Search for "meeting notes" in my Notion workspace
ページコンテンツを取得
Get the content of my Notion page with ID 1aaada269d1b8003adceda69cf7bcd97
新しいページを作成する
Create a new page in Notion with title "Weekly Report" and content "This week we accomplished the following tasks..."
既存のページを更新する
Update my Notion page with ID 1aaada269d1b8003adceda69cf7bcd97 with content "Adding this new information to the page."

タイトルを更新することもできます。

Update my Notion page with ID 1aaada269d1b8003adceda69cf7bcd97 with title "New Title" and content "New content to add."
新しいデータベースを作成する
Create a new database in my Notion page with ID 1aaada269d1b8003adceda69cf7bcd97 with title "Task Tracker" and properties { "Task Name": { "title": {} }, "Status": { "select": { "options": [ { "name": "Not Started", "color": "red" }, { "name": "In Progress", "color": "yellow" }, { "name": "Completed", "color": "green" } ] } }, "Priority": { "select": { "options": [ { "name": "Low", "color": "blue" }, { "name": "Medium", "color": "yellow" }, { "name": "High", "color": "red" } ] } }, "Due Date": { "date": {} } }
データベースのクエリ
Query my Notion database with ID 1aaada269d1b8003adceda69cf7bcd97 with filter { "property": "Status", "select": { "equals": "Completed" } }

並べ替えを追加することもできます。

Query my Notion database with ID 1aaada269d1b8003adceda69cf7bcd97 with sort { "property": "Due Date", "direction": "ascending" }
データベースエントリの更新

既存のデータベース エントリ (データベース内のページ) のプロパティを更新します。

{ "tool_name": "update-database-entry", "tool_params": { "pageId": "page_id_of_database_entry", "properties": { "Status": { "select": { "name": "Completed" } }, "Priority": { "select": { "name": "High" } }, "Due Date": { "date": { "start": "2023-12-31" } } } } }

propertiesパラメータは、データベース内の特定のプロパティタイプに対してNotion APIが期待する構造と一致する必要があります。プロパティタイプ(テキスト、選択、日付など)によって必要なフォーマットが異なります。

データベース行の作成

カスタム プロパティを使用して既存のデータベースに新しい行を追加します。

{ "tool_name": "create-database-row", "tool_params": { "databaseId": "your_database_id_here", "properties": { "Name": { "title": [ { "text": { "content": "New Task" } } ] }, "Status": { "select": { "name": "Not Started" } }, "Priority": { "select": { "name": "Medium" } }, "Due Date": { "date": { "start": "2023-12-15" } }, "Notes": { "rich_text": [ { "text": { "content": "This is a new task created via the API" } } ] } } } }

propertiesパラメータには、データベースに必要なすべてのプロパティを含める必要があり、各プロパティ タイプの Notion API 構造に従う必要があります。

トラブルシューティング

  • ツールが表示されない場合は、Claude for Desktop のログを確認してください。
    tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
  • Notion API キーが正しく設定されており、統合により対話するページへのアクセスが許可されていることを確認してください。
  • ログに「予期しないトークン」エラーが表示される場合、console.log ステートメントが MCP プロトコルに干渉している可能性があります。このバージョンのサーバーは、これらの問題を回避するために更新されています。

今後の改善

  • データベースクエリ機能を追加する
  • コンテンツのフォーマットを改善する
  • より多くのブロックタイプのサポートを追加
-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Claude や他の LLM が Notion ワークスペースと対話できるようにし、ページの検索、取得、作成、更新、データベースの管理などの機能を提供するモデル コンテキスト プロトコル サーバー。

  1. 特徴
    1. 設定
      1. Claude for Desktop の設定
        1. サーバーの使用
          1. ツールの使用例
        2. トラブルシューティング
          1. 今後の改善

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that gives LLMs the ability to interact with Ethereum networks, manage wallets, query blockchain data, and execute smart contract operations through a standardized interface.
              Last updated -
              31
              323
              2
              TypeScript
              MIT License
            • -
              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 -
              95
              Python
              MIT License
              • Apple
            • 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
              194
              JavaScript
              • Apple
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that fetches up-to-date, version-specific documentation and code examples from libraries directly into LLM prompts, helping developers get accurate answers without outdated or hallucinated information.
              Last updated -
              2
              90,385
              13,947
              JavaScript
              MIT License
              • Linux
              • 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/SAhmadUmass/notion-mcp-server'

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