tiny-notion-mcp
tiny-notion-mcp
Un servidor MCP de Notion ligero que minimiza el uso de tokens en comparación con el MCP oficial de Notion.
En lugar de devolver JSON de la API de Notion sin procesar, cada herramienta devuelve la representación útil más pequeña: las páginas se devuelven como Markdown plano, los resultados de búsqueda como una sola línea por coincidencia. En la práctica, esto reduce significativamente el consumo de tokens en flujos de trabajo con mucha lectura.
Herramientas
Herramienta | Descripción |
| Busca páginas por título. Devuelve una línea por resultado en formato TOON. |
| Lee una página como Markdown. |
| Añade Markdown a una página existente. |
| Crea una subpágina bajo una página principal, opcionalmente con contenido. |
Formato TOON
Los resultados de búsqueda y las respuestas de creación de páginas utilizan el formato compacto TOON (Title | Object | Optional Notes):
Page title | page-id | https://notion.so/... | parent:<parent-id>Esto mantiene las respuestas de búsqueda en una sola línea por resultado en lugar de cientos de tokens de JSON.
Related MCP server: MCP Notion Server (@suncreation)
Tipos de bloque admitidos
Lectura (notion_read)
Tipo de bloque | Salida Markdown |
Párrafo | Texto plano |
Encabezado 1 / 2 / 3 |
|
Elemento de lista con viñetas |
|
Elemento de lista numerada |
|
Bloque de código |
|
Tabla | Filas delimitadas por tuberías |
Página secundaria |
|
El formato en línea (negrita, cursiva, negrita-cursiva, tachado, subrayado, código en línea, enlaces) se conserva como Markdown.
Escritura (notion_write)
Se admiten los mismos tipos de bloque en la escritura. El Markdown se analiza y se añade a la página de destino como bloques nativos de Notion.
Aún no implementado (v2)
Los siguientes tipos de bloque son reconocidos por Notion pero aún no se gestionan. Se omiten silenciosamente en la lectura y no se pueden escribir:
Divisores (
---)Citas en bloque
Listas de tareas / casillas de verificación
Bloques de llamada (callout)
Listas desplegables (toggle)
Tabla de contenidos
Archivos, imágenes y vídeos
Limitaciones conocidas
Los bloques de párrafo vacíos entre diferentes tipos de lista no se mantienen en el ciclo de ida y vuelta. Cuando una página tiene un párrafo vacío explícito que separa, por ejemplo, una lista con viñetas de una lista numerada, ese separador se pierde en un ciclo de lectura → escritura. El
"\n\n"que Markdown ya coloca entre bloques es visualmente equivalente, pero no produce un bloque de párrafo vacío de Notion al escribir. Esta es una limitación inherente de una representación Markdown plana y permanecerá así hasta que se diseñe un formato v2.El indicador de encabezado de tabla no se mantiene en el ciclo de ida y vuelta. Las tablas de Notion se pueden crear sin una fila de encabezado de columna (
has_column_header: false). El escritor actual siempre establecehas_column_header: trueporque las tablas Markdown estándar implican un encabezado. Las tablas escritas de vuelta se verán idénticas pero tendrán el indicador de encabezado establecido.
Requisitos
Python 3.12+
Un token de integración de Notion con acceso de lectura/escritura a las páginas que desea utilizar
Instalación
# From source
git clone https://github.com/your-username/tiny-notion-mcp
cd tiny-notion-mcp
pip install .O instale directamente con uv:
uv tool install .Configuración
Establezca su token de integración de Notion como una variable de entorno:
export NOTION_TOKEN=secret_...NOTION_API_KEY se acepta como alias.
Claude Desktop / Claude Code
Añada el servidor a su configuración de MCP:
{
"mcpServers": {
"tiny-notion-mcp": {
"command": "tiny-notion-mcp",
"env": {
"NOTION_TOKEN": "secret_..."
}
}
}
}Si instaló con uv en un entorno aislado, utilice la ruta completa:
{
"mcpServers": {
"tiny-notion-mcp": {
"command": "uv",
"args": ["run", "--", "tiny-notion-mcp"],
"env": {
"NOTION_TOKEN": "secret_..."
}
}
}
}Desarrollo
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytestLas pruebas utilizan un NotionClient simulado y no realizan llamadas reales a la API.
Objetivos de diseño
Eficiencia de tokens primero. Cada respuesta es lo más pequeña posible mientras sigue siendo procesable.
Sin archivos intermedios. Todo el contenido se devuelve en línea como cadenas: sin archivos temporales, sin referencias a rutas de archivo.
Probable sin una cuenta de Notion. La interfaz
NotionClientse inyecta para que la lógica central pueda probarse de forma aislada.
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