MCP ExplorerExplorer

Notion

@v-3on 12 days ago
97Β MIT
FreeCommunity
Productivity
#Notion
Notion MCP integration. Search, Read, Update, and Create pages through Claude chat.

Overview

What is Notion

The Notion MCP Server is a Model Context Protocol server that facilitates seamless integration with Notion, allowing Language Models to interact with Notion workspaces through standardized operations like searching, reading, creating, and updating pages and databases.

Use cases

The server is useful for automating task management, organizing notes, and maintaining databases within Notion. It can be utilized for creating structured content, providing real-time updates, and facilitating collaborative functionalities in a workspace.

How to use

To use the Notion MCP Server, users need to clone the repository, install dependencies, configure their environment with a Notion API key, and set up integration with compatible clients like Claude Desktop. Users can perform various operations through defined APIs for page and database management.

Key features

Key features include page operations for searching, creating, reading, and updating pages; enhanced markdown support for various content types; and comprehensive database operations which allow users to create, manage, and query databases with diverse property types.

Where to use

The Notion MCP Server can be used in any environment that supports Node.js and requires integration with Notion for dynamic content management, such as personal productivity tools, team collaboration platforms, and automated note-taking applications.

Content

Notion MCP Server

A Model Context Protocol (MCP) server that provides seamless integration with Notion. This server enables Language Models to interact with your Notion workspace through standardized tools for searching, reading, creating, and updating pages and databases.

🌟 Key Features

Page Operations

  • πŸ” Search through your Notion workspace
  • πŸ“ Create new pages with rich markdown content
  • πŸ“– Read page content with clean formatting
  • πŸ”„ Update existing pages
  • πŸ’¬ Add and retrieve comments
  • 🧱 Block-level operations (update, delete)

Enhanced Markdown Support

  • Multiple heading levels (H1-H3)
  • Code blocks with language support
  • Interactive todo items with checkbox states
  • Blockquotes with multi-line support
  • Horizontal dividers
  • Images with captions
  • Nested bullet points

Database Operations

  • Create and manage databases
  • Add and update database items
  • Query with filters and sorting
  • Support for various property types:
    • Title, Rich text, Number
    • Select, Multi-select
    • Date, Checkbox
    • And more!

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • Notion API key
  • MCP-compatible client (e.g., Claude Desktop)

Installation

  1. Clone the repository:
git clone https://github.com/v-3/notion-server.git
cd notion-server
  1. Install dependencies:
npm install
  1. Set up your environment:
# Create .env file
echo "NOTION_API_KEY=your_notion_api_key_here" > .env

# Or export directly
export NOTION_API_KEY=your_notion_api_key_here
  1. Build the server:
npm run build

πŸ”§ Configuration

Claude Desktop Setup

  1. Update your Claude Desktop configuration (claude_desktop_config.json):
{
  "mcpServers": {
    "notion": {
      "command": "node",
      "args": [
        "/absolute/path/to/notion-server/build/index.js"
      ],
      "env": {
        "NOTION_API_KEY": "your_notion_api_key_here"
      }
    }
  }
}
  1. Restart Claude Desktop to apply changes

πŸ› οΈ Available Tools

Page Operations

// Search pages
{
    query: string // Search query
}

// Read page
{
    pageId: string // ID of the page to read
}

// Create page
{
    title?: string,      // Page title
    content?: string,    // Page content in markdown
    parentPageId: string // Parent page ID
    properties?: object  // For database items
}

// Update page
{
    pageId: string,   // Page ID to update
    content: string,  // New content
    type?: string    // Content type
}

Database Operations

// Create database
{
    parentPageId: string,
    title: string,
    properties: object
}

// Query database
{
    databaseId: string,
    filter?: object,
    sort?: object
}

πŸ” Setting Up Notion Access

Creating an Integration

  1. Visit Notion Integrations
  2. Click β€œNew integration”
  3. Configure permissions:
    • Content: Read, Update, Insert
    • Comments: Read, Create
    • User Information: Read

Connecting Pages

  1. Open your Notion page
  2. Click β€œβ€¦β€ menu β†’ β€œConnections”
  3. Add your integration
  4. Repeat for other pages as needed

πŸ“ Usage Examples

Creating a Page

const result = await notion.create_page({
  parentPageId: "page_id",
  title: "My Page",
  content: "# Welcome\nThis is a test page."
});

Querying a Database

const result = await notion.query_database({
  databaseId: "db_id",
  filter: {
    property: "Status",
    select: {
      equals: "In Progress"
    }
  }
});

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a Pull Request

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

This project has been significantly improved by sweir1/notion-server, who has made following updates:

  • Enhanced markdown support with more block types
  • Comprehensive database operations
  • Improved error handling and debugging
  • Better property handling for database items
  • Cleaner page output formatting

To use sweir1’s version, you can clone their repository:

git clone https://github.com/sweir1/notion-server.git

Tools

No tools

Comments