
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
test-doc-ops-mcp
Advanced tools
Document Operations Multi-Channel Platform — A comprehensive platform for document processing, conversion, and automation
Document Operations MCP Server - A universal MCP server for document processing, conversion, and automation. Handle PDF, DOCX, HTML, Markdown, TXT, and more through a unified API and toolset.
# Via npm
npm install -g doc-ops-mcp
# Via pnpm
pnpm add -g doc-ops-mcp
# Via bun
bun add -g doc-ops-mcp
{
"mcpServers": {
"doc-ops-mcp": {
"command": "npx",
"args": ["-y", "doc-ops-mcp@latest"],
"env": {
"OUTPUT_DIR": "/path/to/your/output/directory",
"CACHE_DIR": "/path/to/your/cache/directory"
}
}
}
}
The server supports environment variables for controlling output paths and PDF enhancement features:
OUTPUT_DIR: Controls where all generated files are saved (default: ~/Documents)CACHE_DIR: Directory for temporary and cache files (default: ~/.cache/doc-ops-mcp)WATERMARK_IMAGE: Default watermark image path for PDF files
QR_CODE_IMAGE: Default QR code image path for PDF files
addQrCode=true)Output Path Rules:
outputPath is not provided → files saved to OUTPUT_DIR with auto-generated namesoutputPath is relative → resolved relative to OUTPUT_DIRoutputPath is absolute → used as-is, ignoring OUTPUT_DIRSee OUTPUT_PATH_CONTROL.md for detailed documentation.
Document Operations MCP Server adopts a hybrid architecture design, combining internal processing with external dependencies:
┌─────────────────────────────────────────────────────────────┐
│ MCP Client Layer │
│ (Claude Desktop, Cursor, VS Code, etc.) │
└─────────────────────┬───────────────────────────────────────┘
│ JSON-RPC 2.0
┌─────────────────────┴───────────────────────────────────────┐
│ Doc-Ops-MCP Server │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────┐ │
│ │ Tool Router │ │ Request │ │ Response │ │
│ │ & Handler │ │ Validator │ │ Formatter │ │
│ └────────┬────────┘ └────────┬────────┘ └──────┬──────┘ │
│ │ │ │ │
│ ┌────────┴────────────────────┴──────────────────┴─────┐ │
│ │ Document Processing Engine │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ Document │ │ Format │ │ Style │ │ │
│ │ │ Reader │ │ Converter │ │ Processor │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ │ │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ PDF │ │ Watermark/ │ │ Web │ │ │
│ │ │ Enhancement │ │ QR Code │ │ Scraper │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
└────┴───────────────────────────────────────────────────────┴─┘
│
┌───────────────────────────┴─────────────────────────────────┐
│ Core Dependencies Layer │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ pdf-lib │ │ mammoth │ │ marked │ │
│ │ (PDF Tools) │ │(DOCX Tools) │ │ (Markdown) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
┌───────────────────────────┴─────────────────────────────────┐
│ External Dependencies (PDF Conversion) │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ playwright-mcp │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ Browser │ │ HTML │ │ PDF │ │ │
│ │ │ Automation │ │ Rendering │ │ Generation │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
Internal Processing Layer:
External Dependencies Layer:
playwright-mcp for HTML → PDF conversionImportant Note: All PDF conversion features require playwright-mcp to work properly.
This MCP server's PDF conversion functionality depends on the playwright-mcp server:
convert_docx_to_pdf, convert_markdown_to_pdfplaywright-mcp must use --caps=pdf parameter to provide browser_pdf_save commandplaywright-mcp's browser_pdf_save command to render HTML to PDFWATERMARK_IMAGE is configured)addQrCode=true and QR_CODE_IMAGE is configured)Install playwright-mcp:
# Please refer to playwright-mcp official documentation for installation and configuration
MCP Client Configuration:
Ensure both this server and playwright-mcp are configured in your MCP client
Important: playwright-mcp must use --caps=pdf parameter:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest", "--caps=pdf"]
}
}
}
Environment Variables:
WATERMARK_IMAGE: Watermark image path (optional, automatically added during PDF conversion)QR_CODE_IMAGE: QR code image path (optional, added when requested)When converting documents to PDF, doc-ops-mcp follows this workflow:
playwright-mcp's browser_pdf_save command to convert HTML to PDFprocess_pdf_post_conversion tool to complete path conversion, watermark and QR code addition⚠️ Critical Note: playwright-mcp must be started with --caps=pdf parameter to provide browser_pdf_save command.
When using playwright-mcp to generate PDF, you must follow these steps:
playwright-mcp's browser_pdf_save command to generate PDF (saved in temporary directory)doc-ops-mcp's process_pdf_post_conversion tool:
Example Workflow:
1. playwright-mcp:browser_pdf_save -> Generate temporary PDF: /tmp/playwright-output/file.pdf
2. doc-ops-mcp:process_pdf_post_conversion -> Process and save to: /output/final.pdf
⚠️ Critical Note: After using playwright-mcp to generate PDF, you must immediately call doc-ops-mcp's process_pdf_post_conversion tool to complete final processing.
To ensure AI models correctly execute PDF conversion post-processing, follow these guidelines:
playwright-mcp:browser_pdf_save to generate PDFdoc-ops-mcp:process_pdf_post_conversion to complete post-processingprocess_pdf_post_conversion tool description clearly states "⚠️ Important: This is a necessary follow-up step for playwright-mcp's browser_pdf_save command!"When users request PDF conversion, use this approach:
User request: Convert Markdown to PDF
Execution steps:
1. Use convert_markdown_to_html to generate HTML
2. Use playwright-mcp:browser_pdf_save to generate PDF
3. Use process_pdf_post_conversion to complete final processing
playwright-mcp:browser_pdf_save and process_pdf_post_conversion as an atomic operationScenario: User requests converting document.md to PDF
// Step 1: Convert Markdown to HTML
{
"tool": "doc-ops-mcp:convert_markdown_to_html",
"params": {
"markdownPath": "/path/to/document.md",
"theme": "github"
}
}
// Result: Generate /output/document.html
// Step 2: Use playwright-mcp to generate PDF
{
"tool": "playwright-mcp:browser_pdf_save",
"params": {
"url": "file:///output/document.html",
"path": "/tmp/playwright-output/document.pdf"
}
}
// Result: Generate temporary PDF /tmp/playwright-output/document.pdf
// Step 3: Immediately call post-processing tool (Required!)
{
"tool": "doc-ops-mcp:process_pdf_post_conversion",
"params": {
"playwrightPdfPath": "/tmp/playwright-output/document.pdf",
"targetPath": "document.pdf",
"addWatermark": true,
"addQrCode": true
}
}
// Result: Final PDF saved to /output/document.pdf with watermark and QR code
Key Points:
playwrightPdfPath must be the exact path generated in Step 2When performing PDF conversion, this server will:
playwright-mcp tools for HTML → PDF conversionprocess_pdf_post_conversion to post-process the generated PDF (path movement, watermark, QR code)| Tool Name | Description | Input Parameters | External Dependencies |
|---|---|---|---|
read_document | Read document content | filePath: Document pathextractMetadata: Extract metadatapreserveFormatting: Preserve formatting | None |
write_document | Write document content | content: Document contentoutputPath: Output file pathencoding: File encoding | None |
convert_document | Smart document conversion | inputPath: Input file pathoutputPath: Output file pathpreserveFormatting: Preserve formattinguseInternalPlaywright: Use built-in Playwright | Depends on conversion type |
Read various document formats including PDF, DOCX, DOC, TXT, HTML, MD, and more.
Parameters:
filePath (string, required) - Document path to readextractMetadata (boolean, optional) - Extract document metadata, defaults to falsepreserveFormatting (boolean, optional) - Preserve formatting (HTML output), defaults to falseWrite content to document files in specified formats.
Parameters:
content (string, required) - Content to writeoutputPath (string, optional) - Output file path (auto-generated if not provided)encoding (string, optional) - File encoding, defaults to utf-8Convert documents between formats with enhanced style preservation.
Parameters:
inputPath (string, required) - Input file pathoutputPath (string, optional) - Output file path (auto-generated if not provided)preserveFormatting (boolean, optional) - Preserve formatting, defaults to trueuseInternalPlaywright (boolean, optional) - Use built-in Playwright for PDF conversion, defaults to falseConvert DOCX to PDF with automatic watermark addition (if configured).
Parameters:
docxPath (string, required) - DOCX file pathoutputPath (string, optional) - Output PDF path (auto-generated if not provided)addQrCode (boolean, optional) - Whether to add QR code, defaults to falseExternal Dependency: Requires playwright-mcp for PDF conversion
Convert Markdown to PDF with automatic watermark addition (if configured).
Parameters:
markdownPath (string, required) - Markdown file pathoutputPath (string, optional) - Output PDF path (auto-generated if not provided)theme (string, optional) - Theme style, defaults to "github"includeTableOfContents (boolean, optional) - Include table of contents, defaults to falseaddQrCode (boolean, optional) - Whether to add QR code, defaults to falseExternal Dependency: Requires playwright-mcp for PDF conversion
Convert Markdown to HTML.
Parameters:
markdownPath (string, required) - Markdown file pathoutputPath (string, optional) - Output HTML path (auto-generated if not provided)theme (string, optional) - Theme style, defaults to "github"includeTableOfContents (boolean, optional) - Include table of contents, defaults to falseConvert Markdown to DOCX.
Parameters:
markdownPath (string, required) - Markdown file pathoutputPath (string, optional) - Output DOCX path (auto-generated if not provided)Convert HTML to Markdown.
Parameters:
htmlPath (string, required) - HTML file pathoutputPath (string, optional) - Output Markdown path (auto-generated if not provided)Generate conversion plan by analyzing input file and providing conversion suggestions.
Parameters:
inputPath (string, required) - Input file pathoutputPath (string, optional) - Output file path🔧 PDF post-processing unified tool - ⚠️ Important: This is a necessary follow-up step for playwright-mcp's browser_pdf_save command! When using playwright-mcp to generate PDF, you must immediately call this tool to complete final processing. Features include: 1) Automatically move PDF from playwright temporary path to target location 2) Unified watermark and QR code addition 3) Clean up temporary files. Workflow: playwright-mcp:browser_pdf_save → doc-ops-mcp:process_pdf_post_conversion
Parameters:
playwrightPdfPath (string, required) - PDF file path generated by playwright-mcp (usually in temporary directory)targetPath (string, optional) - Target PDF file path (auto-generated if not provided). If not absolute path, will be resolved relative to OUTPUT_DIR environment variableaddWatermark (boolean, optional) - Whether to add watermark (automatically added if WATERMARK_IMAGE environment variable is set), defaults to falseaddQrCode (boolean, optional) - Whether to add QR code (automatically added if QR_CODE_IMAGE environment variable is set), defaults to falsewatermarkImage (string, optional) - Watermark image path (overrides environment variable)watermarkText (string, optional) - Watermark text contentwatermarkImageScale (number, optional) - Watermark image scale ratio, defaults to 0.25watermarkImageOpacity (number, optional) - Watermark image opacity, defaults to 0.6watermarkImagePosition (string, optional) - Watermark image position, options: ["top-left", "top-right", "bottom-left", "bottom-right", "center"], defaults to "top-right"qrCodePath (string, optional) - QR code image path (overrides environment variable)qrScale (number, optional) - QR code scale ratio, defaults to 0.15qrOpacity (number, optional) - QR code opacity, defaults to 1.0qrPosition (string, optional) - QR code position, options: ["top-left", "top-right", "top-center", "bottom-left", "bottom-right", "bottom-center", "center"], defaults to "bottom-center"customText (string, optional) - Custom text below QR code, defaults to "Scan QR code for more information"External Dependency: Works with playwright-mcp generated PDF files
🖼️ Web screenshot tool - Capture webpage or HTML content screenshot using Playwright Chromium.
Parameters:
urlOrHtml (string, required) - Webpage URL or HTML contentoutputPath (string, required) - Screenshot output pathoptions (object, optional) - Screenshot options:
width (number) - Screenshot widthheight (number) - Screenshot heightformat (string) - Image format, options: ["png", "jpeg"]quality (number) - JPEG quality (1-100)fullPage (boolean) - Whether to capture the full page📋 Document preview screenshot - Convert DOCX and similar documents to preview screenshot.
Parameters:
documentPath (string, required) - Document file pathoutputPath (string, required) - Screenshot output pathoptions (object, optional) - Screenshot options:
width (number) - Screenshot widthheight (number) - Screenshot heightfullPage (boolean) - Whether to capture the full page🕷️ Web content scraping - Use Playwright Chromium to scrape webpage content.
Parameters:
url (string, required) - Webpage URL to scrapeoptions (object, optional) - Scraping options:
waitForSelector (string) - CSS selector to wait fortimeout (number) - Timeout in millisecondstextOnly (boolean) - Extract only plain text📊 Structured data scraping - Scrape structured data from webpages using a CSS selector.
Parameters:
url (string, required) - Webpage URL to scrapeselector (string, required) - CSS selectoroptions (object, optional) - Scraping options:
timeout (number) - Timeout in milliseconds| From\To | DOCX | HTML | Markdown | TXT | |
|---|---|---|---|---|---|
| ✅ | ❌ | ❌ | ❌ | ❌ | |
| DOCX | ✅ | ✅ | ✅ | ✅ | ✅ |
| HTML | ✅ | ❌ | ✅ | ✅ | ✅ |
| Markdown | ✅ | ✅ | ✅ | ✅ | ✅ |
| TXT | ✅ | ❌ | ✅ | ✅ | ✅ |
Convert /Users/docs/report.pdf to DOCX
Merge file1.pdf and file2.pdf into combined.pdf
Convert https://example.com to PDF
Extract tables from /Users/data/report.xlsx
| Document Type | Max File Size | Processing Speed | Memory Usage |
|---|---|---|---|
| 500MB | 2-5MB/s | ~File size×1.5 | |
| DOCX | 200MB | 5-10MB/s | ~File size×2 |
| HTML | 100MB | 10-20MB/s | ~File size×1.2 |
| Markdown | 50MB | 15-30MB/s | ~File size×1.1 |
| TXT | 1GB | 50-100MB/s | ~File size×1.05 |
| Library | Version | License | Purpose |
|---|---|---|---|
| pdf-lib | ^1.17.1 | MIT | PDF document manipulation |
| mammoth | ^1.6.0 | BSD-2-Clause | DOCX parsing and conversion |
| marked | ^9.1.6 | MIT | Markdown parsing and rendering |
| playwright | ^1.40.0 | Apache-2.0 | Browser automation (optional) |
| exceljs | ^4.4.0 | MIT | Excel file processing |
| jsdom | ^23.0.1 | MIT | HTML DOM manipulation |
| turndown | ^7.1.2 | MIT | HTML to Markdown conversion |
# Only Node.js required
npm install -g doc-ops-mcp
# Pull the latest image
docker pull docops/doc-ops-mcp:latest
# Run with default configuration
docker run -d \
--name doc-ops-mcp \
-p 3000:3000 \
docops/doc-ops-mcp:latest
# Clone the repository
git clone https://github.com/JefferyMunoz/doc-ops-mcp.git
cd doc-ops-mcp
# Build the Docker image
docker build -t doc-ops-mcp .
# Run the container
docker run -d \
--name doc-ops-mcp \
-p 3000:3000 \
-v $(pwd)/documents:/app/documents \
doc-ops-mcp
Create a docker-compose.yml file:
version: '3.8'
services:
doc-ops-mcp:
image: docops/doc-ops-mcp:latest
container_name: doc-ops-mcp
ports:
- "3000:3000"
volumes:
- ./documents:/app/documents
- ./config:/app/config
environment:
- NODE_ENV=production
- PORT=3000
restart: unless-stopped
# Optional: Add Nginx for reverse proxy
nginx:
image: nginx:alpine
container_name: doc-ops-nginx
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- doc-ops-mcp
restart: unless-stopped
| Variable | Description | Default |
|---|---|---|
PORT | Server port | 3000 |
NODE_ENV | Environment mode | production |
LOG_LEVEL | Logging level | info |
MAX_FILE_SIZE | Maximum file size (MB) | 50 |
Mount local directories for persistent storage:
# Documents directory for file processing
docker run -d \
--name doc-ops-mcp \
-p 3000:3000 \
-v $(pwd)/documents:/app/documents \
-v $(pwd)/output:/app/output \
doc-ops-mcp
# Production setup with Docker Swarm
docker swarm init
docker stack deploy -c docker-compose.yml doc-ops
# Scale the service
docker service scale doc-ops_mcp=3
The container includes built-in health checks:
# Check container health
docker ps
# View health check logs
docker inspect --format='{{.State.Health.Status}}' doc-ops-mcp
# Manual health check
docker exec doc-ops-mcp curl -f http://localhost:3000/health || exit 1
# Run with debug logging
docker run -d \
--name doc-ops-mcp \
-p 3000:3000 \
-e LOG_LEVEL=debug \
doc-ops-mcp
# View logs
docker logs -f doc-ops-mcp
# Clone the repository
git clone https://github.com/your-org/doc-ops-mcp.git
cd doc-ops-mcp
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build the project
npm run build
# Run tests
npm test
src/
├── index.ts # MCP server entry point
├── tools/ # Tool implementations
│ ├── documentConverter.ts
│ ├── pdfTools.ts
│ └── ...
├── types/ # Type definitions
└── utils/ # Utility functions
src/tools/src/index.tsnode --max-old-space-size=4096playwright-mcp is properly configuredOUTPUT_DIR configuration# Run with debug logging
docker run -d \
--name doc-ops-mcp \
-p 3000:3000 \
-e LOG_LEVEL=debug \
doc-ops-mcp
# View logs
docker logs -f doc-ops-mcp
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Document Operations Multi-Channel Platform — A comprehensive platform for document processing, conversion, and automation
The npm package test-doc-ops-mcp receives a total of 0 weekly downloads. As such, test-doc-ops-mcp popularity was classified as not popular.
We found that test-doc-ops-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.