tiny-notion-mcp
tiny-notion-mcp
Легковесный MCP-сервер для Notion, который минимизирует использование токенов по сравнению с официальным Notion MCP.
Вместо возврата «сырого» JSON API Notion, каждый инструмент возвращает максимально компактное представление: страницы приходят в виде обычного Markdown, а результаты поиска — по одной строке на каждый найденный элемент. На практике это значительно сокращает потребление токенов в рабочих процессах с интенсивным чтением.
Инструменты
Инструмент | Описание |
| Поиск страниц по названию. Возвращает одну строку на результат в формате TOON. |
| Чтение страницы в формате Markdown. |
| Добавление Markdown в конец существующей страницы. |
| Создание подстраницы внутри родительской, опционально с контентом. |
Формат TOON
Результаты поиска и ответы при создании страниц используют компактный формат TOON (Title | Object | Optional Notes — Название | Объект | Дополнительные примечания):
Page title | page-id | https://notion.so/... | parent:<parent-id>Это позволяет сократить ответы поиска до одной строки на результат вместо сотен токенов JSON.
Related MCP server: MCP Notion Server (@suncreation)
Поддерживаемые типы блоков
Чтение (notion_read)
Тип блока | Вывод Markdown |
Абзац | Обычный текст |
Заголовок 1 / 2 / 3 |
|
Маркированный список |
|
Нумерованный список |
|
Блок кода |
|
Таблица | Строки, разделенные вертикальными чертами |
Дочерняя страница |
|
Встроенное форматирование (жирный, курсив, жирный курсив, зачеркнутый, подчеркнутый, встроенный код, ссылки) сохраняется как Markdown.
Запись (notion_write)
Те же типы блоков поддерживаются при записи. Markdown парсится и добавляется в целевую страницу как нативные блоки Notion.
Еще не реализовано (v2)
Следующие типы блоков распознаются Notion, но пока не обрабатываются. Они молча пропускаются при чтении и не могут быть записаны:
Разделители (
---)Цитаты
Списки задач / чекбоксы
Блоки-сноски (Callout)
Сворачиваемые списки (Toggle)
Оглавление
Файлы, изображения и видео
Известные ограничения
Пустые абзацы между разными типами списков не сохраняются при циклической обработке. Если на странице есть явный пустой абзац, разделяющий, скажем, маркированный список и нумерованный, этот разделитель теряется при цикле чтение → запись. Символы
"\n\n", которые Markdown уже расставляет между блоками, визуально эквивалентны, но не создают блок пустого абзаца Notion при записи. Это неотъемлемое ограничение плоского представления Markdown, которое сохранится до разработки формата v2.Флаг заголовка таблицы не сохраняется при циклической обработке. Таблицы Notion можно создавать без строки заголовка столбцов (
has_column_header: false). Текущий модуль записи всегда устанавливаетhas_column_header: true, так как стандартные таблицы Markdown подразумевают наличие заголовка. Записанные обратно таблицы будут выглядеть идентично, но с установленным флагом заголовка.
Требования
Python 3.12+
Токен интеграции Notion с правами чтения/записи для страниц, которые вы хотите использовать
Установка
# From source
git clone https://github.com/your-username/tiny-notion-mcp
cd tiny-notion-mcp
pip install .Или установите напрямую с помощью uv:
uv tool install .Конфигурация
Установите ваш токен интеграции Notion в качестве переменной окружения:
export NOTION_TOKEN=secret_...NOTION_API_KEY принимается в качестве псевдонима.
Claude Desktop / Claude Code
Добавьте сервер в вашу конфигурацию MCP:
{
"mcpServers": {
"tiny-notion-mcp": {
"command": "tiny-notion-mcp",
"env": {
"NOTION_TOKEN": "secret_..."
}
}
}
}Если вы установили его с помощью uv в изолированную среду, используйте полный путь:
{
"mcpServers": {
"tiny-notion-mcp": {
"command": "uv",
"args": ["run", "--", "tiny-notion-mcp"],
"env": {
"NOTION_TOKEN": "secret_..."
}
}
}
}Разработка
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytestТесты используют заглушку NotionClient и не выполняют реальных вызовов API.
Цели проектирования
Эффективность токенов прежде всего. Каждый ответ максимально мал, насколько это возможно, оставаясь при этом пригодным для использования.
Никаких промежуточных файлов. Весь контент возвращается встроенным в виде строк — никаких временных файлов, никаких ссылок на пути к файлам.
Тестируемость без учетной записи Notion. Интерфейс
NotionClientвнедряется извне, поэтому основная логика может быть протестирована изолированно.
Available Tools
9 toolsnotion_create_pageA
Create a new page or database entry. Set parent_type='page_id' (default) for a subpage, or 'database_id' to insert a row into a database. For database entries, pass extra properties (Status, Date, etc.) as Notion property objects via the 'properties' field. Returns TOON format with the new page ID.
Inputs: parent_id (required), title (required), parent_type, properties, +1 more.
notion_delete_blockA
⚠️ DESTRUCTIVE — deletes a single block (moves to Notion's trash, recoverable within 30 days). Use notion_get_blocks to find the block ID first. Deleting a parent block (table, toggle) also deletes all its children.
Inputs: block_id (required).
notion_delete_pageA
⚠️ DESTRUCTIVE — moves a Notion page to trash. The page is recoverable from Notion's trash within 30 days. Only call this when the user explicitly asks to delete a page.
Inputs: page_id (required).
notion_get_blocksA
List all blocks on a page with their IDs. Returns one line per block: block-id | block_type | text_preview. If the response ends with 'MORE: ', pass that cursor as start_cursor to get the next batch. Use the block-id with notion_write's after_block_id to insert content after a specific block.
Inputs: page_id (required), start_cursor.
notion_query_databaseA
Query a Notion database and return results as a markdown table. Each row is one entry; columns match the database properties. An ID column is appended for follow-up reads or writes. If the response ends with 'MORE: ', pass that cursor as start_cursor to get the next batch.
Inputs: database_id (required), limit, start_cursor.
notion_readA
Read a Notion page as markdown. Returns markdown string directly. If the response ends with 'MORE: ', pass that cursor as start_cursor to read the next batch of blocks.
Inputs: page_id (required), start_cursor.
notion_searchA
Search Notion pages. Returns TOON format: Title | ID | URL (one per line)
Inputs: query (required), limit.
notion_update_pageA
Update properties of a Notion page or database entry. Pass a dict of Notion property objects, e.g. {"Status": {"status": {"name": "Done"}}} or {"Date": {"date": {"start": "2026-04-30"}}}.
Inputs: page_id (required), properties (required).
notion_writeA
Append markdown to a Notion page. Converts markdown to blocks. Pass after_block_id to insert the content after a specific block rather than at the end of the page. Use notion_read to find block IDs (each block object has an 'id' field).
Inputs: page_id (required), markdown (required), after_block_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct Notion operation (create page, delete block, query database, etc.) with no overlapping functionality. The descriptions clearly differentiate between similar-sounding tools like notion_read (page as markdown) and notion_get_blocks (list block IDs).
All tools follow a consistent `notion_<verb>_<noun>` pattern using snake_case. The verbs are descriptive and align with the action (create, delete, get, query, read, search, update, write), making the naming predictable and easy to follow.
With 9 tools, the set is well-scoped for a Notion integration. Each tool serves a necessary core function without being excessive. The count is typical for such an API surface, allowing efficient coverage without overwhelming an agent.
The tools cover essential CRUD operations for pages and databases, plus search, block listing, and content writing. Missing are direct block update and database creation, but the existing set handles most common workflows. Minor gaps, but not critical.
Maintenance
Related MCP Connectors
Hosted Notion MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Hosted MCP server for Obsidian Sync vaults: read, search, edit notes. Not affiliated with Obsidian.
Related MCP Servers
- AlicenseCqualityDmaintenanceAn MCP server that converts Markdown content to Notion API-compatible formats, suitable for content management and development integration.11Apache 2.0
- AlicenseAqualityDmaintenanceAn MCP server that enables LLMs to interact with Notion workspaces via the Notion API, supporting page creation, database management, and content retrieval. It features markdown conversion to optimize token usage and enhanced error handling for more reliable workspace interactions.191MIT
- AlicenseNot gradedqualityBmaintenanceA lightweight, read-only MCP server for Notion that enables searching, reading pages, and querying databases with token-efficient output and smart caching.29 npm5MIT
- AlicenseNot gradedqualityDmaintenanceA Notion MCP server that enables searching, exporting, and importing pages as markdown using browser credentials without admin or OAuth setup.91 npm2MIT