BookStack MCP Server
Provides comprehensive tools for managing BookStack wiki content including creating, editing, and organizing books, chapters, pages, and shelves, as well as user management, search functionality, and content export in multiple formats
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BookStack MCP Server create a new page in the 'Documentation' book with the title 'API Integration Guide'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
BookStack MCP Server
Un servidor del MCP que proporciona una interfaz completa para la API de BookStack, permitiendo que modelos de IA generen y editen contenido de la wiki.
Características
Este servidor MCP proporciona herramientas para:
📚 Gestión de Contenido
Libros: Crear, leer, actualizar, eliminar y exportar libros
Capítulos: Gestionar capítulos dentro de libros
Páginas: Crear y editar páginas con contenido HTML o Markdown
Estanterías: Organizar libros en colecciones
🔍 Búsqueda y Descubrimiento
Búsqueda Global: Buscar en todo el contenido de BookStack
Navegación: Explorar la estructura del contenido
👥 Gestión de Usuarios y Permisos
Usuarios: Crear, actualizar y gestionar cuentas de usuario
Roles: Configurar roles y permisos
Autenticación: Soporte para autenticación externa
📎 Recursos Multimedia
Adjuntos: Gestionar archivos adjuntos
Imágenes: Administrar la galería de imágenes
📤 Exportación
Múltiples Formatos: Exportar contenido en HTML, PDF, texto plano y Markdown
Related MCP server: BookStack MCP Server
Instalación
Prerrequisitos
Node.js 18 o superior
Una instancia de BookStack en funcionamiento
Token de API de BookStack
Configuración
Instalar dependencias:
npm installConfigurar variables de entorno:
export BOOKSTACK_BASE_URL="https://tu-bookstack.example.com"
export BOOKSTACK_TOKEN_ID="tu_token_id"
export BOOKSTACK_TOKEN="tu_token_secreto"Compilar el proyecto:
npm run buildObtener Tokens de API de BookStack
Inicia sesión en tu instancia de BookStack
Ve a tu perfil de usuario (esquina superior derecha)
Selecciona "Preferencias" → "API Tokens"
Crea un nuevo token con los permisos necesarios
Guarda el Token ID y el Token Secret
Uso
Ejecutar el Servidor
npm startO ejecutar directamente:
node build/index.jsIntegración con Cliente MCP
El servidor se comunica a través de stdio y está diseñado para ser usado con clientes MCP como Claude Desktop.
Configuración de Claude Desktop
Agrega esta configuración a tu archivo de configuración de Claude Desktop:
{
"mcpServers": {
"bookstack": {
"type": "stdio",
"command": "npx",
"args": ["@lautarobarba/bookstack-mcp-server"],
"env": {
"BOOKSTACK_BASE_URL": "${BOOKSTACK_BASE_URL}",
"BOOKSTACK_TOKEN_ID": "${BOOKSTACK_TOKEN_ID}",
"BOOKSTACK_TOKEN": "${BOOKSTACK_TOKEN}"
}
}
}
}Configuración de VS Code
Agrega esta configuración a tu archivo .vscode/mcp.json:
{
"servers": {
"bookstack": {
"type": "stdio",
"command": "npx",
"args": ["@lautarobarba/bookstack-mcp-server"],
"env": {
"BOOKSTACK_BASE_URL": "${BOOKSTACK_BASE_URL}",
"BOOKSTACK_TOKEN_ID": "${BOOKSTACK_TOKEN_ID}",
"BOOKSTACK_TOKEN": "${BOOKSTACK_TOKEN}"
}
}
}
}Herramientas Disponibles
Gestión de Libros
list_books- Listar todos los librosget_book- Obtener detalles de un libro específicocreate_book- Crear un nuevo libroupdate_book- Actualizar un libro existentedelete_book- Eliminar un libroexport_book- Exportar libro en varios formatos
Gestión de Capítulos
list_chapters- Listar capítulosget_chapter- Obtener detalles de un capítulocreate_chapter- Crear un nuevo capítuloupdate_chapter- Actualizar un capítulodelete_chapter- Eliminar un capítuloexport_chapter- Exportar capítulo
Gestión de Páginas
list_pages- Listar páginasget_page- Obtener contenido de una páginacreate_page- Crear una nueva páginaupdate_page- Actualizar contenido de páginadelete_page- Eliminar una páginaexport_page- Exportar página
Gestión de Estanterías
list_shelves- Listar estanteríasget_shelf- Obtener detalles de una estanteríacreate_shelf- Crear una nueva estanteríaupdate_shelf- Actualizar una estanteríadelete_shelf- Eliminar una estantería
Búsqueda
search_all- Buscar en todo el contenido
Gestión de Usuarios
list_users- Listar usuariosget_user- Obtener detalles de usuariocreate_user- Crear nuevo usuarioupdate_user- Actualizar usuariodelete_user- Eliminar usuario
Gestión de Roles
list_roles- Listar rolesget_role- Obtener detalles de rolcreate_role- Crear nuevo rolupdate_role- Actualizar roldelete_role- Eliminar rol
Gestión de Recursos
list_attachments- Listar adjuntosget_attachment- Obtener detalles de adjuntodelete_attachment- Eliminar adjuntolist_images- Listar imágenesget_image- Obtener detalles de imagenupdate_image- Actualizar imagendelete_image- Eliminar imagen
Ejemplos de Uso
Crear un Nuevo Libro
// A través del cliente MCP
await mcpClient.callTool("create_book", {
name: "Guía de Desarrollo",
description: "Una guía completa para el desarrollo de software",
tags: [
{ name: "categoria", value: "desarrollo" },
{ name: "nivel", value: "intermedio" },
],
});Crear una Página con Contenido
await mcpClient.callTool("create_page", {
book_id: 1,
name: "Introducción a TypeScript",
markdown: `# Introducción a TypeScript
TypeScript es un lenguaje de programación desarrollado por Microsoft...
## Características principales
- Tipado estático
- Compatibilidad con JavaScript
- Herramientas de desarrollo avanzadas
`,
tags: [
{ name: "lenguaje", value: "typescript" },
{ name: "tema", value: "introduccion" },
],
});Buscar Contenido
await mcpClient.callTool("search_all", {
query: "typescript desarrollo",
count: 10,
});Seguridad
Todas las operaciones requieren un token de API válido de BookStack
Los permisos se manejan a través del sistema de roles de BookStack
Las validaciones de entrada utilizan schemas Zod para mayor seguridad
Manejo robusto de errores para evitar exposición de información sensible
Desarrollo
Estructura del Proyecto
src/
├── index.ts # Punto de entrada del servidor MCP
├── types/ # Definiciones de tipos TypeScript
│ └── index.ts
├── lib/ # Utilidades y cliente API
│ ├── bookstack-client.ts
│ └── validation.ts
└── tools/ # Implementación de herramientas MCP
├── content-tools.ts
└── search-user-tools.tsScripts Disponibles
npm run build- Compilar TypeScript a JavaScriptnpm run dev- Ejecutar en modo desarrollo con watchnpm start- Ejecutar el servidor compiladonpm test- Ejecutar tests (si están configurados)
Contribuir
Fork el proyecto
Crea una rama para tu feature (
git checkout -b feature/nueva-funcionalidad)Commit tus cambios (
git commit -am 'Agregar nueva funcionalidad')Push a la rama (
git push origin feature/nueva-funcionalidad)Crea un Pull Request
Licencia
Este proyecto está bajo la Licencia MIT. Ver el archivo LICENSE para más detalles.
Soporte
Para problemas y preguntas:
Verifica la documentación de la API de BookStack
Revisa los logs de error del servidor MCP
Crea un issue en el repositorio del proyecto
Changelog
v1.0.0
Implementación inicial del servidor MCP
Soporte completo para la API de BookStack
Herramientas para gestión de contenido, usuarios y búsqueda
Validación robusta con Zod
Exportación en múltiples formatos
Available Tools
41 toolscreate_bookC
Create a new book in the system
Inputs: name (required), description, description_html, tags, +1 more.
create_chapterC
Create a new chapter in a book
Inputs: book_id (required), name (required), description, description_html, +3 more.
create_pageC
Create a new page in a book or chapter
Inputs: name (required), book_id, chapter_id, html, +3 more.
create_roleC
Create a new role
Inputs: display_name (required), description, external_auth_id, permissions.
create_shelfC
Create a new shelf
Inputs: name (required), description, description_html, books, +1 more.
create_userC
Create a new user account
Inputs: name (required), email (required), password (required), roles, +3 more.
delete_attachmentC
Delete an attachment
Inputs: id (required).
delete_bookA
Delete a book (moves to recycle bin)
Inputs: id (required).
delete_chapterB
Delete a chapter (moves to recycle bin)
Inputs: id (required).
delete_imageC
Delete an image from the gallery
Inputs: id (required).
delete_pageB
Delete a page (moves to recycle bin)
Inputs: id (required).
delete_roleB
Delete a role (users with this role will lose it)
Inputs: id (required), migrate_ownership_id.
delete_shelfB
Delete a shelf (moves to recycle bin)
Inputs: id (required).
delete_userA
Delete a user account (requires admin permissions)
Inputs: id (required), migrate_ownership_id.
export_bookC
Export a book in various formats
Inputs: id (required), format (required).
export_chapterC
Export a chapter in various formats
Inputs: id (required), format (required).
export_pageC
Export a page in various formats
Inputs: id (required), format (required).
get_attachmentC
Get details of a specific attachment
Inputs: id (required).
get_bookB
Get details of a specific book including its content structure
Inputs: id (required).
get_chapterB
Get details of a specific chapter including its pages
Inputs: id (required).
get_imageC
Get details of a specific image
Inputs: id (required).
get_pageC
Get details and content of a specific page
Inputs: id (required).
get_roleB
Get details of a specific role including permissions
Inputs: id (required).
get_shelfC
Get details of a specific shelf including its books
Inputs: id (required).
get_userB
Get details of a specific user
Inputs: id (required).
list_attachmentsC
Get a listing of attachments
Inputs: page, count, sort.
list_booksC
Get a listing of books visible to the user
Inputs: page, count, sort.
list_chaptersB
Get a listing of chapters visible to the user
Inputs: page, count, sort.
list_imagesB
Get a listing of images in the gallery
Inputs: page, count, sort, filter_type.
list_pagesC
Get a listing of pages visible to the user
Inputs: page, count, sort.
list_rolesC
Get a listing of roles in the system
Inputs: page, count, sort.
list_shelvesB
Get a listing of shelves visible to the user
Inputs: page, count, sort.
list_usersC
Get a listing of users in the system
Inputs: page, count, sort.
search_allA
Search across all content types (books, chapters, pages, shelves) in BookStack
Inputs: query (required), page, count.
update_bookC
Update an existing book
Inputs: id (required), name, description, description_html, +2 more.
update_chapterC
Update an existing chapter
Inputs: id (required), name, description, description_html, +3 more.
update_imageC
Update image details
Inputs: id (required), name.
update_pageC
Update an existing page
Inputs: id (required), book_id, chapter_id, name, +4 more.
update_roleC
Update an existing role
Inputs: id (required), display_name, description, external_auth_id, +1 more.
update_shelfC
Update an existing shelf
Inputs: id (required), name, description, description_html, +2 more.
update_userC
Update an existing user account
Inputs: id (required), name, email, password, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 41 tools
Every tool has a clearly distinct purpose with no ambiguity, as each combines a specific action (create, get, list, update, delete, export) with a specific resource type (book, chapter, page, role, shelf, user, attachment, image). The search_all tool is distinct in covering multiple resources. No tools appear to do the same thing.
All tools follow a consistent verb_noun pattern throughout, using snake_case with clear action verbs (create, get, list, update, delete, export) paired with resource nouns. There are no deviations or mixed conventions, making the naming highly predictable and readable.
With 41 tools, the count is excessive for the server's purpose of managing a documentation/wiki system. This feels heavy and could overwhelm agents, as many tools are repetitive across resources (e.g., create/delete/update for each resource type). A more streamlined set would improve usability.
The tool surface provides complete CRUD/lifecycle coverage for the domain, including create, get, list, update, delete, and export operations for all core resources (books, chapters, pages, roles, shelves, users, attachments, images), plus search functionality. There are no obvious gaps or dead ends for agent workflows.
Maintenance
Related MCP Connectors
Enable Large Language Model clients to interact seamlessly with any MediaWiki wiki. Perform action…
Find, write, publish and check pages and API references in your DeveloperHub docs from an AI client
Access and search Branch's official API documentation directly within any AI agent or client.
Read and search articles and categories; create, update and publish articles in Document360.
Related MCP Servers
- AlicenseBqualityAmaintenanceEnables interaction with BookStack knowledge management systems through the BookStack API. Supports searching, reading, creating, and updating documentation content with secure authentication and dual transport modes for flexible deployment.17362 npm59MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage BookStack documentation through natural language, supporting content browsing, search, and CRUD operations for books, chapters, and pages.-
- AlicenseBqualityBmaintenanceConnects BookStack knowledge bases to Claude through 47+ tools covering complete CRUD operations for books, pages, chapters, shelves, users, search, attachments, and permissions. Enables full management of BookStack content and configuration through natural language.56475 npm105MIT
- AlicenseCqualityDmaintenanceEnables searching and retrieving content from BookStack knowledge bases via the BookStack API. It provides structured page data with clean HTML-to-text conversion for seamless integration with AI models.110MIT