Skip to main content
Glama

Notion MCP Server

by michaelwaves

Notion MCP Server

A Model Context Protocol server for Notion API integration, providing tools to create, retrieve, and update Notion pages.

Features

  • Create Page: Create new pages in databases or as child pages
  • Retrieve Page: Get page properties and metadata
  • Update Page: Modify page properties, icons, covers, and archive status
  • Retrieve Page Property: Get detailed property information with pagination support

Installation

cd backend/notion-mcp npm install

Configuration

Create a .env file with your Notion API key:

NOTION_API_KEY=your_notion_integration_token_here NOTION_VERSION=2022-06-28 PORT=3003

Getting a Notion API Key

  1. Go to Notion Developers
  2. Create a new integration
  3. Copy the "Internal Integration Token"
  4. Share your databases/pages with the integration

Usage

STDIO Transport (Development)

npm run dev:stdio

HTTP Transport (Production)

npm run dev:http # or npm start

Available Tools

notion_create_page

Creates a new page in Notion.

Parameters:

  • parent (required): Parent page or database ID
  • properties (required): Page properties matching parent schema
  • children (optional): Page content as block objects
  • icon (optional): Page icon (emoji or external URL)
  • cover (optional): Page cover image

Example:

{ "parent": { "type": "database_id", "database_id": "d9824bdc-8445-4327-be8b-5b47500af6ce" }, "properties": { "Name": { "title": [{"text": {"content": "New Page"}}] } }, "icon": { "type": "emoji", "emoji": "📝" } }

notion_retrieve_page

Retrieves a Notion page by ID.

Parameters:

  • page_id (required): The page ID to retrieve
  • filter_properties (optional): Specific property IDs to return

notion_update_page

Updates page properties and metadata.

Parameters:

  • page_id (required): The page ID to update
  • properties (optional): Properties to update
  • in_trash (optional): Archive/restore the page
  • icon (optional): Update page icon
  • cover (optional): Update page cover

notion_retrieve_page_property

Retrieves detailed property information with pagination.

Parameters:

  • page_id (required): The page ID
  • property_id (required): The property ID
  • page_size (optional): Number of items per page (max 100)
  • start_cursor (optional): Pagination cursor

Building

npm run build

Development

npm run watch # Watch mode for TypeScript compilation

Client Configuration

For HTTP transport, add to your MCP client config:

{ "mcpServers": { "notion": { "url": "http://localhost:3003/mcp" } } }

For STDIO transport:

{ "mcpServers": { "notion": { "command": "node", "args": ["./dist/index.js"] } } }

Health Check

When running HTTP transport:

curl http://localhost:3003/health

Error Handling

The server provides detailed error messages for:

  • Missing API keys
  • Invalid page/database IDs
  • Permission errors
  • Malformed requests
  • Notion API rate limits

License

MIT

Deploy Server
-
security - not tested
F
license - not found
-
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.

Enables interaction with Notion workspaces through the Notion API. Supports creating, retrieving, and updating Notion pages and their properties, allowing users to manage Notion content through natural language.

  1. Features
    1. Installation
      1. Configuration
        1. Getting a Notion API Key
      2. Usage
        1. STDIO Transport (Development)
        2. HTTP Transport (Production)
      3. Available Tools
        1. notion_create_page
        2. notion_retrieve_page
        3. notion_update_page
        4. notion_retrieve_page_property
      4. Building
        1. Development
          1. Client Configuration
            1. Health Check
              1. Error Handling
                1. License

                  Related MCP Servers

                  • -
                    security
                    F
                    license
                    -
                    quality
                    Enables interaction with Notion through the Notion API by exposing it as tools for LLMs, allowing operations like reading, creating, updating, and deleting Notion pages seamlessly via natural language.
                    Last updated -
                    6
                    22
                  • -
                    security
                    A
                    license
                    -
                    quality
                    Enables Language Models to interact with Notion workspaces through standardized tools for searching, reading, creating, and updating pages and databases.
                    Last updated -
                    110
                    MIT License
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    Provides API tools to interact with Yonote documents and collections, serving as an alternative to Notion with capabilities to list documents/collections and retrieve detailed document information.
                    Last updated -
                    2
                    • Linux
                    • Apple
                  • A
                    security
                    A
                    license
                    A
                    quality
                    Enables AI agents to interact with Notion workspaces through the Notion API. Supports reading, writing, commenting, and managing Notion pages and databases with optimized token consumption for AI agents.
                    Last updated -
                    19
                    28,374
                    MIT License
                    • Apple

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/michaelwaves/notion-mcp'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server