A Model Context Protocol (MCP) server for text extraction using the extractous library.
- Extract text from various file formats (PDF, DOCX, HTML, images with OCR, audio/video with speech-to-text)
- Get file metadata along with extracted text
- Support for MIME type override
- List supported file formats
# Install dependencies
uv pip install -e .
# Or using pip
pip install extractous-mcp# Run the server
extractous-mcp
# Or run directly
python -m extractous_mcp.server-
extract_text
- Extract text from a file
- Parameters:
file_path(required),mime_type(optional)
-
extract_text_with_metadata
- Extract text and metadata from a file
- Parameters:
file_path(required),mime_type(optional)
-
get_supported_formats
- Get list of supported file formats
- No parameters
# Extract text from PDF
extract_text("/path/to/document.pdf")
# Extract with specific MIME type
extract_text("/path/to/file", mime_type="application/pdf")
# Get text with metadata
extract_text_with_metadata("/path/to/document.docx")
# Check supported formats
get_supported_formats()- Documents: PDF, DOC, DOCX, RTF, ODT
- Spreadsheets: XLS, XLSX, ODS, CSV
- Presentations: PPT, PPTX, ODP
- Web: HTML, HTM, XML
- Text: TXT, MD, JSON, YAML, YML
- Images: JPG, JPEG, PNG, TIFF, BMP, GIF (with OCR)
- Audio: MP3, WAV, FLAC, M4A, OGG (speech-to-text)
- Video: MP4, AVI, MOV, MKV, WEBM
# Install in development mode
uv pip install -e .
# Run tests
python -m pytest tests/