PDFtoMarkdown.ai MCP
在任何MCP客户端中将PDF转换为干净、结构化的Markdown。由PDFtoMarkdown.ai API提供支持;提供免费额度及按页付费积分,无需订阅。
文档
PDFtoMarkdown.ai — MCP Server
An MCP server that lets AI agents convert PDFs, Word, PowerPoint, Excel, images, HTML, and EPUB into clean, structured Markdown — powered by PDFtoMarkdown.ai.
Give Claude, Cursor, Codex, Hermes, OpenClaw, or any MCP-compatible client a convert_pdf_to_markdown tool so it can turn local documents into agent-ready Markdown on demand — headings, tables, and OCR text preserved — instead of choking on raw document blobs.
Why
Models reason far better over clean Markdown than over raw PDF/Office layout. Converting a document once to Markdown is cheaper, faster, and higher-fidelity than making the model re-OCR it on every run.
Features
- 🧠 Agent-ready Markdown — headings, lists, and tables preserved
- 📄 Many formats — PDF, DOCX, PPTX, XLSX, PNG/JPG, HTML, EPUB
- 🔍 OCR — reads scanned PDFs and images (optional Force OCR)
- 🔌 Drop-in MCP — one tool, works in any MCP client
- ⚡ Fast — most documents convert in seconds
Prerequisites
- Node.js 18+
- A free API key from your PDFtoMarkdown.ai account
Installation
npm install -g @happywp/pdftomarkdown-mcp
Configuration
Add the server to your MCP client's config, using the API key from your account.
Claude Desktop — claude_desktop_config.json:
{
"mcpServers": {
"pdftomarkdown": {
"command": "pdftomarkdown-mcp",
"env": {
"PDFTOMARKDOWN_API_KEY": "your-api-key-here"
}
}
}
}
Cursor — ~/.cursor/mcp.json uses the same mcpServers shape.
Codex — ~/.codex/config.toml:
[mcp_servers.pdftomarkdown]
command = "pdftomarkdown-mcp"
env = { PDFTOMARKDOWN_API_KEY = "your-api-key-here" }
Restart your client so the server loads.
Usage
Just ask your agent:
Convert this PDF to Markdown and summarize the key points:
/path/to/document.pdf
Tool
convert_pdf_to_markdown
| Argument | Type | Required | Description |
|---|---|---|---|
file_path | string | yes | Absolute path to the document to convert |
force_ocr | boolean | no | Force OCR on every page (for scanned files) |
Returns the converted Markdown, the page count, and credits used.
Environment variables
| Variable | Description |
|---|---|
PDFTOMARKDOWN_API_KEY | Your PDFtoMarkdown.ai API key (get one free) |
Pricing
Pay per page — no subscription. Free to start (10 free pages with an account, no card required). See pdftomarkdown.ai/pricing.
Links
License
MIT © HappyWP