Notion MCP

Notion MCP

By michaeldslim GitHub

-

Overview

what is Notion MCP?

Notion MCP is a simple Node.js application that utilizes the Notion API to create content blocks in Notion pages.

how to use Notion MCP?

To use Notion MCP, install the application using npm, configure your Notion API key and page ID, and run the application to create content blocks in your Notion pages.

key features of Notion MCP?

  • Integration with Notion API for content management
  • Ability to create date blocks and content blocks in Notion
  • Command line interface for easy execution

use cases of Notion MCP?

  1. Automating content updates in Notion pages.
  2. Creating structured meeting notes in Notion.
  3. Managing project timelines by adding date blocks in Notion.

FAQ from Notion MCP?

  • How do I get my Notion API key?

You can obtain your Notion API key by creating a new integration on the Notion Developer Page.

  • Can I use Notion MCP for multiple pages?

Yes! You can specify different page IDs to create content in various Notion pages.

  • Is Notion MCP free to use?

Yes! Notion MCP is free to use as it is an open-source project.

Content

Notion MCP

This project is a simple Node.js application that uses the Notion API to create content blocks in Notion pages.

Installation

  1. Install MCP (Windsurf):
npx @composio/mcp setup "https://mcp.composio.dev/notion/nutritious-bashful-nail-e-V22O" --client windsurf
  1. Add MCP server to mcp_config.json:
"mcpServers": {
  "https://mcp.composio.dev/notion/nutritious-bashful-nail-e-V22O": {
    "command": "npx",
    "args": [
      "@composio/mcp@latest",
      "start",
      "--url",
      "https://mcp.composio.dev/notion/nutritious-bashful-nail-e-V22O"
    ],
    "env": {
      "npm_config_yes": "true"
    }
  }
}
  1. Install required packages:
npm install
  1. Configure .env file:
NOTION_API_KEY=your_notion_api_key_here
NOTION_DATABASE_ID=your_notion_page_id_here

How to Get Notion API Key and Page ID

  1. Get Notion API Key:

    • Go to the Notion Developer Page.
    • Click the "New integration" button.
    • Enter integration information and create it.
    • The "Internal Integration Token" is your API key.
  2. Get Page ID:

    • Open the page you want to view in Notion.
    • Find the page ID in the URL.
    • Example: https://www.notion.so/[page ID]?v=...
    • Or click the "Share" button on the page, select "Copy link", and extract the ID from the URL.
    • The ID is typically a 32-character string separated by hyphens (in the format c9de4b57-aaaa-bbbb-cccc-13056c520983).
  3. Set Integration Permissions:

    • Click the "..." menu in the top right corner of the page.
    • Find and click "Connections" or "Add connections".
    • Search for and add the integration you created.

Usage

Basic Execution

Run the basic application:

node index.js

or

npm start

Creating Blocks

To create date blocks and content, use command line arguments as follows:

node index.js "[date]" "content"

Example:

node index.js "[03/25]" "Topics discussed in today's meeting"

This command performs the following:

  1. Accesses the Notion page to find the 2025 subpage and the March subpage.
  2. Creates the specified date block and content block in the March page.
  3. Does not create a new block if a block with the same date already exists.

Execution results are displayed in the console.

No tools information available.
No content found.