Skip to main content
Glama

mdfi-connect

MCP stdio server that lets coding agents (Claude Code, Cursor) read documents through the mdfi cloud API: PDFs and scans, Word, PowerPoint, Excel, HTML, email, images and text. Tables come back structured, anything uncertain is marked, and tables can be exported to CSV.

Install

Claude Code:

claude mcp add mdfi --env MDFI_API_KEY=mdfi_... --env MDFI_API_URL=https://api.mdfi.ai -- uvx mdfi-connect

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "mdfi": {
      "command": "uvx",
      "args": ["mdfi-connect"],
      "env": { "MDFI_API_KEY": "mdfi_...", "MDFI_API_URL": "https://api.mdfi.ai" }
    }
  }
}

Claude Code plugin (asks for your key when you install it and keeps it as a sensitive setting; runs the plugin's own locked project with uv run --locked):

/plugin marketplace add TopTop-Oy/mdfi-connect
/plugin install mdfi@mdfi

Cursor plugin (once listed in the Cursor Marketplace): install mdfi and set MDFI_API_KEY under Plugins → Configure.

The Connect page of your mdfi dashboard (https://app.mdfi.ai) shows these snippets with your key filled in. Plans and pricing: https://mdfi.ai/docs/pricing/

Related MCP server: Xberg MCP Server

Configuration

  • MDFI_API_KEY (required): create one on the Connect page of your mdfi dashboard.

  • MDFI_API_URL (optional): defaults to https://api.mdfi.ai.

Nothing else is configurable.

Tools

  • read_document(path): uploads the file (only if mdfi has not seen it before) and returns the outline (before conversion only for PDFs with bookmarks and PowerPoint decks with slide titles; for other files once their pages are converted), the text of the ready pages and a header with the document id, quality and uncertainty. It waits up to 20 seconds; a large document keeps converting, so call it again with the same path (no re-upload, no extra charge).

  • read_pages(document_id, pages | section): specific pages ("3,7,9-11") or the pages under one outline heading. Free. If the page quality flags cannot be loaded, the text still comes back with a ⚠ line saying so.

  • export_table(document_id, table, path, overwrite): writes one table to CSV. The table id comes from the table's label in the page text, e.g. p13-t1 from [table p13-t1 — 42 rows × 6 cols]. Default ./mdfi-tables/<file-stem>-<table-id>.csv. Free. Only once the document is ready (while it converts, a page still being enhanced can extend a table).

Only real concerns get a ⚠. Clean scans are listed once (read from scans: pages 1–40), and informational table notes (read by vision, combined header, continues on a page) are shown plain. The header does not show the pages left this month (the API does not expose it). document_id must be the id read_document printed.

A document is charged once, when conversion finishes. read_pages and export_table never charge.

Guards

  • Reads: only supported file types (pdf, docx, pptx, xlsx, html, htm, eml, png, jpg, jpeg, tif, tiff, bmp, gif, webp, txt, md). Symbolic links are resolved first. Hidden files and folders are refused.

  • CSV export: .csv paths only, inside the working directory. Existing files are never overwritten unless overwrite=true; symbolic links are refused. UTF-8 with a byte-order mark, header row, standard quoting.

  • A table with notes (problems or informational) gets a <name>.csv.notes.txt beside the CSV. Both files are written to temporary files and renamed into place once complete (the notes first), so a failed write never leaves a partial CSV or a notes file without its CSV; an overwritten file keeps its permissions. Non-numeric cells starting with =, +, - or @ are written with a leading ' so spreadsheets do not run them as formulas; the notes file states how many.

Development

uv run pytest -q
uv run ruff check src tests

Dependencies: mcp>=1.2,<3 and httpx only. Licence: Apache-2.0. This is the client only: it holds no conversion code and calls the hosted mdfi API.

Available Tools

3 tools
export_tableA

Write one table from a document already opened with read_document to a CSV file in the working directory (default ./mdfi-tables/-.csv, UTF-8 with a header row). The table id comes from the table's label in the page text, e.g. [table p13-t1 — …]. A table with notes gets a .notes.txt file beside the CSV; never overwrites unless overwrite=true. Only once the document is ready. Free: never charges.

Inputs: table (required), document_id (required), path, overwrite. Returns: result

read_documentA

Read a local PDF, Word, PowerPoint, Excel, HTML, email or image file as clean text. Handles scans and complex tables, and marks anything uncertain. Prefer this over reading such files directly.

Inputs: path (required). Returns: result

read_pagesA

Read specific pages of a document already opened with read_document. Pass pages (e.g. "3,7,9-11") or section (a heading from the outline), not both. Free: never charges.

Inputs: document_id (required), pages, section. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 3 tools

    Disambiguation4/5

    read_document and read_pages both read document content, but the descriptions clearly distinguish opening a document from reading specific pages of an already-opened document. export_table is clearly separate, targeting CSV extraction of a specific table.

    Naming Consistency5/5

    All three tools follow a consistent verb_noun snake_case pattern: read_document, read_pages, export_table. The naming is predictable and readable throughout.

    Tool Count5/5

    Three tools are well-scoped for a document-reading and table-export server, with each tool covering a distinct stage of the workflow. There is no obvious filler or redundancy.

    Completeness4/5

    The surface covers opening documents, reading targeted pages/sections, and exporting tables, which is coherent for the apparent read-only document-access domain. Minor gaps might include document metadata or searching across documents, but the core workflow is complete.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables Claude and other MCP-compatible agents to process documents, extract structured data, detect PII, and export LLM-ready datasets through natural language tool calls.
      8
      71 PyPI
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that extracts clean text, tables, and structured data from documents, images, code, and audio files, supporting 97 formats with OCR, transcription, and code intelligence.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to extract structured data from PDFs with confidence scores and provenance, and to search, review, and correct documents via MCP tools, resources, and prompts.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Extracts text and tables from PDFs for AI agents via MCP, enabling structured data retrieval from invoices, reports, and statements.
      49 PyPI
      1
      MIT