Skip to main content

An MCP server for the "markitdown" library.

Project description

MarkItDown-MCP

PyPI PyPI - Downloads Built by AutoGen Team

The markitdown-mcp package provides a lightweight STDIO, Streamable HTTP, and SSE MCP server for calling MarkItDown.

It exposes one tool: convert_to_markdown(uri), where uri can be any http:, https:, file:, or data: URI.

Installation

To install the package, use pip:

pip install markitdown-mcp

Usage

To run the MCP server, using STDIO (default) use the following command:

markitdown-mcp

To run the MCP server, using Streamable HTTP and SSE use the following command:

markitdown-mcp --http --host 127.0.0.1 --port 3001

Running in Docker

To run markitdown-mcp in Docker, build the Docker image using the provided Dockerfile:

docker build -t markitdown-mcp:latest .

And run it using:

docker run -it --rm markitdown-mcp:latest

This will be sufficient for remote URIs. To access local files, you need to mount the local directory into the container. For example, if you want to access files in /home/user/data, you can run:

docker run -it --rm -v /home/user/data:/workdir markitdown-mcp:latest

Once mounted, all files under data will be accessible under /workdir in the container. For example, if you have a file example.txt in /home/user/data, it will be accessible in the container at /workdir/example.txt.

Accessing from Claude Desktop

It is recommended to use the Docker image when running the MCP server for Claude Desktop.

Follow these instructions to access Claude's claude_desktop_config.json file.

Edit it to include the following JSON entry:

{
  "mcpServers": {
    "markitdown": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "markitdown-mcp:latest"
      ]
    }
  }
}

If you want to mount a directory, adjust it accordingly:

{
  "mcpServers": {
    "markitdown": {
      "command": "docker",
      "args": [
	"run",
	"--rm",
	"-i",
	"-v",
	"/home/user/data:/workdir",
	"markitdown-mcp:latest"
      ]
    }
  }
}

Debugging

To debug the MCP server you can use the mcpinspector tool.

npx @modelcontextprotocol/inspector

You can then connect to the inspector through the specified host and port (e.g., http://localhost:5173/).

If using STDIO:

  • select STDIO as the transport type,
  • input markitdown-mcp as the command, and
  • click Connect

If using Streamable HTTP:

  • select Streamable HTTP as the transport type,
  • input http://127.0.0.1:3001/mcp as the URL, and
  • click Connect

If using SSE:

  • select SSE as the transport type,
  • input http://127.0.0.1:3001/sse as the URL, and
  • click Connect

Finally:

  • click the Tools tab,
  • click List Tools,
  • click convert_to_markdown, and
  • run the tool on any valid URI.

Security Considerations

The server does not support authentication, and runs with the privileges of the user running it. For this reason, when running in SSE or Streamable HTTP mode, it is recommended to run the server bound to localhost (default).

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_markitdown_mcp-0.0.1a4.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_markitdown_mcp-0.0.1a4-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_markitdown_mcp-0.0.1a4.tar.gz.

File metadata

  • Download URL: iflow_mcp_markitdown_mcp-0.0.1a4.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_markitdown_mcp-0.0.1a4.tar.gz
Algorithm Hash digest
SHA256 e54809f3e53d4397da58ae68c2fd68ffa561a0df921b557c0787e9116a527e2c
MD5 67860fdbad960315e62559e9d63c0527
BLAKE2b-256 db7a3c61d48f1d089a57192a8e6d841dd4aa68237dd7d7f96aedace2e2f986d0

See more details on using hashes here.

File details

Details for the file iflow_mcp_markitdown_mcp-0.0.1a4-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_markitdown_mcp-0.0.1a4-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_markitdown_mcp-0.0.1a4-py3-none-any.whl
Algorithm Hash digest
SHA256 224301dcf2a7682adcec43ffd5b918077b05d59a285ad19c5e856b04f221fe5c
MD5 3a65ed50352170628f6217471a7e1b5e
BLAKE2b-256 7b7fde2d1c43ab172a4d44129e98a01f04c249931919d4bcab07d91b5a6cd9b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page