MCP server for converting files to Markdown (via MarkItDown) and Markdown to PDF
SaferSkills independently audited flexberry-markitdown-mcp (MCP Server) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
MCP-сервер для двунаправленной конвертации документов:
Использует:
pip install flexberry-markitdown-mcpВсё! При первом вызове convert_to_pdf Chromium скачается автоматически (как в vscode-markdown-pdf).
# Легковесный бэкенд без браузера (не поддерживает JS-рендеринг)
pip install flexberry-markitdown-mcp[weasyprint]
# Для разработки
pip install flexberry-markitdown-mcp[dev]convert_to_markdown)convert_to_pdf){
"mcpServers": {
"flexberry-markitdown": {
"command": "python3",
"args": ["-m", "flexberry_markitdown_mcp.server"]
}
}
}{
"mcpServers": {
"flexberry-markitdown": {
"command": "uv",
"args": [
"--directory", "/path/to/flexberry-markitdown-mcp",
"run", "flexberry-markitdown-mcp"
]
}
}
}convert_to_markdownКонвертирует файл любого поддерживаемого формата в Markdown.
| Параметр | Тип | Обязательный | Описание |
|---|---|---|---|
file_path | string | ✅ | Абсолютный путь к файлу |
output_path | string | ❌ | Пользовательский путь вывода |
overwrite | boolean | ❌ | Перезаписать существующий (по умолч.: false) |
convert_to_pdfКонвертирует Markdown-файл в PDF. Бэкенд по умолчанию — Playwright (как в vscode-markdown-pdf).
| Параметр | Тип | Обязательный | Описание |
|---|---|---|---|
file_path | string | ✅ | Абсолютный путь к .md файлу |
output_path | string | ❌ | Пользовательский путь вывода PDF |
backend | string | ❌ | "playwright" (по умолч.) или "weasyprint" |
overwrite | boolean | ❌ | Перезаписать существующий (по умолч.: false) |
custom_css | string | ❌ | Дополнительный CSS |
include_default_styles | boolean | ❌ | Включить встроенные стили (по умолч.: true) |
format | string | ❌ | Формат бумаги: A4, Letter и т.д. (по умолч.: A4) |
margin_top | string | ❌ | Верхнее поле (по умолч.: 1.5cm) |
margin_bottom | string | ❌ | Нижнее поле (по умолч.: 1cm) |
margin_left | string | ❌ | Левое поле (по умолч.: 1cm) |
margin_right | string | ❌ | Правое поле (по умолч.: 1cm) |
print_background | boolean | ❌ | Печатать фон (по умолч.: true) |
display_header_footer | boolean | ❌ | Колонтитулы (по умолч.: true, Playwright) |
get_supported_formatsСписок поддерживаемых форматов и доступные PDF-бэкенды.
check_file_existsПроверяет существование файла и возвращает информацию.
list_directoryПоказывает содержимое директории.
┌──────────────────────────────────────────────────────┐
│ MCP Server (stdio) │
├──────────────────────────────────────────────────────┤
│ │
│ convert_to_markdown convert_to_pdf │
│ ┌───────────────┐ ┌──────────────────┐ │
│ │ MarkItDown │ │ markdown-it-py │ │
│ │ (any→MD) │ │ (MD→HTML) │ │
│ └───────┬───────┘ └────────┬─────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌───────────────┐ ┌──────────────────┐ │
│ │ Atomic write │ │ HTML template │ │
│ │ (MD to disk) │ │ + GitHub CSS │ │
│ └───────────────┘ └────────┬─────────┘ │
│ │ │
│ ┌─────────┴──────────┐ │
│ ▼ ▼ │
│ ┌──────────────┐ ┌────────────┐ │
│ │ Playwright │ │ WeasyPrint │ │
│ │ (DEFAULT) │ │ (optional) │ │
│ │ Chromium │ │ Pure Python│ │
│ │ auto-d/l │ │ No JS │ │
│ └──────┬───────┘ └─────┬──────┘ │
│ ▼ ▼ │
│ ┌─────────────────────────────┐ │
│ │ PDF saved to disk │ │
│ └─────────────────────────────┘ │
└──────────────────────────────────────────────────────┘| Характеристика | Playwright (по умолч.) | WeasyPrint (опционально) |
|---|---|---|
| Установка | Автоматически при pip install | pip install ...[weasyprint] |
| Chromium | Автозагрузка при первом запуске | Не нужен |
| JavaScript | ✅ Полная поддержка | ❌ |
| Mermaid/PlantUML | ✅ | ❌ |
| Колонтитулы | ✅ Номера страниц | Через CSS @page |
| Рекомендация | Все документы | Легковесный fallback |
Журналы сервера сохраняются в:
~/.flexberry-markitdown-mcp/server.logC:\Users\<user>\.flexberry-markitdown-mcp\server.logpip install flexberry-markitdown-mcppip install flexberry-markitdown-mcpУбедитесь, что в терминале используется кодировка UTF-8. Сервер автоматически устанавливает UTF-8 для stdin/stdout/stderr.
Установите Tesseract:
sudo apt install tesseract-ocr (Ubuntu/Debian)Для русского языка установите языковой пакет:
sudo apt install tesseract-ocr-rusMarkItDown использует Azure Speech Services для транскрипции. Убедитесь, что переменные среды настроены.
playwright install chromiumpip install -e ".[dev]"
pytestflexberry-markitdown-mcp/
├── src/
│ └── flexberry_markitdown_mcp/
│ ├── __init__.py
│ ├── converter.py # MD → PDF конвертация
│ ├── server.py # MCP сервер
│ └── styles.py # CSS стили для PDF
├── tests/
│ └── test_converter.py
├── pyproject.toml
└── README.mdMIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.