Skip to main content
Glama

Notion API Server

Reference video

Video on how to use Notion MCP

This is a custom server for easy use of the Notion API. It is implemented using Express.js and provides various functions of the Notion API as a REST API.

Related MCP server: Notion MCP Server

How to install

  1. Install required packages:

npm install express cors @notionhq/client swagger-jsdoc swagger-ui-express
  1. Running the server:

node server.js
  1. The server runs at http://localhost:3000 .

How to set up

  1. Set your Notion API token in the NOTION_TOKEN variable in your server.js file:

const NOTION_TOKEN = '여기에_노션_API_토큰_입력';
  1. If necessary, you can run it on a different port by modifying the PORT variable.

API Features

Search API

  • POST /api/search : Search pages and databases within your Notion workspace.

Database API

  • POST /api/databases : Create a database

  • GET /api/databases/:id : Query database

  • PATCH /api/databases/:id : Update database

  • POST /api/databases/:id/query : Database query

Page API

  • POST /api/pages : Create a page

  • GET /api/pages/:id : View page information

  • PATCH /api/pages/:id : Update page

  • GET /api/pages/:page_id/properties/:property_id : View page properties

Block API

  • GET /api/blocks/:id : Block query

  • GET /api/blocks/:id/children : View block contents

  • PATCH /api/blocks/:id : Update block

  • PATCH /api/blocks/:id/children : Add block content

  • DELETE /api/blocks/:id : Delete block

User API

  • GET /api/users : View user list

  • GET /api/users/:id : User search

  • GET /api/users/me : View your own user information

Comment API

  • POST /api/comments : Create a comment

  • GET /api/comments?block_id=... : View comments

Cursor MCP Integration

  1. Add the following settings to .cursor/mcp.json file:

{
  "mcpServers": {
    "customApi": {
      "url": "http://localhost:3000",
      "toolNameStrategy": "url-path-segments"
    }
  }
}
  1. You can access the Notion API using MCP functions in Cursor while the server is running.

Usage examples

Example search request

// 페이지 검색
fetch('http://localhost:3000/api/search', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    filter: {
      value: "page",
      property: "object"
    }
  })
})
.then(response => response.json())
.then(data => console.log(data));

Page creation example

// 새 페이지 생성
fetch('http://localhost:3000/api/pages', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    parent: {
      page_id: "페이지_ID"
    },
    properties: {
      title: {
        title: [
          {
            text: {
              content: "새 페이지 제목"
            }
          }
        ]
      }
    }
  })
})
.then(response => response.json())
.then(data => console.log(data));

Example of creating a database

// 데이터베이스 생성
fetch('http://localhost:3000/api/databases', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    parent: {
      type: "page_id",
      page_id: "페이지_ID"
    },
    title: [
      {
        text: {
          content: "테스트 데이터베이스"
        }
      }
    ],
    properties: {
      "이름": {
        "title": {},
        "description": "제목 항목"
      },
      "상태": {
        "description": "작업 상태",
        "select": {
          "options": [
            {
              "name": "진행 중",
              "color": "blue"
            },
            {
              "name": "완료",
              "color": "green"
            }
          ]
        }
      }
    }
  })
})
.then(response => response.json())
.then(data => console.log(data));

API Documentation

The API documentation is available at the following URL when running the server:

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    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.
    991
    MIT
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    An MCP server that enables natural language interaction with the Notion API, allowing users to search, comment, create pages, and access content within their Notion workspace.
    172,212
    -
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A Model Context Protocol server that enables AI assistants to interact with Notion's API for reading, creating, and modifying Notion content through natural language interactions.
    -

Latest Blog Posts

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/HariFatherKR/notion_mcp_server'

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