npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

convertertomarkdown-mcp

v1.0.5

Published

MCP server to convert files (DOCX, PDF, XLSX, HTML, CSV, JSON, XML, images) to Markdown — Node.js, no browser required

Readme

convertertomarkdown-mcp

MCP server that lets AI agents convert local files to Markdown — no browser, no server, no API key.

Built on the same engine as convertertomarkdown.com. Works with Claude Desktop, Cursor, Windsurf, and any MCP-compatible client.


What it does

When connected to an AI agent, this tool allows the agent to read any local file and convert it to clean Markdown text before processing it. This removes friction from document-heavy workflows: instead of copy-pasting content or uploading files manually, the agent converts the file inline and works with the resulting Markdown directly.

Example:

"Summarize the key points from /Users/me/reports/Q1-2025.pdf"

The agent calls convert_to_markdown on the file, receives the Markdown, and processes it — all in one step.


Supported formats

| Format | Engine | |--------|--------| | .docx | mammoth | | .pdf | pdfjs-dist (text-based PDFs; scanned PDFs → use the web app) | | .xlsx, .xls | xlsx | | .html, .htm | turndown + jsdom | | .csv | papaparse | | .json | passthrough (fenced code block) | | .xml | passthrough (fenced code block) | | .txt, .md | raw text | | .jpg, .jpeg, .png, .webp, .bmp, .gif | tesseract.js OCR |


Installation

No installation required. Just add it to your MCP client config and npx handles the rest.

Note: the first launch downloads the package, which can take 15s–2min depending on your network. If your MCP client times out on first connect, just retry — subsequent launches start in ~2s from the npx cache.

Claude Code

claude mcp add convertertomarkdown -- npx -y convertertomarkdown-mcp

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "convertertomarkdown": {
      "command": "npx",
      "args": ["-y", "convertertomarkdown-mcp"]
    }
  }
}

Restart Claude Desktop. The tool convert_to_markdown will appear in the toolbar.

Cursor / Windsurf / other MCP clients

{
  "mcpServers": {
    "convertertomarkdown": {
      "command": "npx",
      "args": ["-y", "convertertomarkdown-mcp"]
    }
  }
}

Tool reference

convert_to_markdown

Converts a local file to Markdown text.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | file_path | string | yes | Absolute path to the file |

Returns: Markdown string.

Error cases:

  • File not found → returns an error message with the resolved path
  • Unsupported extension → lists accepted formats
  • Scanned PDF (no extractable text) → suggests using the web app

How it works

The converters run entirely in Node.js — no browser APIs, no external services. Each format has a dedicated converter:

src/
├── index.ts                  # MCP server (stdio transport)
└── converters/
    ├── index.ts              # Dispatcher by file extension
    ├── docxConverter.ts      # mammoth → HTML → Markdown
    ├── pdfConverter.ts       # pdfjs-dist legacy build (text extraction)
    ├── xlsxConverter.ts      # xlsx → Markdown tables
    ├── htmlConverter.ts      # jsdom cleanup → turndown
    ├── imageConverter.ts     # tesseract.js OCR
    └── textConverter.ts      # txt, csv (papaparse), json, xml

Key adaptation from the browser version: File objects replaced with file paths, DOMParser replaced with jsdom, URL.createObjectURL not needed (tesseract.js accepts paths natively in Node.js).


Local development

git clone https://github.com/franciscovaleromartin/convertertomarkdown-mcp
cd convertertomarkdown-mcp
npm install
npm run build
node dist/index.js   # starts the MCP server on stdio

To test a conversion directly:

npx tsx test.ts /path/to/file.pdf

Requirements

  • Node.js ≥ 18

Related


License

MIT © Francisco Valero