Notion Todo MCP server

MCP server that enables AI assistants to manage a minimalist Notion todo list through a simple API interface.
Back to servers
Provider
Dan Hilse
Release date
Nov 30, 2024
Language
Python
Stats
175 stars

This MCP server provides integration between Claude and Notion to manage a simple todo list, allowing you to add tasks, view items, and mark tasks as complete directly through Claude conversations.

Prerequisites

  • Python 3.10 or higher
  • A Notion account
  • A Notion integration (API key)
  • A Notion database with a specific structure:
    • Task (title)
    • When (select with options: "today" or "later")
    • Checkbox (completion status)

Installation

Step 1: Clone the repository

git clone https://github.com/yourusername/notion-mcp.git
cd notion-mcp

Step 2: Set up Python environment

python -m venv .venv
source .venv/bin/activate  # On Windows use: .venv\Scripts\activate
uv pip install -e .

Step 3: Create a Notion integration

  1. Go to https://www.notion.so/my-integrations
  2. Create a new integration
  3. Copy the API key

Step 4: Share your database with the integration

  1. Open your todo database in Notion
  2. Click "..." menu → "Add connections"
  3. Select your integration

Step 5: Configure environment variables

Create a .env file in the project root:

NOTION_API_KEY=your-api-key-here
NOTION_DATABASE_ID=your-database-id-here

Step 6: Configure Claude Desktop

Edit your Claude Desktop configuration file to include:

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

Running the Server

Option 1: Manual start

# From the project directory with virtual environment activated
python -m notion_mcp

Option 2: Automatic start with Claude Desktop

If configured correctly in the Claude Desktop settings, the server will:

  • Start automatically when Claude launches
  • Run in the background with no visible output (unless errors occur)
  • Stop when Claude is closed

Using the Integration

Once the server is running, you can interact with your Notion todo list through Claude using natural language commands:

Viewing Tasks

To see all your tasks:

  • "Show all my todos"
  • "What's on my todo list?"

To view only today's tasks:

  • "What's on my list for today?"
  • "Show me my today tasks"

Adding Tasks

To add tasks for today:

  • "Add a todo for today: check emails"
  • "Create a task for today: call client"

To add tasks for later:

  • "Add a task for later: review project"
  • "Create a todo for later: update documentation"

Completing Tasks

To mark tasks as complete:

  • "Mark the task 'check emails' as complete"
  • "Complete the todo about calling the client"

Customization

If your Notion database has a different structure, you'll need to modify the server.py file to match your specific setup, particularly:

  • The create_todo() function to match your database properties
  • The todo formatting in call_tool() to handle your data structure
  • The input schema in list_tools() if you want different options

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later