CherryTree MCP Server
CherryTree MCP Server
Servidor MCP que expone lectura y escritura de archivos CherryTree .ctd (XML) como herramientas nativas de Claude Code.
Soporta rich text, codeboxes, tablas, imágenes, anclas y bookmarks. Todas las escrituras pasan por una auditoría automática byte a byte que compara el backup con el archivo resultante en el disco.
Herramientas disponibles
Lectura
list_nodes— listar nodos del árbol (con profundidad y breadcrumb)read_node— leer contenido de un nodo (texto, formato, widgets)search_nodes— búsqueda full-text en todos los nodoslist_bookmarks— listar nodos marcados como favoritos
Escritura
create_node— crear nodo (texto plano o XML enriquecido víacontent_xml)create_node_with_codebox— crear nodo con codebox (o XML enriquecido víacontent_xml)update_node_content— reemplazar o añadir (texto plano o XML enriquecido víacontent_xml)append_codebox_to_node— añadir codebox o XML enriquecido a un nodo existenteupdate_node_properties— modificar nombre, tags, icono, color, readonlydelete_node— eliminar nodo e hijosmove_node— mover nodo a otro padre
Bookmarks
add_bookmark— añadir nodo a los favoritosremove_bookmark— eliminar nodo de los favoritos
Related MCP server: notion-full-mcp
Rich Text (content_xml)
Las herramientas de escritura aceptan content_xml para el formato completo de CherryTree:
<rich_text scale="h1" foreground="#00000000ffff" weight="heavy">Título</rich_text>
<rich_text>
Texto normal com </rich_text>
<rich_text weight="heavy">negrito</rich_text>
<rich_text> e </rich_text>
<rich_text style="italic">itálico</rich_text>
<rich_text foreground="#e66100" weight="heavy"> e laranja bold</rich_text>
<rich_text link="node 42">link interno</rich_text>Atributos soportados en <rich_text>
Atributo | Valores | Ejemplo |
|
| negrita |
|
|
|
|
| resaltado |
|
| cursiva |
|
| subrayado |
|
| tachado |
|
| encabezados |
|
| monoespaciado |
|
| alineación |
|
| enlaces |
|
| sangría |
Widgets (posicionados por char_offset)
Los widgets se renderizan inline en la posición char_offset (recuento de caracteres en el texto concatenado de los <rich_text>). Cada widget ocupa exactamente 1 carácter en el buffer.
<codebox char_offset="42" justification="left" frame_width="700"
frame_height="200" width_in_pixels="1"
syntax_highlighting="python3" highlight_brackets="1"
show_line_numbers="0">print("hello")</codebox>
<table char_offset="100" col_min="40" col_max="400"
col_widths="200,200" is_light="0">
<row><cell>valor1</cell><cell>valor2</cell></row>
<row><cell>header1</cell><cell>header2</cell></row>
</table>
<encoded_png char_offset="50" anchor="nome_ancora"/>Arquitectura
Lecturas usan
lxmlpara parsing/consultas XML (seguro, sin write-back)Escrituras usan manipulación de string raw para evitar la normalización de
\rque corrompechar_offseten nodos no editados (bug delxml/ETal serializar)Backup
.ctd.bakcreado automáticamente antes de cada escrituraAuditoría byte a byte después de cada escritura: lee el backup y el archivo nuevo del disco, compara prefijo/sufijo, identifica el nodo modificado, cuenta el total de nodos, valida XML
Formato de auditoría
Toda operación de escritura devuelve un informe como:
[AUDIT] readback 45,120,109 bytes: OK
delta: +252 bytes (45,119,857 -> 45,120,109)
change region: bak[45,119,844:45,119,844] -> disk[45,119,844:45,120,096]
prefix (45,119,844 bytes): OK
suffix (13 bytes): OK
nodes: 5304 (backup) -> 5305 (disco) [+1]
node adicionado: 6481 "Nome do Node" (alvo)
integridade: OK
XML parse: OKSi cualquier byte fuera de la región objetivo difiere entre el backup y el disco, el informe muestra CORRUPTED! e INTEGRITY FAILURE.
Instalación
1. Crear virtualenv e instalar dependencias
cd ~/cherrytree-mcp
python3 -m venv .venv
.venv/bin/pip install -e .2. Configurar el MCP en Claude Code
claude mcp add cherrytree -s user \
-e CHERRYTREE_FILE="/caminho/para/seu/arquivo.ctd" \
-- /caminho/para/cherrytree-mcp/.venv/bin/python \
/caminho/para/cherrytree-mcp/server.py3. Reiniciar Claude Code
Las herramientas aparecen automáticamente como mcp__cherrytree__<tool_name>.
Variables de entorno
Variable | Descripción |
| Ruta absoluta al archivo |
Requisitos
Python >= 3.11
CherryTree v1.x (formato
.ctdXML, no.ctbSQLite)Dependencias:
mcp[cli]>=1.0.0,lxml>=5.0.0
Limitaciones
Solo formato
.ctd(XML). Los archivos.ctb(SQLite) no son compatibles.CherryTree debe recargarse (cerrar/abrir o cambiar de nodo) después de ediciones vía MCP para reflejar los cambios en la UI.
Las operaciones de escritura con
append=Falseenupdate_node_contentreemplazan todo el contenido del nodo (texto, codeboxes, imágenes, tablas).
This server cannot be installed
Maintenance
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
- AlicenseAqualityCmaintenanceAn MCP server that enables reading, writing, and searching documents in Outline via its API. It supports document management, full-text search, and collection organization using Markdown formatting.83817MIT
- AlicenseAqualityCmaintenanceFull-featured Notion MCP server enabling deep page reading, block editing, snapshot/restore, file uploads, table manipulation, page restore, and destructive page copying.33MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that provides read and write access to an Obsidian vault by interacting directly with markdown files on disk. Supports searching, listing, reading, creating, editing, and appending notes without requiring any Obsidian plugins.3,860ISC
- AlicenseNot gradedqualityDmaintenanceMCP server for mind-wiki — access your personal knowledge wiki from any directory or MCP-compatible client.MIT
Related MCP Connectors
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.
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/lucaszarzur/cherrytree-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server