Notion MCP Server

by ccabanillas

Integrations

  • Provides a standardized interface for interacting with Notion's API, allowing users to list and query databases, create and update pages, and search across a Notion workspace.

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

  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
  1. Share your Notion databases with the integration (from the database's "Share" menu)

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - Use at your own risk

Troubleshooting

Common Issues

  • Connection Errors: Make sure your Notion API key is correct and you have internet access
  • Permission Errors: Ensure your integration has been given access to the databases you're trying to access
  • Claude Desktop Integration: If Claude Desktop isn't connecting, check that your config path is correct and that the server is running without logging to stdout

Acknowledgments

  • Built to work with Claude Desktop and other MCP clients
  • Uses Notion's API (latest compatible version 2022-02-22)
  • MCP 1.6.0 compatibility maintained
  • Special thanks to danhilse, I referenced his notion-mcp-server project
-
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.

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.

  1. Features
    1. Installation
      1. Usage
        1. Development
          1. Project Structure
          2. Running Tests
        2. Configuration
          1. Contributing
            1. License
              1. Troubleshooting
                1. Common Issues
              2. Acknowledgments

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that integrates with Notion's API to manage personal todo lists, allowing users to view, add, and update tasks directly from Claude.
                  Last updated -
                  3
                  Python
                  MIT License
                • -
                  security
                  F
                  license
                  -
                  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 -
                  275
                  2
                  TypeScript
                • -
                  security
                  F
                  license
                  -
                  quality
                  A Model Context Protocol server that provides a comprehensive interface for interacting with the ConnectWise Manage API, simplifying API discovery, execution, and management for both developers and AI assistants.
                  Last updated -
                  46
                  2
                  Python
                  • Linux
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  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 -
                  275
                  JavaScript
                  • Apple

                View all related MCP servers

                ID: 694u8ecn1f