MCP PDF Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PDF_MCP_HOST | No | Host interface for the Streamable HTTP transport, for example 0.0.0.0. | |
| PDF_MCP_PORT | No | Port for the Streamable HTTP transport, for example 3333. | |
| PDF_MCP_ASSET_DIR | No | Directory containing assets such as fonts and local image files. | |
| PDF_MCP_HTTP_PATH | No | HTTP path for the Streamable HTTP MCP endpoint. | /mcp |
| PDF_MCP_TRANSPORT | No | Transport mode for the MCP server. Use stdio for local clients or http for Streamable HTTP remote deployments. | stdio |
| DOTENV_CONFIG_PATH | No | Path to an alternative .env file to load. | |
| PDF_MCP_AUTH_TOKEN | No | Bearer token required by the HTTP transport for authentication. | |
| PDF_MCP_OUTPUT_DIR | No | Default PDF output directory, either relative to the active project or absolute. Equivalent to --output-dir. | |
| PDF_MCP_ALLOWED_DIRS | No | Additional directories allowed as PDF output/input roots. Accepts ; and : as separators on Windows, macOS, and Linux, and supports ~. | |
| PDF_MCP_ALLOWED_HOSTS | No | Comma-separated allowlist of Host header values accepted by the HTTP server. | |
| PDF_MCP_ALLOW_ANY_PATH | No | Set to true to allow any filesystem path in trusted local environments. Equivalent to --allow-any-path. | false |
| PDF_MCP_ALLOWED_ORIGINS | No | Comma-separated allowlist of allowed CORS origins for the HTTP server. | |
| PDF_MCP_ALLOW_REMOTE_IMAGES | No | Set to true to enable remote HTTPS images. By default remote images are disabled. | false |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_pdf_server_infoA | Devuelve la versión del servidor, los workspace roots detectados, la carpeta de salida por defecto, las carpetas permitidas, las fuentes instaladas, los temas disponibles y el flujo recomendado. Llamar una vez al iniciar para saber exactamente dónde se guardarán los PDFs. |
| list_pdf_componentsA | Lista el catálogo de componentes PDF, sus categorías, propiedades requeridas/opcionales, ejemplos y esquema JSON. Consulta esta herramienta antes de construir el AST. |
| validate_pdf_astA | Valida el documento AST sin renderizar. Devuelve errores con path exacto y advertencias para autocorrección del agente. No escribe archivos. |
| generate_pdfB | Genera un PDF profesional a partir de un AST JSON declarativo y lo guarda en disco. Sin outputDir usa la carpeta de salida del workspace; outputDir acepta rutas relativas al workspace (p. ej. "reports/2026") o absolutas dentro de las carpetas permitidas. Devuelve path absoluto, relativePath, páginas, tamaño y warnings. No acepta HTML, CSS, JavaScript ni código ejecutable. |
| list_pdfsA | Lista los PDFs existentes en el workspace, la carpeta de salida y las carpetas permitidas, con ruta absoluta, ruta relativa, tamaño y fecha. Úsala para localizar documentos antes de merge_pdfs o apply_pdf_security en lugar de adivinar rutas. |
| merge_pdfsA | Combina dos o más PDFs existentes en un documento nuevo, manteniendo el orden recibido. Acepta rutas absolutas permitidas o relativas al workspace, a la carpeta de salida o a las carpetas permitidas. Usa list_pdfs si no conoces las rutas. |
| apply_pdf_securityA | Actualiza metadatos y opcionalmente cifra el PDF con AES-256 y restricciones de impresión/copia. Acepta filePath absoluto permitido o relativo al workspace/output, y un outputDir opcional con las mismas reglas que generate_pdf. El cifrado requiere qpdf instalado. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Most tools have clearly distinct purposes across the PDF generation lifecycle: introspection, component discovery, validation, generation, listing, merging, and security/metadata. The only potential confusion is between `list_pdf_components` and `list_pdfs`, but their descriptions clearly separate catalog components from existing PDF files.
All tool names follow a consistent snake_case verb_noun pattern: get_pdf_server_info, list_pdf_components, validate_pdf_ast, generate_pdf, list_pdfs, merge_pdfs, apply_pdf_security. The convention is predictable and readable throughout.
Seven tools is well-scoped for a PDF generation and manipulation server. Each tool earns its place by covering a distinct step or operation, with no obvious filler tools.
The core generation workflow is complete: server info, component catalog, AST validation, and PDF generation, plus listing, merging, and security/metadata updates. Some lifecycle gaps remain, such as deleting PDFs, extracting text/content, splitting, or rotating existing documents, but they are outside the primary generation purpose.