chfle/word-to-pdf-mcp
word-to-pdf-mcp is a secure, production-ready remote MCP server that converts .docx files to PDF using LibreOffice as a persistent unoserver daemon.
Platform-specific configuration:
{
"mcpServers": {
"word-to-pdf-mcp": {
"command": "npx",
"args": [
"-y",
"word-to-pdf-mcp"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
Remote MCP server that converts .docx to PDF. Works with any MCP client — Claude (web & CLI), Cursor, Windsurf, or anything that speaks the Model Context Protocol.
Runs as a Docker container with LibreOffice as a persistent daemon (unoserver). First conversion triggers a warmup; subsequent conversions take ~0.3s.
cp .env.example .env
touch credentials.json
docker compose up -d --build
docker compose exec mcp-pdf python manage_keys.py add yournameRequires an external Docker network (docker network create caddy_net) and a reverse proxy for TLS (see Reverse proxy).
docker compose exec mcp-pdf python manage_keys.py add <name>
docker compose exec mcp-pdf python manage_keys.py list
docker compose exec mcp-pdf python manage_keys.py revoke <client_id>No restart needed — changes take effect immediately.
Add a remote MCP server in Claude's settings with your server URL:
https://your-domain.com/Claude will handle OAuth automatically. When the authorize page opens, paste your API key (sk_... from manage_keys.py add).
Add to ~/.claude/claude_code_config.json:
{
"mcpServers": {
"pdf-tools": {
"type": "sse",
"url": "https://your-domain.com/sse",
"headers": {
"Authorization": "Bearer <your_sk_key>"
}
}
}
}Use the SSE transport config:
{
"mcpServers": {
"pdf-tools": {
"type": "sse",
"url": "https://your-domain.com/sse",
"headers": {
"Authorization": "Bearer <your_sk_key>"
}
}
}
}If your client supports Streamable HTTP, use the root URL (https://your-domain.com/) instead.
convert_docx_to_pdfInput: base64-encoded .docx file
Output:
{
"success": true,
"download_urLoading reviews...