bobmatnyc

notion-mpm

Community bobmatnyc
Updated

MCP server and Python API library for Notion workspace integration

notion-mpm

Python MCP server + API library for Notion workspace integration.

Provides:

  1. Clean Python API: from notion_mpm.api import pages; await pages.get_page(token, page_id)
  2. MCP server: wraps the API for Claude Desktop (uv run notion-mpm mcp)
  3. 20+ tools: pages, blocks, databases, users, search, comments

Setup

cp .env.local.example .env.local
# Add NOTION_API_KEY=secret_...
uv sync

Create a Notion integration at: https://www.notion.so/my-integrations

Then share your pages/databases with the integration inside Notion.

Run

uv run notion-mpm setup    # verify token + workspace
uv run notion-mpm doctor   # health check
uv run notion-mpm mcp      # start MCP server (for Claude Desktop)

Test

uv run pytest
uv run pytest --cov=src --cov-report=html

Claude Desktop Config

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "notion": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/notion-mpm", "notion-mpm", "mcp"]
    }
  }
}

API Overview

src/notion_mpm/
├── api/
│   ├── _client.py      # Shared httpx client + NotionAPIError
│   ├── pages.py        # get, create, update, archive, restore pages
│   ├── blocks.py       # get, append, update, delete blocks + helpers
│   ├── databases.py    # get, create, update, query databases
│   ├── users.py        # list, get, get_bot_user
│   ├── search.py       # search pages and databases
│   └── comments.py     # get and create comments
├── auth/               # Token management from .env/.env.local
├── cli/                # Click CLI commands
└── server/             # Thin MCP adapter over api/

MCP Tools

Category Tools
Pages get_page, get_page_property, create_page, update_page, archive_page, restore_page
Blocks get_block, get_block_children, append_block_children, update_block, delete_block
Databases get_database, create_database, update_database, query_database
Users list_users, get_user, get_bot_user
Search search
Comments get_comments, create_comment

Token Scopes

Your integration needs these capabilities (set in Notion integration settings):

  • Read content — required for all read operations
  • Update content — required for create/update/archive
  • Insert comments — required for create_comment
  • Read comments — required for get_comments

Release

make publish        # patch bump + PyPI + GitHub Release
make publish-minor  # minor bump
make publish-major  # major bump

MCP Server · Populars

MCP Server · New

    DareDev256

    FCPXML MCP

    🎬 The first AI-powered MCP server for Final Cut Pro XML. Control your edits with natural language.

    Community DareDev256
    acunningham-ship-it

    Veil

    Stealth browser for AI agents — real Chrome over raw CDP, no Playwright/Puppeteer. TypeScript + MCP-native. Passes sannysoft 57/57, bypasses Cloudflare.

    Cassette-Editor

    Oh My Cassette: Chat Your Raw Clips Into a Finished Cut

    你的随身 AI 剪辑搭档 | Pocket AI co-editor for video montage — AI video editing plugin & MCP server for Claude Code, Codex, Hermes & OpenCode

    Community Cassette-Editor
    trendsmcp-ai

    Trends MCP

    MCP server for live trend data. Query Google Search, YouTube, TikTok, Reddit, Amazon, Wikipedia, News sentiment, Web Traffic, App Downloads, Steam, npm and more. Works with Claude, Cursor, VS Code, GitHub Copilot, ChatGPT, Windsurf, Cline, Raycast and any MCP-compatible.

    Community trendsmcp-ai
    jacob-bd

    Gemini Notebook (formerly Google NotebookLM) CLI & MCP Server

    Programmatic access to Gemini Notebook - via command-line interface (CLI), Model Context Protocol (MCP) server, and AI agent skills.

    Community jacob-bd