Local documents to Markdown (MCP)
Use the anydoc MCP tools. Conversion runs on the user's machine. No API key. Do not upload the file to a hosted parse API unless the user asks.
Tools
| Tool | When to use |
|---|---|
convert_document |
You have a filesystem path to a PDF/Office file |
convert_base64 |
You only have file bytes in context (needs format or filename) |
list_formats |
Confirm supported extensions |
Workflow
- Prefer
convert_documentwith an absolute path when possible. - For large documents, pass
output_path(e.g../report.md) and read only the sections you need. - Use
formatonly for CSV or when the extension is missing/wrong. - If conversion fails on a scanned PDF, say OCR is required. This server is not OCR.
Defaults
- Tool choice:
convert_documentwith an absolute path. - Large files: set
output_pathand read slices from the written.md. - Unknown extension: call
list_formatsor pass explicitformat.
Error scenarios
| Symptom | Action |
|---|---|
| Scanned or image-only PDF | Tell the user OCR is not supported here; suggest an OCR pipeline elsewhere. |
| Unknown or unsupported extension | list_formats; fix path or pass format. |
convert_base64 without format |
Require format or a filename with a known extension. |
| MCP server not connected | Ask the user to add mcp-server-anydoc to MCP config, then retry. |
Rules
- Prefer MCP tools over
npx @firecrawl/anydocshell-outs when this server is connected. - Never claim the file left the machine. Conversion is local.
- Do not invent OCR, image extraction, or edit-in-place features.