MarkItDown MCP Server
A production-ready MCP server for converting documents and files to Markdown using Microsoft MarkItDown.
README
MarkItDown MCP Server
A production-ready Model Context Protocol (MCP) server for converting documents and files to Markdown using Microsoft MarkItDown.
Provides 3 tools for converting documents from URIs, local file paths, or raw string content — supporting a wide range of file formats.
Supports three transport modes: stdio, SSE, and Streamable HTTP.
Folder Structure
markitdown-tool/
|-- markitdown_server.py # Main server entry point
|-- Dockerfile
|-- LICENSE
|-- mcp.example.json
|-- pyproject.toml
|-- README.md
`-- tools/
|-- __init__.py
|-- markitdown_tools.py
`-- toolhandler.py
Available Tools (3)
| Tool | Description |
|---|---|
convert_to_markdown |
Convert a resource from an http:, https:, file:, or data: URI to Markdown |
convert_local_file |
Convert a local file by absolute or relative path to Markdown |
convert_stream |
Convert raw string content to Markdown with optional file extension hint |
Supported File Formats
| Format | Extensions |
|---|---|
.pdf |
|
| Word | .docx |
| PowerPoint | .pptx |
| Excel | .xlsx, .xls |
| Images (OCR) | .png, .jpg, .gif |
| Audio (transcription) | .mp3, .wav, .m4a |
| HTML | .html |
| CSV / JSON / XML | .csv, .json, .xml |
| ZIP | .zip |
| EPub | .epub |
| YouTube URLs | https://youtube.com/... |
Tools Reference
1. convert_to_markdown
Convert a remote or local resource via URI.
Parameters:
| Parameter | Required | Description |
|---|---|---|
uri |
Yes | URI to convert. Schemes: http:, https:, file:, data: |
Example:
{
"uri": "https://example.com/report.pdf"
}
Returns:
{
"success": true,
"uri": "https://example.com/report.pdf",
"title": "Annual Report 2025",
"markdown": "# Annual Report 2025\n\n..."
}
2. convert_local_file
Convert a file on the local filesystem.
Parameters:
| Parameter | Required | Description |
|---|---|---|
file_path |
Yes | Absolute or relative path to the file |
Example:
{
"file_path": "C:/Users/me/Documents/report.docx"
}
Returns:
{
"success": true,
"file_path": "C:/Users/me/Documents/report.docx",
"title": "Q4 Report",
"markdown": "# Q4 Report\n\n..."
}
3. convert_stream
Convert raw string content to Markdown. Useful for in-memory or clipboard data.
Parameters:
| Parameter | Required | Description |
|---|---|---|
content |
Yes | String content to convert |
file_extension |
No | Extension hint for format detection (e.g. .html, .json) |
Example:
{
"content": "<html><body><h1>Hello</h1><p>World</p></body></html>",
"file_extension": ".html"
}
Returns:
{
"success": true,
"file_extension": ".html",
"title": null,
"markdown": "# Hello\n\nWorld\n"
}
Prerequisites
- Python 3.10+
ffmpegandlibmagic(for audio/image support — installed automatically in Docker)
Installation
# From the workspace root (where .venv lives)
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS / Linux
cd markitdown-tool
# Core install
pip install -e .
# With all optional format support (recommended)
pip install -e ".[all]"
Run
stdio (default — for MCP desktop clients like Claude Desktop)
markitdown-mcp --mode stdio
SSE
markitdown-mcp --mode sse --host 0.0.0.0 --port 8000
Endpoints:
GET /ssePOST /messages/GET /health
Streamable HTTP
markitdown-mcp --mode streamable-http --host 0.0.0.0 --port 8000
Endpoints:
POST /mcpGET /healthGET /
Environment variables (alternative to CLI flags)
| Variable | Default | Description |
|---|---|---|
TRANSPORT_TYPE |
stdio |
stdio / sse / streamable-http |
APP_HOST |
0.0.0.0 |
Bind host |
APP_PORT |
8000 |
Bind port |
MARKITDOWN_ENABLE_PLUGINS |
false |
Enable MarkItDown plugins (true / false) |
Docker
# Build
docker build -t markitdown-mcp .
# Run (streamable-http, port 8000)
docker run -p 8000:8000 markitdown-mcp
# With local file access
docker run -v /path/to/docs:/workdir -p 8000:8000 markitdown-mcp
# With plugins enabled
docker run -e MARKITDOWN_ENABLE_PLUGINS=true -p 8000:8000 markitdown-mcp
MCP Client Configuration
See mcp.example.json for a ready-to-use client config snippet.
stdio (Claude Desktop / Cursor):
{
"mcpServers": {
"markitdown": {
"command": "markitdown-mcp",
"args": ["--mode", "stdio"],
"env": {
"MARKITDOWN_ENABLE_PLUGINS": "false"
}
}
}
}
Streamable HTTP (MCP Inspector / MCPmon):
http://localhost:8000/mcp
SSE:
http://localhost:8000/sse
Architecture
MCP Client (Claude / Cursor / MCP Inspector)
|
| JSON-RPC 2.0
v
Transport Layer (stdio | SSE | Streamable HTTP) ← markitdown_server.py
|
v
ToolHandler Registry (3 tools)
|
v
MarkItDown Tool Handlers ← tools/markitdown_tools.py
|
v
MarkItDown Library (Microsoft)
|
v
File / URL / Stream
Troubleshooting
ModuleNotFoundError: No module named 'markitdown' — Run pip install -e ".[all]".
ffmpeg not found — Install ffmpeg: choco install ffmpeg (Windows) or apt-get install ffmpeg (Linux).
Port already in use — Change APP_PORT env var or use --port flag.
convert_local_file returns "File not found" — Use an absolute path. In Docker, mount the directory with -v.
License
MIT License — see LICENSE for details.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.