Skip to main content
Glama

API-сервер Notion

Видео-справочник

Видео о том, как использовать Notion MCP

Пользовательский сервер для простого использования Notion API. Он реализован с использованием Express.js и представляет различные функции Notion API как REST API.

Related MCP server: Notion MCP Server

Как установить

  1. Установите необходимые пакеты:

npm install express cors @notionhq/client swagger-jsdoc swagger-ui-express
  1. Запуск сервера:

node server.js
  1. Сервер работает по адресу http://localhost:3000 .

Как настроить

  1. Установите свой токен API Notion в переменной NOTION_TOKEN в файле server.js:

const NOTION_TOKEN = '여기에_노션_API_토큰_입력';
  1. При необходимости вы можете запустить его на другом порту, изменив переменную PORT.

Возможности API

API поиска

  • POST /api/search : Поиск страниц и баз данных в вашем рабочем пространстве Notion.

API базы данных

  • POST /api/databases : Создать базу данных

  • GET /api/databases/:id : Запрос к базе данных

  • PATCH /api/databases/:id Обновление базы данных

  • POST /api/databases/:id/query : Запрос к базе данных

API страницы

  • POST /api/pages : Создать страницу

  • GET /api/pages/:id : Просмотр информации о странице

  • PATCH /api/pages/:id : Обновление страницы

  • GET /api/pages/:page_id/properties/:property_id : Просмотр свойств страницы

API-интерфейс блока

  • GET /api/blocks/:id : Запрос блока

  • GET /api/blocks/:id/children : Просмотр содержимого блока

  • PATCH /api/blocks/:id : Обновление блока

  • PATCH /api/blocks/:id/children : Добавить содержимое блока

  • DELETE /api/blocks/:id : Удалить блок

Пользовательский API

  • GET /api/users : Просмотр списка пользователей

  • GET /api/users/:id : Поиск пользователя

  • GET /api/users/me : Просмотр информации о вашем пользователе

API комментариев

  • POST /api/comments : Создать комментарий

  • GET /api/comments?block_id=... : Просмотреть комментарии

Интеграция курсора MCP

  1. Добавьте следующие настройки в файл .cursor/mcp.json :

{
  "mcpServers": {
    "customApi": {
      "url": "http://localhost:3000",
      "toolNameStrategy": "url-path-segments"
    }
  }
}
  1. Вы можете получить доступ к API Notion с помощью функций MCP в Cursor во время работы сервера.

Примеры использования

Пример поискового запроса

// 페이지 검색
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));

Пример создания страницы

// 새 페이지 생성
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));

Пример создания базы данных

// 데이터베이스 생성
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-документация

Документация по API доступна по следующему URL-адресу при запуске сервера:

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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.
    837
    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.
    141,622
  • -
    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.

View all related MCP servers

Related MCP Connectors

  • Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.

  • MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.

  • A basic MCP server to operate on the Postman API.

View all MCP Connectors

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