๐ MarkItDown MCP Server
A powerful Model Context Protocol (MCP) server that converts 29+ file formats to clean, structured Markdown using Microsoft's MarkItDown library.
[!IMPORTANT] This is not Microsoft's official
markitdown-mcppackage. This is an independent community project published on PyPI astrsdn-markitdown-mcp. It uses Microsoft'smarkitdownlibrary as a dependency, but it is developed and maintained separately frommarkitdown-mcpby Microsoft.
- PyPI distribution name:
trsdn-markitdown-mcp- Python import name:
markitdown_mcp- CLI command:
markitdown-mcp(alias:trsdn-markitdown-mcp)
๐ฅ Perfect for Claude Desktop, MCP clients, and AI workflows!
โจ Features
- ๐ MCP Protocol: Seamless integration with Claude Desktop and MCP clients
- ๐ 29+ File Formats: PDFs, Office docs, images, audio, archives, and more
- ๐ Image Metadata: Extract EXIF metadata from images (JPG, PNG, GIF, etc.)
- ๐ต Speech Recognition: Convert audio to text with speech transcription (MP3, WAV)*
*Requires markitdown[all] installation for full functionality
๐ฆ Dependency Requirements by File Type
| File Type | Required Dependencies | Install Command |
|---|---|---|
pypdf, pymupdf, pdfplumber |
pipx inject trsdn-markitdown-mcp 'markitdown[all]' |
|
| Excel (.xlsx, .xls) | openpyxl, xlrd, pandas |
pipx inject trsdn-markitdown-mcp openpyxl xlrd pandas |
| PowerPoint (.pptx) | python-pptx |
Included in base install |
| Images | PIL, exiftool (optional) |
Included in base install |
| Audio | pydub, speech_recognition |
pipx inject trsdn-markitdown-mcp 'markitdown[all]' |
| Basic formats | None | Base install only |
Note: For the best experience, we recommend installing all dependencies using the Complete Install method below.
- ๐ Office Documents: Word, PowerPoint, Excel files
- ๐ Web Content: HTML, XML, JSON, CSV
- ๐ E-books & Archives: EPUB, ZIP files
- โก Fast & Reliable: Built on Microsoft's MarkItDown library
๐ Quick Start for Claude Desktop
-
Install the server with ALL features:
# One command to install everything pipx install trsdn-markitdown-mcp && \ pipx inject trsdn-markitdown-mcp 'markitdown[all]' openpyxl xlrd pandas pymupdf pdfplumber
-
Add to your Claude Desktop config:
{ "mcpServers": { "markitdown": { "command": "markitdown-mcp", "args": [] } } }
-
Restart Claude Desktop and start converting files!
Features
- Convert multiple file formats to Markdown
- Batch processing of entire directories
- Preserves directory structure in output
- Environment variable support via .env file
๐ Available MCP Tools
๐ง convert_file
Convert a single file to Markdown.
{
"name": "convert_file",
"arguments": {
"file_path": "/path/to/document.pdf"
}
}
๐ list_supported_formats
Get a complete list of supported file formats.
{
"name": "list_supported_formats",
"arguments": {}
}
๐ convert_directory
Convert all supported files in a directory.
{
"name": "convert_directory",
"arguments": {
"input_directory": "/path/to/files",
"output_directory": "/path/to/markdown"
}
}
๐ Supported File Formats (29+)
| Category | Extensions | Features |
|---|---|---|
| ๐ Office | .pdf, .docx, .pptx, .xlsx, .xls |
Full document structure |
| ๐ผ๏ธ Images | .jpg, .png, .gif, .bmp, .tiff, .webp |
EXIF metadata extraction |
| ๐ต Audio | .mp3, .wav |
Speech-to-text transcription |
| ๐ Web | .html, .htm, .xml, .json, .csv |
Clean formatting |
| ๐ Books | .epub |
Chapter extraction |
| ๐ฆ Archives | .zip |
Auto-extract and process |
| ๐ Text | .txt, .md, .rst |
Direct conversion |
Installation
Published on PyPI as
trsdn-markitdown-mcpโ not to be confused with Microsoft'smarkitdown-mcp.
Option 1: Install from PyPI (Recommended)
# Isolated install with pipx
pipx install trsdn-markitdown-mcp
# Or with pip
pip install trsdn-markitdown-mcp
# Or run without installing (uv)
uvx trsdn-markitdown-mcp
Option 2: Install from source (development)
git clone https://github.com/trsdn/markitdown-mcp.git
cd markitdown-mcp
pip install -e ".[all]"
Option 3: Direct usage from a checkout
cd markitdown-mcp
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
Quick Start
MCP Server Mode (Recommended)
After installation:
# Start the MCP server (for use with MCP clients)
markitdown-mcp
# Equivalent alternatives
trsdn-markitdown-mcp
python -m markitdown_mcp
๐ ๏ธ Installation Options
๐ One-Command Install (Recommended)
Install with ALL dependencies in one command:
# Using pipx (recommended)
pipx install trsdn-markitdown-mcp && \
pipx inject trsdn-markitdown-mcp 'markitdown[all]' openpyxl xlrd pandas pymupdf pdfplumber pytesseract pydub speechrecognition
# Or download and run the install script
curl -sSL https://raw.githubusercontent.com/trsdn/markitdown-mcp/main/scripts/install-all-deps.sh | bash
Quick Install (Basic Features Only)
pip install trsdn-markitdown-mcp
Complete Install with All Dependencies (Step by Step)
To ensure all file formats are supported, use one of these methods:
Method 1: Using pipx (Recommended)
# Install the MCP server
pipx install trsdn-markitdown-mcp
# Install all required dependencies for full functionality
pipx inject trsdn-markitdown-mcp 'markitdown[all]' # PDF, OCR, Speech
pipx inject trsdn-markitdown-mcp openpyxl xlrd pandas # Excel support
pipx inject trsdn-markitdown-mcp pymupdf pdfplumber # Advanced PDF
Method 2: Using pip with virtual environment
# Create and activate virtual environment
python -m venv markitdown-env
source markitdown-env/bin/activate # On Windows: markitdown-env\Scripts\activate
# Install with all dependencies in one command
git clone https://github.com/trsdn/markitdown-mcp.git
cd markitdown-mcp
pip install -e ".[all]" # This installs everything!
Method 3: For Claude Desktop with existing installation
If you already have the MCP server installed but some formats aren't working:
# Find your installation
which markitdown-mcp # Shows path like /Users/you/.local/bin/markitdown-mcp
# Inject missing dependencies
pipx inject trsdn-markitdown-mcp 'markitdown[all]' openpyxl xlrd pandas pymupdf pdfplumber
Verify Installation
After installation, verify the server responds to MCP requests:
# Ask the server for its tool list over stdio (JSON-RPC)
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | markitdown-mcp
# For pipx installations, check injected packages
pipx list --include-injected
๐ง Claude Desktop Configuration
Add this to your Claude Desktop claude_desktop_config.json:
{
"mcpServers": {
"markitdown": {
"command": "markitdown-mcp",
"args": []
}
}
}
Prefer running it without a permanent install? Use uvx (the package name is
trsdn-markitdown-mcp, the command is markitdown-mcp):
{
"mcpServers": {
"markitdown": {
"command": "uvx",
"args": ["trsdn-markitdown-mcp"]
}
}
}
Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
๐ก Usage Examples
Convert a PDF
Convert the file ~/Documents/report.pdf to markdown
Batch Process Directory
Convert all files in ~/Downloads/documents/ to markdown
Check Supported Formats
What file formats can you convert to markdown?
๐ Troubleshooting
Missing Dependencies Errors
If you see errors like:
PdfConverter threw MissingDependencyExceptionXlsxConverter threw MissingDependencyExceptionPptxConverter threw BadZipFile
This means some optional dependencies are missing. Follow the Complete Install instructions above.
Unicode Errors with .md Files
Some Markdown files with special characters may fail with UnicodeDecodeError. This is a known limitation in the MarkItDown library.
Installation Issues
- "externally-managed-environment" error: Use pipx instead of pip
- Permission denied: Never use sudo with pip; use pipx or virtual environments
- Command not found: Make sure
~/.local/binis in your PATH
See KNOWN_ISSUES.md for more details.
Configuration
No special configuration required. The tool uses the MarkItDown library for document conversion.
Usage
Basic Usage
# Convert all supported files from input/ to output/
python mdconvert.py
Custom Directories
Specify custom input and output directories:
python mdconvert.py --input /path/to/docs --output /path/to/markdown
Single File Conversion
Convert a single file:
python mdconvert.py --file document.pdf
Command Line Options
--input, -i: Input directory (default:input)--output, -o: Output directory (default:output)--file, -f: Convert a single file instead of a directory
MCP Server Features
The MCP server provides three tools:
1. convert_file
Convert a single file to Markdown.
- Input: File path or base64 encoded content with filename
- Output: Converted Markdown content
2. list_supported_formats
List all supported file formats.
- Output: Categorized list of supported file extensions
3. convert_directory
Convert all supported files in a directory.
- Input: Input directory path, optional output directory
- Output: Summary of conversion results
Directory Structure
markitdown-mcp/
โโโ mcp_server.py # MCP protocol server
โโโ mdconvert.py # CLI script
โโโ mcp_config.json # MCP configuration
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
โโโ input/ # Default input directory
โโโ output/ # Default output directory
โโโ venv/ # Virtual environment
๐ How It Works
This MCP server leverages Microsoft's MarkItDown library to provide intelligent document conversion:
- ๐ PDFs: Extracts text, tables, and structure
- ๐ผ๏ธ Images: Uses OCR to extract text content + EXIF metadata
- ๐ต Audio: Converts speech to text transcription (MP3, WAV)
- ๐ Office: Preserves formatting from Word, Excel, PowerPoint
- ๐ HTML: Converts to clean, readable Markdown
- ๐ฆ Archives: Automatically extracts and processes contents
๐ท๏ธ Tags
mcp model-context-protocol claude-desktop markdown document-conversion pdf ocr speech-to-text markitdown ai-tools
๐ Requirements
- Python: 3.10+
- MCP Client: Claude Desktop or compatible MCP client
- Dependencies: Automatically installed via pip
๐ค Contributing
We welcome contributions! Here's how you can help:
๐ Quick Start for Contributors
# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/markitdown-mcp.git
cd markitdown-mcp
# Set up development environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e ".[dev]"
# Test your changes
markitdown-mcp # Test the server works
๐ Ways to Contribute
- ๐ Bug Reports: Found an issue? Report it
- ๐ก Feature Requests: Have an idea? Suggest it
- ๐ New File Formats: Add support for more file types
- ๐ Documentation: Improve guides and examples
- ๐งช Testing: Add tests and improve reliability
- ๐จ Code Quality: Refactor and optimize
๐ Contribution Process
- Read our Contributing Guide
- Check existing issues
- Fork the repository
- Create a feature branch (
feat/amazing-feature) - Make your changes with tests
- Submit a pull request
Please read docs/development/CONTRIBUTING.md for detailed guidelines.
๐ Documentation
For Users
- Examples - MCP client configuration examples
- Known Issues - Common problems and solutions
- Changelog - Version history and updates
For AI Agents
- AGENTS.md - Comprehensive guide for AI agent integration
- API Documentation - Technical specifications and tool details
For Developers
- Contributing Guide - How to contribute
- Testing Strategy - Testing approach and guidelines
- Documentation - Complete documentation index
๐ License
MIT License - see LICENSE file for details.
๐ Related
- Model Context Protocol
- Claude Desktop
- Microsoft MarkItDown# Test workflow fixes
Test fix verification
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trsdn_markitdown_mcp-2.0.0.tar.gz.
File metadata
- Download URL: trsdn_markitdown_mcp-2.0.0.tar.gz
- Upload date:
- Size: 28.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37051218b434c7ff88f8458a99248c2c8e7a14282d68f625c37c21e9dc30c0ac
|
|
| MD5 |
a8ae49272618929768b7ca8c0393fbde
|
|
| BLAKE2b-256 |
fdcb7dba9e656fe18fc2435cbc7691ddd2376b7c8fb2e4a74bfc3d87c049a75c
|
Provenance
The following attestation bundles were made for trsdn_markitdown_mcp-2.0.0.tar.gz:
Publisher:
release.yml on trsdn/markitdown-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trsdn_markitdown_mcp-2.0.0.tar.gz -
Subject digest:
37051218b434c7ff88f8458a99248c2c8e7a14282d68f625c37c21e9dc30c0ac - Sigstore transparency entry: 2582063657
- Sigstore integration time:
-
Permalink:
trsdn/markitdown-mcp@4ff8b2d2706bf408596955ec7cf168e806065976 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/trsdn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4ff8b2d2706bf408596955ec7cf168e806065976 -
Trigger Event:
push
-
Statement type:
File details
Details for the file trsdn_markitdown_mcp-2.0.0-py3-none-any.whl.
File metadata
- Download URL: trsdn_markitdown_mcp-2.0.0-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95b43ffd766187b3ac42c5945e96242bf5ec25dd131c7b3fe04b29aee4312d5f
|
|
| MD5 |
3907567d1a2664200061c278863ba61d
|
|
| BLAKE2b-256 |
472400a0985d5002d2c7dd813351f3e0f2212a3f7ec2edebc84de9070604ad1f
|
Provenance
The following attestation bundles were made for trsdn_markitdown_mcp-2.0.0-py3-none-any.whl:
Publisher:
release.yml on trsdn/markitdown-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trsdn_markitdown_mcp-2.0.0-py3-none-any.whl -
Subject digest:
95b43ffd766187b3ac42c5945e96242bf5ec25dd131c7b3fe04b29aee4312d5f - Sigstore transparency entry: 2582063677
- Sigstore integration time:
-
Permalink:
trsdn/markitdown-mcp@4ff8b2d2706bf408596955ec7cf168e806065976 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/trsdn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4ff8b2d2706bf408596955ec7cf168e806065976 -
Trigger Event:
push
-
Statement type: