
pbohannon/notion-api-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
LLMs (Claude) に Notion 機能を公開する Python ベースの MCP
概要
Notion の API を通じて、高度な Todo リスト管理とコンテンツ構成機能を提供するモデルコンテキストプロトコル (MCP) サーバー。 MCP は、AI モデルは外部ツールやサービスと連携し、Notion の強力な機能とシームレスな統合を可能にします。 Python ベースの MCP サーバーで、AI モデルが Notion の API とやり取りできるようにします。 : 作成、更新、およびタスクをリッチテキスト、期限、優先順位、およびネストされたサブタスクを追跡します。 : 独自のプロパティ、フィルタ、ビューで Notion データベースを作成および管理します。 : コンテンツの構成と形式を Markdown サポート、階層リスト、およびブロック操作 - : Notion のワークスペース、ページ、およびデータベースとの直接のやり取りをクリーンな非同期実装で行います。 1. [https://www.notion.so/my-integrationsに移動 2. 「新しい統合」3をクリックします。 統合名(例:「マイMCP統合」) 4。 統合5を使用するワークスペースを選択します.
概要(AI 翻訳)
Notion の API を通じて、高度な Todo リスト管理とコンテンツ構成機能を提供するモデルコンテキストプロトコル (MCP) サーバー。 MCP は、AI モデルは外部ツールやサービスと連携し、Notion の強力な機能とシームレスな統合を可能にします。
#MCP 概要
Python ベースの MCP サーバーにより、AI モデルが Notion の API とやり取りできるようになり、次のようにします。
- 取引管理: 豊かなテキスト、期限、優先順位、およびネストされたサブタスクでタスクを作成、更新、追跡
- データベース操作: カスタムプロパティ、フィルタ、ビューでNotionデータベースを作成および管理 -コンテンツ組織: Markdownサポート、階層リスト、ブロック操作によるコンテンツの構成とフォーマット
- リアルタイムの統合: Notion のワークスペース、ページ、およびデータベースとの直接やり取りをクリーンな非同期実装で行います。
フル機能リスト →
クイックスタート
はじめる
##1. Notionの統合を作成する
- [https://www.notion.so/my-integrationsに移動
- 「新規統合」をクリック
- 統合の名前(例、「マイMCP統合」) 4。 統合を使用するワークスペースを選択します。
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Notion API MCP
A Model Context Protocol (MCP) server that provides advanced todo list management and content organization capabilities through Notion’s API. MCP enables AI models to interact with external tools and services, allowing seamless integration with Notion’s powerful features.
MCP Overview
Python-based MCP server that enables AI models to interact with Notion’s API, providing:
- Todo Management: Create, update, and track tasks with rich text, due dates, priorities, and nested subtasks
- Database Operations: Create and manage Notion databases with custom properties, filters, and views
- Content Organization: Structure and format content with Markdown support, hierarchical lists, and block operations
- Real-time Integration: Direct interaction with Notion’s workspace, pages, and databases through clean async implementation
Quick Start
# Clone and setup
git clone https://github.com/yourusername/notion-api-mcp.git
cd notion-api-mcp
uv venv && source .venv/bin/activate
# Install and configure
uv pip install -e .
cp .env.integration.template .env
# Add your Notion credentials to .env:
# NOTION_API_KEY=ntn_your_integration_token_here
# NOTION_PARENT_PAGE_ID=your_page_id_here # For new databases
# NOTION_DATABASE_ID=your_database_id_here # For existing databases
# Run the server
python -m notion_api_mcp
Getting Started
1. Create a Notion Integration
- Go to https://www.notion.so/my-integrations
- Click “New integration”
- Name your integration (e.g., “My MCP Integration”)
- Select the workspace where you’ll use the integration
- Copy the “Internal Integration Token” - this will be your
NOTION_API_KEY- Should start with “ntn_”
2. Set Up Notion Access
You’ll need either a parent page (for creating new databases) or an existing database ID:
Option A: Parent Page for New Databases
- Open Notion in your browser
- Create a new page or open an existing one where you want to create databases
- Click the ••• menu in the top right
- Select “Add connections” and choose your integration
- Copy the page ID from the URL - it’s the string after the last slash and before the question mark
- Example: In
https://notion.so/myworkspace/123456abcdef..., the ID is123456abcdef... - This will be your
NOTION_PARENT_PAGE_ID
- Example: In
Option B: Existing Database
- Open your existing Notion database
- Make sure it’s connected to your integration (••• menu > Add connections)
- Copy the database ID from the URL
- Example: In
https://notion.so/myworkspace/123456abcdef...?v=..., the ID is123456abcdef... - This will be your
NOTION_DATABASE_ID
- Example: In
3. Install the MCP Server
- Create virtual environment:
cd notion-api-mcp
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
uv pip install -e .
- Configure environment:
cp .env.integration.template .env
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"notion-api": {
"command": "/path/to/your/.venv/bin/python",
"args": ["-m", "notion_api_mcp"],
"env": {
"NOTION_API_KEY": "ntn_your_integration_token_here",
// Choose one or both:
"NOTION_PARENT_PAGE_ID": "your_page_id_here",
"NOTION_DATABASE_ID": "your_database_id_here"
}
}
}
}