实验记录:MarkItDown Python 指南 + MCP 指南(2026-09-23)
对应草稿: devto-python-guide.md (Python 库使用) devto-mcp-guide.md (MCP 服务器配置) 用途:为这两篇文章提供可回溯的一手证据,替代估计值。未执行的字段写 TBD 。 运行记录 字段 内容 Post ID python-guide / mcp-guide Run date 2026-09-23 Operator AI 辅助执行命令,结果原样记录(人工复核:TBD) Environment macOS(darwin 26.5.1,Apple Silicon), uv 0.10.8 ,Python 3.12( uv venv --python=3.12 ) Tool / version markitdown 0.1.8 (PyPI 2026-09-21 发布)、 markitdown-mcp 0.0.1a7 (PyPI…
On September 23, 2026, an experiment was conducted to document the usage of the Python libraries markitdown and markitdown-mcp. The experiment was carried out using the AI assistant AI, which executed commands and recorded the results verbatim. The experiment was conducted on a macOS system with Darwin 26.5.1 and Apple Silicon architecture, using Python 3.12.
The experiment utilized two specific versions of the libraries: markitdown 0.1.8 and markitdown-mcp 0.0.1a7. The conversion mode used for the experiment was a local CLI mode, which did not involve any LLM client, plugins, or Azure services. The input files used for the experiment were sourced from the "samples/quality-gallery/files/" directory, and the output files were stored in a temporary directory.
The experiment covered 14 public fixtures, resulting in various output files, including PDF, HTML, and image files. The conversion process generally preserved the structure of the input content, such as titles, paragraphs, and simple tables. However, there were minor discrepancies in the table formatting. The experiment also found that scanned documents resulted in silent failures, outputting only a single newline character and exiting with a status code of 0.
For the MCP (Multi-Component Process) part of the experiment, the JSON-RPC protocol was used for communication between the markitdown-mcp process and the AI assistant. The initialize command responded with server information, including the server name "markitdown" and version "2025-06-18". The tools/list command returned a single tool named "convert_to_markdown", which accepted input in the form of a URI string.
The tools/call command successfully converted a PDF file to Markdown, returning the complete Markdown content as the output.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.