Package Exports
- @jojihatzz/lemmedoc
- @jojihatzz/lemmedoc/dist/lemmedoc.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jojihatzz/lemmedoc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
LemmeDoc

A comprehensive Model Context Protocol (MCP) server for advanced document processing, PDF manipulation, format conversion, text analysis, and document comparison. Built with powerful libraries for high-performance document handling and featuring robust error handling.
🚀 Features
Core PDF Operations
- PDF Merging: Combine multiple PDFs into one file
- PDF Splitting: Split PDF into separate pages or page ranges
- PDF Compression: Reduce PDF file size while maintaining quality
- PDF Rotation: Rotate pages in PDF documents by 90°, 180°, or 270°
- Watermarking: Add text or image watermarks with position and opacity control
Advanced Features
- Text Extraction: Extract text content from PDF files with formatting options
- Image Extraction: Extract all images from PDF documents
- Metadata Extraction: Get PDF properties, author, creation date, and more
- PDF Comparison: Compare two PDFs and highlight differences (text/visual modes)
- Text Search: Search for text patterns across multiple PDFs with regex support
- Document Statistics: Generate detailed document statistics (words, characters, fonts, metadata)
- Format Conversion: Convert between PDF, Word, Excel, PowerPoint, HTML, and Markdown formats
- PDF to Images: Convert PDF pages to PNG/JPG images with customizable DPI
- Images to PDF: Combine multiple images into a PDF with auto-scaling
- Document Analysis: Extract comprehensive document information and metadata
File Management
- Batch Processing: Process up to 20 documents simultaneously
- Smart Output Naming: Automatically handles filename conflicts
- Robust Error Handling: Comprehensive validation and user-friendly error messages
Installation
Global Installation
npm install -g @jojihatzz/lemmedoc
MCP Client Configuration
To use LemmeDoc as an MCP server, add it to your MCP client configuration:
Claude Desktop App
Add this to your claude_desktop_config.json
:
{
"mcpServers": {
"lemmedoc": {
"command": "npx",
"args": [
"-y",
"@jojihatzz/lemmedoc"
]
}
}
}
VS Code with MCP Extension
Add this to your .vscode/mcp.json
:
{
"servers": {
"lemmedoc": {
"command": "npx",
"args": ["-y", "@jojihatzz/lemmedoc"]
}
}
}
Other MCP Clients
For other MCP clients, use:
- Command:
npx
- Args:
["-y", "@jojihatzz/lemmedoc"]
Usage
The server provides a comprehensive set of document processing and PDF manipulation tools:
Available Tools
Category | Tool | Description |
---|---|---|
PDF Operations | pdf_merge |
Combine multiple PDFs into one file |
pdf_split |
Split PDF into separate pages or page ranges | |
pdf_compress |
Reduce PDF file size while maintaining quality | |
pdf_rotate |
Rotate pages in PDF documents by 90°, 180°, or 270° | |
add_watermark |
Add text or image watermarks to PDF documents | |
Text & Analysis | extract_text |
Extract text content from PDF files with formatting options |
extract_metadata |
Get PDF properties, author, creation date, and more | |
pdf_search |
Search for text patterns across multiple PDFs with regex support | |
pdf_statistics |
Generate detailed document statistics (words, characters, fonts, metadata) | |
pdf_compare |
Compare two PDFs and highlight differences (text/visual modes) | |
Document Conversion | word_to_pdf |
Convert DOCX/DOC files to PDF format |
excel_to_pdf |
Convert spreadsheets to PDF with proper formatting | |
powerpoint_to_pdf |
Convert presentations to PDF documents | |
pdf_to_word |
Extract PDF content to editable Word format | |
pdf_to_excel |
Convert PDF tables to spreadsheets | |
markdown_to_pdf |
Convert Markdown files to styled PDF | |
html_to_pdf |
Convert HTML content to PDF with custom styling | |
Image Processing | extract_images |
Extract all images from PDF documents |
pdf_to_images |
Convert PDF pages to PNG/JPG images with customizable DPI | |
images_to_pdf |
Combine multiple images into a PDF with auto-scaling |
🛠️ Tool Details
PDF Operations (pdf_merge
, pdf_split
, pdf_compress
, pdf_rotate
)
- Supports all major PDF operations with batch processing
- Batch processing up to 20 files
- Custom output naming
- Special compression algorithms maintaining quality
Document Conversion (word_to_pdf
, excel_to_pdf
, powerpoint_to_pdf
)
- Convert Office documents to PDF format
- Output formats: High-quality PDF with preserved formatting
- Quality control for document conversion
- Batch processing up to 20 files
- Handles corrupted file detection
PDF Processing
- Merge (
pdf_merge
): Combine multiple PDFs with precise control - Split (
pdf_split
): Split by pages or ranges with custom options - Compress (
pdf_compress
): Intelligent compression (1-10 levels) - Rotate (
pdf_rotate
): 90°, 180°, 270° rotation angles
Advanced Features
- Text Extraction (
extract_text
): Comprehensive text extraction with formatting - PDF Comparison (
pdf_compare
): Line-by-line difference detection with visual/text modes - Document Search (
pdf_search
): Regex pattern matching across documents- Case-sensitive/insensitive options
- Pattern matching with full regex support
- JSON/text output formats
- Multi-document search capabilities
- Document Statistics (
pdf_statistics
): Comprehensive document analysis- Character, word, and sentence counts
- Font analysis and metadata extraction
- Image statistics and document properties
- Custom output formatting
- Metadata Extraction (
extract_metadata
): Extract comprehensive document metadata
Image Processing (pdf_to_images
, images_to_pdf
)
- Convert PDF pages to high-quality images with custom DPI
- Custom styling options:
- DPI control (72-600 pixels)
- Format selection (PNG, JPG)
- Custom output directories
- Batch conversion support
- PNG/JPG output formats
- Custom output directory support
Document Analysis (pdf_compare
, pdf_search
, pdf_statistics
)
- Advanced document comparison with difference highlighting
- Configurable comparison modes (text/visual/both)
- Multi-document search with pattern matching
- File processing and analysis
- Detailed JSON report generation
- Comprehensive statistical analysis
File Management
- Batch Processing: Pattern-based document processing
- Process up to 20 files simultaneously
- File filtering by extension
- Smart conflict resolution
- Automatic output naming
🔧 Safety & Validation
- Input Validation: Comprehensive parameter checking and type validation
- File Safety: File existence, size limits (100MB), and format verification
- Batch Limits: Maximum 20 files per operation to prevent memory issues
- Error Handling: User-friendly error messages with clear troubleshooting guidance
- Path Support: Works with absolute and relative file paths
- Conflict Resolution: Auto-appends numbers for duplicate filenames
Requirements
- Node.js 16 or higher
- Supported platforms: Windows, macOS, Linux
📄 License
MIT License - see LICENSE file for details.