The MarkItDown MCP server supports three transport modes: STDIO, Streamable HTTP, and SSE (Server-Sent Events). Each mode is suited for different integration scenarios.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/microsoft/markitdown/llms.txt
Use this file to discover all available pages before exploring further.
Server Modes
STDIO Mode (Default)
STDIO mode uses standard input and output for communication. This is the default mode and is ideal for local desktop applications like Claude Desktop.- Claude Desktop integration
- Local AI assistant applications
- Process-based integration
Streamable HTTP Mode
Streamable HTTP mode runs a web server that handles MCP requests over HTTP. Start the server with the--http flag:
| Option | Default | Description |
|---|---|---|
--http | false | Enable HTTP and SSE transport modes |
--host | 127.0.0.1 | Host address to bind to |
--port | 3001 | Port number to listen on |
/mcp- Streamable HTTP transport endpoint/sse- Server-Sent Events endpoint
- Web-based AI applications
- Remote MCP client access
- Microservice architectures
SSE Mode
SSE (Server-Sent Events) mode is included when using the--http flag. The SSE endpoint is available at /sse.
http://127.0.0.1:3001/sse for event-based communication.
Use cases:
- Real-time streaming applications
- Browser-based clients
- Event-driven architectures
The convert_to_markdown Tool
The MCP server exposes a single tool:convert_to_markdown.
Tool Signature
Parameters
uri(string, required): A URI pointing to the resource to convert
Supported URI Schemes
| Scheme | Description | Example |
|---|---|---|
http: | HTTP URL | http://example.com/doc.pdf |
https: | HTTPS URL | https://example.com/doc.docx |
file: | Local file path | file:///home/user/document.pdf |
data: | Inline data | data:text/html;base64,PGh0bWw+... |
Return Value
The tool returns a string containing the Markdown representation of the document.Example Usage
When using the tool through an MCP client (like Claude Desktop or mcpinspector):- Download or read the resource from the URI
- Detect the file type automatically
- Convert the content to Markdown
- Return the Markdown text
Running with Docker
Basic Docker Usage
For remote URIs (http/https), run the container with basic options:Accessing Local Files
To convert local files, mount a directory into the container:/home/user/data will be accessible at /workdir in the container.
Example: If you have /home/user/data/example.txt, use the URI:
Running in HTTP Mode
Run the Docker container in HTTP mode:Debugging with mcpinspector
The MCP Inspector is a tool for testing and debugging MCP servers.Starting the Inspector
Run the inspector:http://localhost:5173/.
Connecting to STDIO Server
- Select STDIO as the transport type
- Enter
markitdown-mcpas the command - Click Connect
Connecting to Streamable HTTP Server
-
Start the MCP server in HTTP mode:
-
In the inspector:
- Select Streamable HTTP as the transport type
- Enter
http://127.0.0.1:3001/mcpas the URL - Click Connect
Connecting to SSE Server
- Start the MCP server in HTTP mode (same command as above)
-
In the inspector:
- Select SSE as the transport type
- Enter
http://127.0.0.1:3001/sseas the URL - Click Connect
Testing the Tool
Once connected:- Click the Tools tab
- Click List Tools to see available tools
- Click convert_to_markdown
- Enter a URI in the parameters (e.g.,
https://example.com/test.pdf) - Click Run to execute the tool
Security Considerations
Best Practices
-
Bind to localhost: When running in HTTP/SSE mode, always bind to
127.0.0.1(the default) to prevent external access - Use Docker for isolation: Run the server in Docker to limit file system access
- Mount only necessary directories: When using Docker, only mount directories that need to be accessed
- Be cautious with file:// URIs: The server can access any file readable by the user running it
- Validate URIs: When integrating the server into applications, validate and sanitize URIs before passing them to the tool
- Network access: Consider using firewall rules to restrict access to the server when running in HTTP/SSE mode
Next Steps
Claude Desktop Integration
Set up Claude Desktop to use the MCP server
API Reference
Explore MarkItDown’s Python API