MCP Now
Notion

Notion

by v-3
GitHub

(by v-3) - Notion MCP integration. Search, Read, Update, and Create pages through Claude chat.

page
database
content
notion
update

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:
1git clone https://github.com/v-3/notion-server.git 2cd notion-server
  1. Install dependencies:
1npm install
  1. Set up your environment:
1# Create .env file 2echo "NOTION_API_KEY=your_notion_api_key_here" > .env 3 4# Or export directly 5export NOTION_API_KEY=your_notion_api_key_here
  1. Build the server:
1npm run build

๐Ÿ”ง Configuration

Claude Desktop Setup

  1. Update your Claude Desktop configuration (claude_desktop_config.json):
1{ 2 "mcpServers": { 3 "notion": { 4 "command": "node", 5 "args": ["/absolute/path/to/notion-server/build/index.js"], 6 "env": { 7 "NOTION_API_KEY": "your_notion_api_key_here" 8 } 9 } 10 } 11}
  1. Restart Claude Desktop to apply changes

๐Ÿ› ๏ธ Available Tools

Page Operations

1// Search pages 2{ 3 query: string // Search query 4} 5 6// Read page 7{ 8 pageId: string // ID of the page to read 9} 10 11// Create page 12{ 13 title?: string, // Page title 14 content?: string, // Page content in markdown 15 parentPageId: string // Parent page ID 16 properties?: object // For database items 17} 18 19// Update page 20{ 21 pageId: string, // Page ID to update 22 content: string, // New content 23 type?: string // Content type 24}

Database Operations

1// Create database 2{ 3 parentPageId: string, 4 title: string, 5 properties: object 6} 7 8// Query database 9{ 10 databaseId: string, 11 filter?: object, 12 sort?: object 13}

๐Ÿ” 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

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

Querying a Database

1const result = await notion.query_database({ 2 databaseId: "db_id", 3 filter: { 4 property: "Status", 5 select: { 6 equals: "In Progress" 7 } 8 } 9});

๐Ÿค 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:

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