- Home
- MCP servers
- Document Operations
Document Operations
- typescript
138
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"tele-ai-doc-ops-mcp": {
"command": "npx",
"args": [
"-y",
"doc-ops-mcp"
],
"env": {
"CACHE_DIR": "/path/to/your/cache/directory",
"OUTPUT_DIR": "/path/to/your/output/directory",
"QR_CODE_IMAGE": "/path/to/qrcode.png",
"WATERMARK_IMAGE": "/path/to/watermark.png"
}
}
}
}You can use the Document Operations MCP Server to process, convert, and enhance documents across formats like PDF, DOCX, HTML, and Markdown through a unified MCP interface. This server gives you flexible format conversion, content rewriting, and PDF enhancements such as watermarks and QR codes, all accessible from your MCP client.
How to use
To start using the Document Operations MCP Server, add it to your MCP client as a stdio-based server so you can run it locally and connect via the MCP system. You configure the server with its command and environment variables, then issue document operations from your MCP client using the shared toolset.
The standard configuration lets you run the MCP server using a single command and share its output and cache directories. You can also set default assets like a watermark image or a QR code image that the server will use when you perform PDF enhancements.
{
"mcpServers": {
"doc-ops-mcp": {
"command": "npx",
"args": ["-y", "doc-ops-mcp"],
"env": {
"OUTPUT_DIR": "/path/to/your/output/directory",
"CACHE_DIR": "/path/to/your/cache/directory",
"WATERMARK_IMAGE": "/path/to/watermark.png",
"QR_CODE_IMAGE": "/path/to/qrcode.png"
}
}
}
}
How to run and test basic operations
Once the server is configured, you can perform common document tasks through your MCP client using the provided tool APIs. Start with a simple format conversion, then try rewriting content, and finally apply PDF enhancements like adding a watermark or a QR code.
Common operation paths include converting documents between formats, rewriting content to adjust terminology or headings, and enhancing PDFs with watermarks or QR codes. The server maintains output files in your configured OUTPUT_DIR unless you specify a different output path.
Supported operations at a glance
Format conversion paths include direct and multi-step conversions between PDF, DOCX, HTML, and Markdown. Rewriting features support content replacement, format adjustments, and smart rewriting to preserve structure.
PDF enhancement features provide a default watermark and optional QR code embedding when explicitly requested. These enhancements apply automatically to conversions where configured.
Example workflows
Convert /Users/docs/report.docx to PDF
Convert /Users/docs/article.md to HTML
Convert /Users/docs/presentation.html to DOCX
Convert /Users/docs/readme.md to PDF (with theme styling)
Environment and output behavior
You control where generated files are saved using OUTPUT_DIR. If you provide an outputPath, it can be relative to OUTPUT_DIR or absolute. If you don’t provide an outputPath, files land in OUTPUT_DIR with auto-generated names.
If you set WATERMARK_IMAGE, that image is applied as a watermark to PDFs by default. If you set QR_CODE_IMAGE, QR codes can be added to PDFs when you request them in a conversion or post-conversion step.
Available tools
read_document
Read document content from various formats (PDF, DOCX, HTML, MD, etc.) with options to extract metadata and preserve formatting when generating outputs.
write_document
Write document content to files in a specified format and path with configurable encoding.
convert_document
Smart document conversion between formats with optional style preservation and internal Playwright usage for PDF generation.
plan_conversion
Analyze source and target formats, preserve styles, include images, set a theme, and determine an optimal conversion path.
convert_docx_to_pdf
Convert DOCX to PDF with optional watermark and QR code embedding, preserving formatting.
convert_markdown_to_pdf
Convert Markdown to PDF with optional theme, table of contents, and QR code inclusion.
convert_markdown_to_html
Convert Markdown to HTML with theme styling and optional table of contents.
convert_markdown_to_docx
Convert Markdown to DOCX with automatic formatting preservation.
convert_html_to_markdown
Convert HTML to Markdown while preserving structure.
process_pdf_post_conversion
Handle post-conversion enhancements like applying watermarks and adding QR codes after PDF generation.
add_watermark
Add image or text watermarks to PDF files with control over position, opacity, and scale.
add_qrcode
Add a QR code to PDF documents with configurable size, position, and optional text.