VOOZH about

URL: https://apify.com/amaranth_nylon/markitdown-mcp-actor

โ‡ฑ Markitdown MCP Actor ยท Apify


Pricing

$10.00 / 1,000 results

Go to Apify Store

Markitdown MCP Actor

Markitdown MCP Actor is an Apify Actor designed to convert various file formats (like PDFs, DOCX, PPTX, HTML, or images) into clean Markdown (.md) text.

Pricing

$10.00 / 1,000 results

Rating

0.0

(0)

Developer

๐Ÿ‘ Yash Kavaiya

Yash Kavaiya

Maintained by Community

Actor stats

1

Bookmarked

3

Total users

0

Monthly active users

4 months ago

Last modified

Share

Markitdown MCP Server Actor

๐Ÿ‘ Apify
๐Ÿ‘ MCP

An Apify Actor that provides a Model Context Protocol (MCP) server for Markitdown, Microsoft's lightweight Python utility for converting various file formats to Markdown.

Overview

This Actor wraps the Markitdown MCP server as an Apify Actor, making it easy to deploy and use as a pay-per-event service. Markitdown converts various file formats to Markdown, making them suitable for use with Large Language Models (LLMs) and text analysis pipelines.

Supported File Formats

  • Documents: PDF, PowerPoint, Word, Excel
  • Media: Images (with EXIF metadata and OCR), Audio (with transcription)
  • Web Content: HTML, YouTube URLs
  • Data Formats: CSV, JSON, XML
  • Archives: ZIP files, EPubs

Features

  • MCP Protocol: Implements the Model Context Protocol for seamless integration with MCP clients
  • Streamable HTTP Transport: Uses modern Streamable HTTP transport for efficient communication
  • Pay-per-Event: Charges only for actual tool usage via Apify's pay-per-event system
  • Session Management: Automatic session timeout and cleanup after inactivity
  • Standby Mode: Runs in Apify's standby mode for instant availability

How It Works

The Actor runs a proxy server that:

  1. Connects to the Markitdown MCP server via STDIO transport
  2. Exposes a Streamable HTTP endpoint at /mcp
  3. Forwards MCP requests/responses between clients and the Markitdown server
  4. Charges for tool usage via Apify's pay-per-event system

Available Tools

convert_to_markdown

Converts various file formats to Markdown.

Parameters:

  • uri (string): The URI of the file to convert. Supports:
    • http:// and https:// - Remote files
    • file:// - Local files
    • data: - Data URIs

Example:

{
"uri":"https://example.com/document.pdf"
}

Usage

1. Deploy the Actor

Deploy this Actor to Apify or run it locally in standby mode.

2. Configure Your MCP Client

Add the following configuration to your MCP client (e.g., VS Code, Claude Desktop):

{
"mcpServers":{
"markitdown-mcp-server":{
"type":"http",
"url":"https://YOUR_ACTOR_URL/mcp",
"headers":{
"Authorization":"Bearer YOUR_APIFY_TOKEN"
}
}
}
}

3. Use the Tool

Once configured, you can use the convert_to_markdown tool in your MCP client:

Convert thisPDF to markdown: https://example.com/document.pdf

Environment Variables

  • SESSION_TIMEOUT_SECS (default: 300): Session timeout in seconds before terminating idle sessions

Pricing

The Actor uses Apify's pay-per-event system with the following rates (configurable in .actor/pay_per_event.json):

  • CONVERT_TO_MARKDOWN: $0.01 per conversion
  • TOOL_LIST: $0.0001 per listing
  • RESOURCE_LIST: $0.0001 per listing
  • RESOURCE_READ: $0.001 per read
  • PROMPT_LIST: $0.0001 per listing
  • PROMPT_GET: $0.001 per get

Local Development

Prerequisites

  • Python 3.10 or higher
  • Poetry for dependency management
  • Docker (optional, for containerized development)

Installation

  1. Clone the repository:
git clone https://github.com/Yash-Kavaiya/Markitdown-MCP-actor.git
cd Markitdown-MCP-actor
  1. Install dependencies:
$poetry install
  1. Run the Actor locally:
$poetry run python -m src

Running in Standby Mode

To run the Actor in standby mode (required for MCP server operation):

exportAPIFY_META_ORIGIN=STANDBY
exportACTOR_STANDBY_URL=http://localhost:5001
poetry run python -m src

The MCP endpoint will be available at: http://localhost:5001/mcp

Project Structure

Markitdown-MCP-actor/
โ”œโ”€โ”€ .actor/ # Apify Actor configuration
โ”‚ โ”œโ”€โ”€ actor.json # Actor metadata and settings
โ”‚ โ”œโ”€โ”€ pay_per_event.json # Pricing configuration
โ”‚ โ”œโ”€โ”€ Dockerfile # Docker image definition
โ”‚ โ””โ”€โ”€ .actorignore # Files to exclude from build
โ”œโ”€โ”€ src/ # Source code
โ”‚ โ”œโ”€โ”€ __init__.py # Package initialization
โ”‚ โ”œโ”€โ”€ __main__.py # Main entry point
โ”‚ โ”œโ”€โ”€ const.py # Constants and configuration
โ”‚ โ”œโ”€โ”€ models.py # Data models
โ”‚ โ”œโ”€โ”€ server.py # ProxyServer implementation
โ”‚ โ”œโ”€โ”€ mcp_gateway.py # MCP gateway logic
โ”‚ โ””โ”€โ”€ event_store.py # Event store for session management
โ”œโ”€โ”€ pyproject.toml # Python dependencies and settings
โ”œโ”€โ”€ .gitignore # Git ignore rules
โ””โ”€โ”€ README.md # This file

Customization

Charging Strategy

You can customize the charging strategy by editing .actor/pay_per_event.json. The default configuration charges:

  • $0.01 per conversion (main operation)
  • Minimal charges for metadata operations (listing tools, resources, prompts)

Session Timeout

Adjust the SESSION_TIMEOUT_SECS environment variable to control how long sessions remain active during inactivity. The default is 300 seconds (5 minutes).

Tool Whitelist

The Actor uses a tool whitelist defined in src/const.py:

TOOL_WHITELIST ={
'convert_to_markdown':('CONVERT_TO_MARKDOWN',1),
}

You can add more tools if the underlying Markitdown MCP server exposes them.

Architecture

The Actor implements a proxy architecture:

MCPClient(VS Code, Claude, etc.)
โ†“(Streamable HTTP)
Proxy Server(This Actor)
โ†“(STDIO)
Markitdown MCP Server
โ†“
Markitdown Library

Key components:

  • ProxyServer: Manages HTTP server and session lifecycle
  • MCP Gateway: Proxies MCP requests and handles charging
  • Event Store: Maintains session history for resumability
  • Session Manager: Handles Streamable HTTP transport

Related Links

License

Apache-2.0

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues and questions:

Acknowledgments

You might also like

Markitdown Mcp Server

rector_labs/markitdown-mcp-server

Cloud-hosted MCP server converting 29+ document formats (PDF, DOCX, PPTX, images, audio) to AI-ready Markdown. Zero Python setup. Perfect for RAG pipelines and AI agents. Pay-per-use: $0.02/conversion. Built on Microsoft's Markitdown (82k+ โญ).

Agentic Document Extractor

solutionssmart/agentic-document-extractor-local

Extract RAG-ready chunks with provenance from PDFs, scans, images, DOCX, XLSX, PPTX, CSV, TXT, and Markdown using a local-first Apify Actor.

๐Ÿ‘ User avatar

Solutions Smart

2

Doc To Markdown MCP Server

abotapi/doc-to-markdown-mcp

An MCP server that converts documents to clean Markdown. Convert PDFs, Word docs, Excel spreadsheets, PowerPoints, HTML, images, and more to AI-friendly Markdown format.

S3 to Markdown

consummate_hickory/s3FileToMarkdown

Transform S3 documents into perfect AI training data! Converts PDFs, Word, Excel, images, audio to clean Markdown that LLMs love. Uses Microsoft's markitdown engine. Ideal for RAG systems, AI agents, and machine learning pipelines.

๐Ÿ‘ User avatar

Lorenzo Dalmazzo

4

5.0

Pandoc Universal Mcp

whitewalk/pandoc-universal-mcp

Convert documents between 40+ formats via MCP. Markdown, DOCX, PDF, HTML, LaTeX, EPUB, PPTX & more. Academic support with citations, bibliography & math. Batch conversion. Perfect for AI agents & Claude Desktop integration.

HTML to Markdown/Text

wowo51/html-to-md

Convert html to md or txt. Perfect for AI agents that need to cut expensive LLM costs.

๐Ÿ‘ User avatar

Warren Harding

2

Related articles

Build and deploy MCP servers in minutes with a TypeScript template
Read more
Deploy your Smithery STDIO MCP servers on Apify
Read more
How to use MCP with Apify Actors
Read more