markitdown-mcp

andersonid/markitdown-mcp

3.2

If you are the rightful owner of markitdown-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

MarkItDown MCP Server is a versatile tool for converting various content formats to Markdown using Microsoft's MarkItDown library.

Tools
2
Resources
0
Prompts
0

MarkItDown MCP Server

A Model Context Protocol (MCP) server for converting various content formats to Markdown using Microsoft's MarkItDown library.

Features

  • Convert HTML, PDF, DOCX, PPTX, XLSX, CSV, and plain text to Markdown
  • Extract plain text from various formats
  • HTTP/SSE endpoints for integration with n8n and other tools
  • Docker support for easy deployment
  • Coolify-ready configuration

Quick Start

Using Docker

  1. Clone this repository:
git clone <your-repo-url>
cd markitdown-mcp
  1. Build and run with Docker:
docker build -t markitdown-mcp .
docker run -p 3001:3001 markitdown-mcp

Using Docker Compose

docker-compose up -d

Coolify Deployment

  1. In Coolify, create a new project
  2. Choose "Docker Compose" as the source
  3. Use this repository as the source
  4. Update the domain in coolify.yml to match your domain
  5. Deploy the service

Important: Make sure to disable gzip compression for the /mcp path in Coolify settings to ensure SSE connections work properly.

API Endpoints

Health Check

GET /health

Convert to Markdown

POST /api/convert
Content-Type: application/json

{
  "content": "<h1>Hello World</h1>",
  "format": "html"
}

Extract Text

POST /api/extract
Content-Type: application/json

{
  "content": "<h1>Hello World</h1>",
  "format": "html"
}

MCP SSE Endpoint

GET /mcp/{clientId}/sse

n8n Integration

  1. In n8n, add an "MCP Client" node
  2. Set the SSE Endpoint to: http://your-domain.com/mcp/n8n-client/sse
  3. The server will provide two tools:
    • convert_to_markdown: Convert content to Markdown
    • extract_text: Extract plain text from content

Supported Formats

  • HTML
  • PDF
  • DOCX (Microsoft Word)
  • PPTX (Microsoft PowerPoint)
  • XLSX (Microsoft Excel)
  • CSV
  • Plain Text

Environment Variables

  • NODE_ENV: Environment (default: production)
  • PORT: Server port (default: 3001)
  • MCP_SERVER_NAME: MCP server name (default: markitdown-mcp)
  • DEBUG: Enable debug logging (default: false)

Development

  1. Install dependencies:
npm install
  1. Run in development mode:
npm run dev
  1. Build for production:
npm run build
npm start

License

MIT License - see LICENSE file for details.