Document Image Extractor
БесплатноНе проверенA Model Context Protocol (MCP) server that provides tools for extracting images from PDF and Word documents.
Описание
A Model Context Protocol (MCP) server that provides tools for extracting images from PDF and Word documents.
README
A Model Context Protocol (MCP) server that provides tools for extracting images from PDF and Word documents. This server exposes document image extraction capabilities to AI assistants and other MCP clients.
Features
- PDF Image Extraction: Extract embedded images from PDF files with size filtering
- Word Document Processing: Extract images from .docx files
- Document Analysis: Get metadata and image counts without extraction
- Format Validation: Check document compatibility before processing
- Flexible Output: Configurable output directories and file naming
- ZIP Archive Creation: Automatically create ZIP files containing original document and extracted images
Available Tools
extract_document_images
Extract all images from a PDF or Word document, save them as separate files, and create a ZIP archive containing both the original document and extracted images.
Parameters:
document_path(required): Path to the document file (.pdf or .docx)output_dir(optional): Directory to save extracted imagesmin_image_size(optional): Minimum image dimension for PDF extraction (default: 10)
Returns: List of extracted image files with paths, metadata, and ZIP archive location
get_document_info
Get information about a document without extracting images.
Parameters:
document_path(required): Path to the document file
Returns: Document metadata including page count, file size, and image count
validate_document
Check if a document file is valid and supported for image extraction.
Parameters:
document_path(required): Path to the document file
Returns: Validation status and file information
list_supported_formats
List all supported document formats for image extraction.
Returns: Information about supported file types and their capabilities
Installation
- Clone this repository:
git clone <repository-url>
cd document-image-extractor-mcp
- Install dependencies using uv:
uv sync
Configuration
Claude Desktop
Add the server to your Claude Desktop configuration:
MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"document-image-extractor": {
"command": "uv",
"args": [
"--directory",
"/mnt/b/Users/cjdua/Github/document-image-extractor-mcp",
"run",
"document-image-extractor-mcp"
]
}
}
}
Replace the path with the actual location of this directory on your system.
Usage
Running the Server
The MCP server communicates over stdio. You can run it directly:
uv run document-image-extractor-mcp
Example Usage
Once connected to an MCP client, you can use the tools like this:
Extract images from a PDF:
{
"tool": "extract_document_images",
"arguments": {
"document_path": "/path/to/document.pdf",
"output_dir": "/path/to/output",
"min_image_size": 50
}
}
Get document information:
{
"tool": "get_document_info",
"arguments": {
"document_path": "/path/to/document.docx"
}
}
Validate a document:
{
"tool": "validate_document",
"arguments": {
"document_path": "/path/to/document.pdf"
}
}
Supported Formats
- PDF (.pdf): Extracts raster images embedded in pages
- Word Documents (.docx): Extracts images from the document's media archive
Dependencies
mcp>=1.11.0: Model Context Protocol frameworkPyMuPDF>=1.23.0: PDF processing libraryPillow>=9.0.0: Image processing library
Development
Building and Publishing
To prepare the package for distribution:
- Sync dependencies and update lockfile:
uv sync
- Build package distributions:
uv build
- Publish to PyPI:
uv publish
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, use the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /mnt/b/Users/cjdua/Github/document-image-extractor-mcp run document-image-extractor-mcp
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
License
This project is part of the Leet_Vibe repository and follows the same licensing terms.
Related Projects
This MCP server is based on the document-image-extractor package, which provides the core extraction functionality in a standalone Python package format.
Установка Document Image Extractor
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/hublun/document-image-extractor-mcpFAQ
Document Image Extractor MCP бесплатный?
Да, Document Image Extractor MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Document Image Extractor?
Нет, Document Image Extractor работает без API-ключей и переменных окружения.
Document Image Extractor — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Document Image Extractor в Claude Desktop, Claude Code или Cursor?
Открой Document Image Extractor на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Omni Video
An MCP server that transforms LLM-enabled IDEs into professional video editors by pre-processing footage into text proxies, generating motion graphics via HTML/
автор: buildwithtazaARA
Generate images, video and audio from any AI agent — one connector.
автор: ARAYouTube
Transcripts, channel stats, search
автор: YouTubeEverArt
AI image generation using various models.
автор: modelcontextprotocolCompare Document Image Extractor with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории media
