CN

ccabanillas/notion-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

111 stars 23 forks 品質 61 トレンド 0MIT

ccabanillas/notion-mcpは、https://github.com/ccabanillas/notion-mcp.からインポートされたMCPサーバー候補です。

概要

ccabanillas/notion-mcpは、https://github.com/ccabanillas/notion-mcp.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

Notionとの連携のためのModel Context Protocol(MCP)サーバー実装で、NotionのAPIとのやり取りのための標準化されたインターフェースを提供します。Claude Desktopおよびその他のMCPクライアントと互換性があります。

特徴

  • リストおよびクエリNotionデータベース
  • ページの作成と更新
  • Notionワークスペースを横断して検索
  • データベースの詳細を取得し、子どもをブロックする
  • httpxによる完全な非同期/awaitサポート
  • Pydantic v2モデルでのタイプセーフ
  • 詳細なログ記録を伴う適切なエラー処理
  • MCP 1.6.0との互換性

設置

Smithery経由のインストール

Smithery経由でClaude Desktop用のNotion Integration Serverを自動的にインストールするには:

手動インストール

  1. リポジトリのクローン:

  2. 仮想環境を作成し、依存関係をインストールする(uvを使用):

あるいは、標準的なvenvを用いると:

  1. プロジェクトのルートに.envファイルを作成する:

使用法

  1. サーバーのテスト(エラーなく動作する):

  2. Claude Desktopで使用するには、claude_desktop_config.jsonファイル(macOSの~/Library/Application Support/Claude/claude_desktop_config.json)を調整してください:

必ず/Users/username/を実際のホームディレクトリパスに置き換えてください。

開発

プロジェクト構造

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Notion MCP Server

A Model Context Protocol (MCP) server implementation for Notion integration, providing a standardized interface for interacting with Notion’s API. Compatible with Claude Desktop and other MCP clients.

Features

  • List and query Notion databases
  • Create and update pages
  • Search across Notion workspace
  • Get database details and block children
  • Full async/await support with httpx
  • Type-safe with Pydantic v2 models
  • Proper error handling with detailed logging
  • Compatibility with MCP 1.6.0

Installation

Installing via Smithery

To install Notion Integration Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @ccabanillas/notion-mcp --client claude

Manual Installation

  1. Clone the repository:
git clone https://github.com/ccabanillas/notion-mcp.git
cd notion-mcp
  1. Create a virtual environment and install dependencies (using uv):
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e .

Alternatively, using standard venv:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -e .
  1. Create a .env file in the project root:
NOTION_API_KEY=your_notion_integration_token

Usage

  1. Test the server (it should run without errors):
python -m notion_mcp
  1. To use it with Claude Desktop, adjust your claude_desktop_config.json file (located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
  "servers": {
    "notion-mcp": {
      "command": "/Users/username/Projects/notion-mcp/.venv/bin/python",
      "args": ["-m", "notion_mcp"],
      "cwd": "/Users/username/Projects/notion-mcp"
    }
  }
}

Be sure to replace /Users/username/ with your actual home directory path.

Development

Project Structure

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

Running Tests

pytest

Configuration

The server requires a Notion integration token. To set this up:

  1. Go to https://www.notion.so/my-integrations
  2. Create a new integration with appropriate capabilities (read/write as needed)
  3. Copy the integration token
  4. Add it to your .env file in the project root directory:
NOTION_API_KEY=your_notion_integration_token
GitHub で README 全文を見る

インストール

npx -y @smithery/cli install @ccabanillas/notion-mcp --client claude
MCP 初心者?mcpskill.org のガイドから始めましょう →