Notion
Интегрируйте языковые модели с Notion с помощью стандартизированных инструментов. Управляйте страницами, базами данных и автоматизируйте рабочие процессы с поддержкой расширенной разметки markdown. Повысьте свою продуктивность уже сегодня!
Notion предоставляет сервер Model Context Protocol (MCP), который обеспечивает бесшовную интеграцию с Notion. Он позволяет языковым моделям взаимодействовать с вашим рабочим пространством Notion, предоставляя стандартизированные инструменты для поиска, чтения, создания и об
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.
- 🔍 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)
- 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
- 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!
- Node.js (v16 or higher)
- Notion API key
- MCP-compatible client (e.g., Claude Desktop)
- Clone the repository:
git clone https://github.com/v-3/notion-server.git
cd notion-server- Install dependencies:
npm install- 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- Build the server:
npm run build- 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"
}
}
}
}- Restart Claude Desktop to apply changes
// 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
}// Create database
{
parentPageId: string,
title: string,
properties: object
}
// Query database
{
databaseId: string,
filter?: object,
sort?: object
}- Visit Notion Integrations
- Click "New integration"
- Configure permissions:
- Content: Read, Update, Insert
- Comments: Read, Create
- User Information: Read
- Open your Notion page
- Click "..." menu → "Connections"
- Add your integration
- Repeat for other pages as needed
const result = await notion.create_page({
parentPageId: "page_id",
title: "My Page",
content: "# Welcome\nThis is a test page."
});const result = await notion.query_database({
databaseId: "db_id",
filter: {
property: "Status",
select: {
equals: "In Progress"
}
}
});Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
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.gitNotion MCP Server
Сервер, реализующий протокол MCP (Model Context Protocol) для интеграции языковых моделей с Notion. Позволяет искать, читать, создавать и обновлять страницы и базы данных в вашем рабочем пространстве Notion через стандартизированные инструменты.
Возможности
Операции со страницами
- 🔍 Поиск по рабочему пространству
- 📝 Создание страниц с поддержкой Markdown
- 📖 Чтение содержимого с чистым форматированием
- 🔄 Обновление существующих страниц
- 💬 Добавление и получение комментариев
- 🧱 Операции на уровне блоков (обновление, удаление)
Расширенная поддержка Markdown
- Заголовки H1–H3
- Блоки кода с указанием языка
- Интерактивные todo-элементы с состояниями чекбоксов
- Цитаты с поддержкой многострочного текста
- Горизонтальные разделители
- Изображения с подписями
- Вложенные маркированные списки
Операции с базами данных
- Создание и управление базами данных
- Добавление и обновление элементов
- Запросы с фильтрацией и сортировкой
- Поддержка различных типов свойств: Title, Rich text, Number, Select, Multi-select, Date, Checkbox и других
Быстрый старт
Предварительные требования
- Node.js v16 или выше
- API-ключ Notion
- MCP-совместимый клиент (например, Claude Desktop)
Установка
-
Клонируйте репозиторий:
git clone https://github.com/v-3/notion-server.git cd notion-server -
Установите зависимости:
npm install -
Настройте переменные окружения:
echo "NOTION_API_KEY=your_notion_api_key_here" > .envИли экспортируйте напрямую:
export NOTION_API_KEY=your_notion_api_key_here -
Соберите сервер:
npm run build
Конфигурация для Claude Desktop
Отредактируйте файл 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"
}
}
}
}
После изменений перезапустите Claude Desktop.
Доступные инструменты
Операции со страницами
- Поиск страниц:
{ query: string } - Чтение страницы:
{ pageId: string } - Создание страницы:
{ title?: string, content?: string, parentPageId: string, properties?: object } - Обновление страницы:
{ pageId: string, content: string, type?: string }
Операции с базами данных
- Создание базы данных:
{ parentPageId: string, title: string, properties: object } - Запрос к базе данных:
{ databaseId: string, filter?: object, sort?: object }
Настройка доступа к Notion
Создание интеграции
- Перейдите на страницу Notion Integrations
- Нажмите «New integration»
- Настройте разрешения:
- Content: Read, Update, Insert
- Comments: Read, Create
- User Information: Read
Подключение страниц
- Откройте нужную страницу в Notion
- Нажмите «...» → «Connections»
- Добавьте вашу интеграцию
- Повторите для других страниц
Примеры использования
Создание страницы
const result = await notion.create_page({
parentPageId: "page_id",
title: "My Page",
content: "# Welcome\nThis is a test page."
});
Запрос к базе данных
const result = await notion.query_database({
databaseId: "db_id",
filter: {
property: "Status",
select: {
equals: "In Progress"
}
}
});
Вклад в проект
Приветствуются любые улучшения. Пожалуйста:
- Форкните репозиторий
- Создайте ветку для новой функциональности
- Отправьте Pull Request
Лицензия
Проект распространяется под лицензией MIT. Подробнее — в файле LICENSE.
Благодарности
Проект значительно улучшен благодаря работе sweir1/notion-server, который добавил:
- Расширенную поддержку Markdown с новыми типами блоков
- Полноценные операции с базами данных
- Улучшенную обработку ошибок и отладку
- Более качественную обработку свойств элементов баз данных
- Чистое форматирование вывода страниц
Для использования версии sweir1 клонируйте репозиторий:
git clone https://github.com/sweir1/notion-server.git
Какие функции предлагает Notion MCP Server?
Ключевые возможности включают улучшенную поддержку markdown, комплексные операции с базами данных (создание, запрос, обновление), операции на уровне блоков, а также возможность добавлять и получать комментарии на страницах Notion.
Как подключить Notion MCP Server к моему рабочему пространству Notion?
Сначала создайте интеграцию Notion с соответствующими разрешениями (чтение, обновление, вставка для контента; чтение, создание для комментариев). Затем подключите вашу интеграцию к конкретным страницам Notion через меню «Подключения».
Какие типы свойств базы данных поддерживаются?
Notion MCP Server поддерживает широкий спектр типов свойств, включая заголовок, форматированный текст, число, выбор, множественный выбор, дату и флажок.
Что такое Notion MCP Server?
Это сервер протокола контекста модели (MCP), который позволяет языковым моделям (например, Claude) взаимодействовать с вашим рабочим пространством Notion, чтобы автоматизировать задачи, управлять контентом и работать эффективнее.
Что нужно для работы с Notion MCP Server?
Вам понадобятся Node.js (версии 16 или выше), ключ API Notion и клиент, совместимый с MCP (например, Claude Desktop).
Search Pages
Search through Notion pages
Parameters
1querystringRequired▼
Search query
Read Page
Read a regular page's content (not for databases - use retrieve_database for databases). Shows block IDs with their types (needed for block operations)
Parameters
1pageIdstringRequired▼
ID of the page to read
Create Page
Create a new page or database item. For database items, include 'properties' matching database schema. For pages, use 'title' and 'content'
Parameters
4titlestringOptional▼
Page title (optional)
contentstringOptional▼
Page content in markdown format (optional)
propertiesobjectOptional▼
Additional properties for database items (optional)
parentPageIdstringRequired▼
ID of the parent page where this page will be created
Update Page
Update an existing Notion page
Parameters
5modestringOptional▼
Update mode: replace all content, append to existing, or merge
typestringOptional▼
Type of content to append
pageIdstringRequired▼
ID of the page to update
contentstringRequired▼
New content to append
positionstringOptional▼
Position for merge mode: start or end
Retrieve Comments
Get all comments from a page
Parameters
3pageIdstringRequired▼
ID of the page
pageSizenumberOptional▼
Number of comments to retrieve (max 100)
startCursorstringOptional▼
Pagination cursor
Add Comment
Add a comment to a page
Parameters
2pageIdstringRequired▼
ID of the page to comment on
contentstringRequired▼
Comment text
Create Database
Create a new database in a page
Parameters
3titlestringRequired▼
Database title
propertiesobjectRequired▼
Database schema properties
parentPageIdstringRequired▼
ID of the parent page
Query Database
Query a database
Parameters
3sortobjectOptional▼
Sort conditions
filterobjectOptional▼
Filter conditions
databaseIdstringRequired▼
ID of the database
Update Block
Update a block's content (must use same type as original block, use read_page first to get block IDs and types)
Parameters
3typestringOptional▼
Type of block
blockIdstringRequired▼
ID of the block to update
contentstringRequired▼
New content for the block
Delete Block
Delete a specific block from a page
Parameters
1blockIdstringRequired▼
ID of the block to delete
Update Database Item
Update a database item's properties (use query_database first to see required property structure)
Parameters
2pageIdstringRequired▼
ID of the database item (page) to update
propertiesobjectRequired▼
Properties to update
Retrieve Database
Retrieve a database's metadata
Parameters
1databaseIdstringRequired▼
ID of the database to retrieve
Update Database
Update a database's properties
Parameters
4titlestringOptional▼
New title for the database
databaseIdstringRequired▼
ID of the database to update
propertiesobjectOptional▼
Properties schema to update
descriptionstringOptional▼
New description for the database
Источник: https://mcpmarket.com/server/notion-7
Комментарии
Комментариев пока нет. Будьте первым.