md-converter-mcp

md-converter-mcp

Converts files (PDF, DOCX, PPTX, XLSX, images via OCR) and URLs to Markdown, enabling AI clients to read them via a single MCP tool.

Category
访问服务器

README

md-converter-mcp

A Node.js MCP server that converts files and URLs to Markdown — exposes a single convert_to_markdown tool that any MCP-compatible AI client (Claude Desktop, Cursor, VS Code, etc.) can call directly.

Requires Node.js ≥ 18. No Python. No Docker.


Why this exists

Microsoft's markitdown-mcp is a great idea but fails to install on Python 3.13+ due to unresolved wheel conflicts in its dependency tree (youtube-transcript-api and others). If you hit errors like:

ERROR: Could not find a version that satisfies the requirement ...

…this is a pure Node.js drop-in that does the same job without touching Python at all.


What it does

Converts any of these inputs into clean Markdown text that the AI can read:

Input How
PDF pdf-parse — text extraction, no rendering
DOCX mammoth
PPTX adm-zip + fast-xml-parser (slide XML → text)
XLSX / XLS xlsx (sheet → Markdown table)
PNG, JPG, JPEG, WEBP, TIFF, BMP tesseract.js OCR
HTTP/HTTPS URL node-fetch + cheerio (HTML → structured Markdown)
TXT / MD Raw file read

Token savings vs. direct file upload

When you drop a PDF directly into Claude, each page is rendered as an image and processed through the vision layer at ~1,500 tokens/page. This MCP extracts plain text on your machine before anything crosses the API boundary.

Document Pages MCP tokens Direct upload tokens Reduction
Sales enablement deck (12-page presentation PDF) 12 1,399 19,399 93%
Technical user guide (16-page dense doc) 16 6,309 30,309 79%
Web article saved as PDF (6 pages) 6 1,593 10,593 85%
Medical report (3-page) 3 ~680 ~5,200 87%

Installation

Prerequisites: Node.js 18+ (LTS recommended)

# 1. Clone the repo
git clone https://github.com/raghunath-iyengar/md-converter-mcp.git
cd md-converter-mcp

# 2. Install dependencies
npm install

That's it. No build step, no compile step.

Verify it works

node server.js

You should see the process start and wait (it listens on stdio for MCP messages). Press Ctrl+C to exit.


Connect to Claude Desktop

Open your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the md-converter block inside mcpServers:

{
  "mcpServers": {
    "md-converter": {
      "command": "node",
      "args": ["/absolute/path/to/md-converter-mcp/server.js"]
    }
  }
}

Replace /absolute/path/to/md-converter-mcp/server.js with the actual path on your machine.

macOS example:

"args": ["/Users/yourname/md-converter-mcp/server.js"]

Windows example:

"args": ["C:\\Users\\yourname\\md-converter-mcp\\server.js"]

Restart Claude Desktop. You should see md-converter appear in the MCP tools list.


Connect to other MCP clients

Any client that supports the MCP stdio transport works. The server command is always:

node /path/to/server.js

Cursor / VS Code (.cursor/mcp.json or mcp.json)

{
  "mcpServers": {
    "md-converter": {
      "command": "node",
      "args": ["/path/to/md-converter-mcp/server.js"]
    }
  }
}

Usage

Once connected, tell Claude (or any MCP client) to use the tool:

"Use convert_to_markdown to read /Users/yourname/Documents/report.pdf"

Or just drop a file reference in your message — Claude will call the tool automatically when it needs to read a supported file type.

URL example:

"Summarise https://example.com/article using convert_to_markdown"


Troubleshooting

node: command not found Node.js is not in PATH. Use the full path to the node binary in your config:

"command": "/usr/local/bin/node"

Find it with which node (macOS/Linux) or where node (Windows).

Error: File not found The MCP server runs as a subprocess — it does not inherit your shell's working directory. Always pass absolute paths, not relative ones.

pdf-parse warning about test files Safe to ignore. It's a known cosmetic warning in pdf-parse v1.x that does not affect output.

Tesseract OCR is slow on first run tesseract.js downloads language data on first use and caches it. Subsequent calls are fast.

Claude Desktop shows MCP connection error Check the config JSON for syntax errors (trailing commas are invalid JSON). Validate with node -e "JSON.parse(require('fs').readFileSync('claude_desktop_config.json','utf8'))".


Supported Node versions

Node version Status
18.x LTS ✅ Tested
20.x LTS ✅ Tested
22.x LTS ✅ Tested
16.x ⚠️ May work, not supported

Dependencies

Package Purpose
@modelcontextprotocol/sdk MCP server + stdio transport
pdf-parse PDF text extraction
mammoth DOCX → plain text
adm-zip + fast-xml-parser PPTX slide XML extraction
xlsx Excel → Markdown tables
tesseract.js OCR for images
node-fetch HTTP fetching for URLs
cheerio HTML → structured Markdown
zod Input validation

License

GPL-3.0 — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选