MCP-PDF2MD
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-PDF2MD convert this PDF from https://example.com/report.pdf to markdown"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP-PDF2MD
MCP-PDF2MD Service
An MCP-based high-performance PDF to Markdown conversion service powered by the Mistral AI OCR API, supporting batch processing for local files and URL links with structured output.
Key Features
Format Conversion: Convert PDF files to structured Markdown format.
Multi-source Support: Process both local PDF files and remote PDF URLs.
MCP Integration: Seamlessly integrates with LLM clients like Claude Desktop.
Structure Preservation: Aims to maintain the original document structure, including headings, paragraphs, and lists.
Image Extraction: Automatically extracts images from the PDF and saves them locally.
High-Quality Extraction: Leverages Mistral AI's state-of-the-art OCR for high-quality text and layout information extraction.
Related MCP server: PDF Reader MCP Server
System Requirements
Python 3.10+
uvfor environment and package management (recommended)
Quick Start
Clone the repository and enter the directory:
git clone https://github.com/zicez/mcp-pdf2md.git cd mcp-pdf2mdInstall dependencies with uv:
uv syncConfigure environment variables:
Create a
.envfile in the project root directory and set your Mistral AI API key:MISTRAL_API_KEY=your_mistral_api_key_hereStart the service:
uv run pdf2md
Command Line Arguments
The server supports the following command line arguments:
--output-dir: Specify the directory to save converted Markdown files and images. Defaults to./downloads.
Example:
uv run pdf2md --output-dir /path/to/my/outputClaude Desktop Configuration
Add the following configuration in Claude Desktop:
Windows:
{
"mcpServers": {
"pdf2md": {
"command": "uv",
"args": [
"--directory",
"C:\\path\\to\\mcp-pdf2md",
"run",
"pdf2md",
"--output-dir",
"C:\\path\\to\\output"
],
"env": {
"MISTRAL_API_KEY": "your_mistral_api_key_here"
}
}
}
}Linux/macOS:
{
"mcpServers": {
"pdf2md": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-pdf2md",
"run",
"pdf2md",
"--output-dir",
"/path/to/output"
],
"env": {
"MISTRAL_API_KEY": "your_mistral_api_key_here"
}
}
}
}Note about API Key Configuration: You can set the API key in two ways:
In the
.envfile within the project directory (recommended for development).In the Claude Desktop configuration as shown above (recommended for regular use).
If you set the API key in both places, the one in the Claude Desktop configuration will take precedence.
MCP Tools
The server provides the following MCP tools:
convert_pdf_url(url: str): Converts a PDF from a URL to Markdown. Supports single URLs or multiple URLs separated by spaces, commas, or newlines.convert_pdf_file(file_path: str): Converts a local PDF file to Markdown. Supports single or multiple file paths separated by spaces, commas, or newlines.
Getting a Mistral AI API Key
This project relies on the Mistral AI API for PDF content extraction. To obtain an API key:
Visit the Mistral AI Platform and create an account.
Navigate to the "API Keys" section in your workspace.
Create a new secret key.
Copy the generated API key.
Use this key as the value for
MISTRAL_API_KEY.
License
MIT License - see the LICENSE file for details.
Credits
This project uses the Mistral AI OCR API.
Available Tools
2 toolsconvert_pdf_fileA
Convert a local PDF file to Markdown. Output is saved in a new folder named after the PDF in its original directory.
Args:
file_path: Path to a local PDF file or multiple paths separated by spaces, commas, or newlines.
Returns:
A dictionary with the conversion results.
Inputs: file_path (required). Returns: result
convert_pdf_urlA
Convert a PDF from a URL to Markdown. The output is saved in the directory specified by --output-dir.
Args:
url: A single PDF URL or multiple URLs separated by spaces, commas, or newlines.
Returns:
A dictionary with the conversion results.
Inputs: url (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one handles local PDF files, while the other handles PDFs from URLs. There is no overlap in functionality, and the descriptions explicitly differentiate between file-based and URL-based inputs, making misselection unlikely.
Both tools follow a consistent verb_noun pattern with 'convert_pdf_' as the prefix, followed by 'file' or 'url'. This predictable naming scheme makes it easy to understand their roles and maintain consistency across the tool set.
With only 2 tools, the server feels thin for a PDF conversion domain, as it lacks operations like batch processing, configuration adjustments, or error handling tools. While the core conversion is covered, the limited scope may restrict agent workflows, placing it in the borderline range.
The server covers the basic conversion functionality for both local files and URLs, but there are notable gaps such as no tools for managing output directories, handling conversion errors, or providing status updates. This incomplete surface could lead to agent failures in more complex scenarios.
Related MCP Connectors
PDF to Markdown and PDF to text from PDF URLs, page by page, with OCR for scanned pages
Convert PDF URLs to clean text or LLM-ready Markdown, with RAG chunks and OCR in 100+ languages.
PDF, DOCX and image URLs to clean, LLM-ready Markdown or text, with OCR for scanned pages.
High-fidelity PDF to structured Markdown conversion and document field extraction.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to extract and read content from PDF documents using Mistral AI's OCR capabilities. Provides intelligent caching and returns clean markdown text for easy integration with AI workflows.21MIT
- FlicenseAqualityDmaintenanceEnables reading and extracting content from PDF documents including text (as Markdown), images, tables, and metadata from both local files and URLs, with OCR support for scanned documents.2-
- AlicenseBqualityDmaintenanceConverts documents (PDF, Word, PPT, images, HTML) to Markdown via MinerU API. Supports URL and local file inputs with OCR, formula/table recognition, and automatic large file handling.55MIT
- AlicenseNot gradedqualityBmaintenanceConverts documents and images to Markdown using Mistral AI's OCR, enabling AI-powered document processing via MCP-compatible clients like Claude Desktop.62 npm2MIT