MCP HubMCP Hub
Ruijian-Zha

Notion_MCP_advanced

by: Ruijian-Zha

Notion MCP Integration is a lightweight Model Context Protocol (MCP) server that seamlessly integrates with Notion's API to manage a minimalist personal to-do list through Claude. This project provides basic functionality tailored specifically for a simple Notion database structure, enabling efficient task management without unnecessary complexity.

9created 15/12/2024
Visit
Notion
Integration

πŸ“ŒOverview

Purpose: To provide a simple integration that allows users to manage their personal todo list within Notion through a Model Context Protocol (MCP) server.

Overview: This framework facilitates interaction with Notion's API, enabling users to create, view, and manage their minimalist todo lists directly through commands issued via Claude, thereby enhancing productivity with a straightforward tool tailored to a specific use case.

Key Features:

  • Adding Todo Items: Users can create new tasks with descriptions and external links, allowing for clear organization of responsibilities.

  • Viewing Todos: An option to display all todo items is available, enabling users to monitor their tasks effectively.

  • Completing Tasks: Users can mark tasks as complete, providing a clear indication of progress without clutter.

  • Linking Resources: External resources can be attached to tasks, enriching the context and providing easy access to related information.


Notion MCP Integration

A simple Model Context Protocol (MCP) server that integrates with Notion's API to manage a personal todo list through Claude. This implementation is tailored for a minimalist todo list setup in Notion.

This project is based on danhilse/notion_mcp and is available under the MIT license.

Important Note

This personal project is designed for a specific use case: a simple Notion todo list with the following properties:

  • Task: The title of the todo item
  • Checkbox: Marks if the task is completed
  • Description: Additional details about the task
  • Link: A URL or reference

While this can serve as a starting point for your own integration, you may need to modify it to match your specific database structure.

Features

  • Add new todo items with descriptions and links
  • View all todos
  • Check off tasks as complete
  • Link external resources to tasks

Prerequisites

  • Python 3.10 or higher
  • A Notion account
  • A Notion integration (API key)
  • A compatible Notion database (or ability to modify the code)

Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/notion-mcp.git
    cd notion-mcp
    
  2. Set up your Python environment:

    python -m venv .venv
    source .venv/bin/activate  # Use .venv\Scripts\activate on Windows
    pip install -e .
    
  3. Create a Notion integration:

  4. Share your database with the integration:

    • Open your todo database in Notion.
    • Click the "..." menu and select "Add connections", then choose your integration.
  5. Create a .env file:

    NOTION_API_KEY=your-api-key-here
    NOTION_DATABASE_ID=your-database-id-here
    
  6. Configure Claude Desktop:

    {
      "mcpServers": {
        "notion-todo": {
          "command": "/path/to/your/.venv/bin/python",
          "args": ["-m", "notion_mcp"],
          "cwd": "/path/to/notion-mcp"
        }
      }
    }
    

Running the Server

You can run the server in two ways:

  1. Directly from the command line:

    python -m notion_mcp
    
  2. Automatically through Claude Desktop (recommended):

    • The server starts when Claude launches if configured correctly.
    • No manual server management is needed.

Usage

Basic commands through Claude:

  • "Show all my todos"
  • "Add a todo: check emails"
  • "Add a todo: review project docs, with link: https://example.com/docs"
  • "Mark todo [ID] as complete"

Limitations

  • Only compatible with a specific Notion database structure
  • Lacks support for complex database schemas
  • Basic error handling with no support for additional properties or custom fields
  • No advanced features like recurring tasks, priorities, or tags

Project Structure

notion_mcp/
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ README.md
β”œβ”€β”€ .env                   # Not included in repo
└── src/
    └── notion_mcp/
        β”œβ”€β”€ __init__.py
        β”œβ”€β”€ __main__.py
        └── server.py      # Main implementation

License

MIT License - Use at your own risk.

Acknowledgments

  • Built to work with Claude Desktop
  • Uses Notion's API