Skip to main content
Glama

Notion MCP Server

by snowan

Notion MCP Server

A server that connects to the Notion API and exposes functionality through Claude's Machine Context Protocol (MCP).

Features

  • Search Notion pages by title or content
  • Retrieve page details and content
  • Query Notion databases
  • Create new pages in Notion

Setup

  1. Clone this repository:
git clone https://github.com/yourusername/notion-mcp-server.git cd notion-mcp-server
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory with the following content:
NOTION_API_KEY=your_notion_api_key_here PORT=3000 # Optional: if you want to query a specific database by default NOTION_DATABASE_ID=your_notion_database_id_here
  1. Get your Notion API key:
  2. Connect your Notion integration to your workspace:
    • Go to a page or database in your Notion workspace
    • Click the "..." menu in the top right
    • Select "Add connections"
    • Find and add your integration

Running the Server

Start the server in development mode:

npm run dev

Or in production mode:

npm start

The server will run on the port specified in your .env file (default: 3000).

API Endpoints

Regular HTTP Endpoints

  • POST /api/notion/search
    • Search for pages in Notion
    • Body: { "query": "search term" }
  • POST /api/notion/page
    • Get a page by ID
    • Body: { "page_id": "page-id-here" }
  • POST /api/notion/database/query
    • Query a database
    • Body: { "database_id": "database-id-here", "filter": {}, "sorts": [] }
  • POST /api/notion/page/create
    • Create a new page
    • Body: { "parent": {}, "properties": {}, "children": [] }

MCP Integration

The server exposes an MCP manifest at /mcp/manifest.json which describes the available functions.

To invoke an MCP function, send a POST request to /api/notion/mcp/invoke with the following structure:

{ "function_name": "search_pages", "parameters": { "query": "search term" } }

Available MCP Functions

  • search_pages - Search Notion pages by title or content
  • get_page - Get a Notion page by ID
  • query_database - Query a Notion database
  • create_page - Create a new page in Notion

License

MIT

-
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.

A server that connects to the Notion API and exposes functionality through Claude's Machine Context Protocol, enabling search, retrieval, querying, and creation of Notion pages and databases.

  1. Features
    1. Setup
      1. Running the Server
        1. API Endpoints
          1. Regular HTTP Endpoints
          2. MCP Integration
        2. Available MCP Functions
          1. License

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              MCP Server for the Notion API, enabling Claude to interact with Notion workspaces.
              Last updated -
              18
              1,299
              794
              TypeScript
              MIT License
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that enables Claude and other LLMs to interact with Notion workspaces, providing capabilities like searching, retrieving, creating and updating pages, as well as managing databases.
              Last updated -
              10
              706
              3
              TypeScript
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that provides a standardized interface for interacting with Notion's API, enabling users to list databases, create pages, and search across their Notion workspace.
              Last updated -
              111
              Python
              MIT License
              • Apple
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that connects Claude and other AI assistants to your Notion workspace, allowing AIs to interact with databases, pages, and blocks.
              Last updated -
              12
              1
              11
              JavaScript
              • 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/snowan/notion-mcp-server'

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