Skip to main content
Glama

Frappe Files MCP

A clean, portable, open-source Frappe v16+ app that encapsulates Frappe's built-in MCP server and adds bidirectional ChatGPT file exchange, Desk-parity private attachment reading (with native MCP image vision and pure-Python document extraction), and on-demand Report & Document exports behind a single OAuth-protected Streamable HTTP endpoint.

Key Features

  • Unified 21-Tool MCP Endpoint: Exposes all 13 native frappe.mcp.tools alongside 8 file-exchange and report/document export tools at /api/method/frappe_files_mcp.mcp.gateway.endpoint.

  • Bidirectional ChatGPT File Exchange:

    • Inbound (openai/fileParams): upload_and_attach_files and create_document_with_files declare _meta["openai/fileParams"] = ["files"] with flattened JSON schemas so ChatGPT can upload user files directly.

    • SSRF-Hardened Streaming: HTTPS downloads use DNS-pinned public IP connections (PinnedHTTPSConnection), wildcard host allowlists, magic-byte validation, size/timeout budgets, and optional ClamAV scanning.

    • Outbound Inspection & Vision: get_attachment returns native MCP image blocks (including scanned PDF page rendering via pdftoppm), pure-Python text extraction for PDF, DOCX, XLSX, CSV, TXT, and JSON, plus frappe-file://delivery/<token> resource links and 5-minute single-actor authenticated download URLs.

  • On-Demand Reports & Document PDFs: list_reports, run_and_export_report (paginated JSON + .xlsx / .pdf), and export_document_pdf with Desk-parity permissions and optional Print Format allowlists.

  • Zero-Leak Diagnostics & Private Storage: Uploaded files default to is_private=1 with MCP File Proof SHA-256 metadata. Host allowlist rejections report only the hostname (never full URLs or query tokens).

Related MCP server: Frappe MCP Server

Quickstart

bench get-app https://github.com/ztechnium/frappe_files_mcp.git
bench --site <your-site> install-app frappe_files_mcp
bench --site <your-site> migrate
  1. Open System Settings in Frappe Desk and enable Enable MCP (under API/MCP settings).

  2. Open Frappe Files MCP Settings in Desk, verify Enable Frappe Files MCP is checked, and click Copy MCP URL.

  3. Connect your OAuth client (e.g., ChatGPT) to: https://<your-site>/api/method/frappe_files_mcp.mcp.gateway.endpoint

Tool Overview (21 Tools)

  • Frappe Core (13 tools): search_doctypes, get_doctype_schema, search_methods, get_method_schema, list_document_methods, list_documents, get_document, count_documents, create_document, update_document, delete_document, call_method, call_document_method

  • File Exchange & Exports (8 tools): get_file_capabilities, list_attachments, get_attachment, upload_and_attach_files, create_document_with_files, list_reports, run_and_export_report, export_document_pdf

See docs/tools-reference.md for full parameter schemas and examples.

Documentation

Running Tests

python -m unittest discover -s frappe_files_mcp/tests -v

License

MIT — see LICENSE.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      MCP server that enables LLMs to interact with ERPNext/Frappe sites for document CRUD, search, reports, workflows, and analytics, respecting user permissions and logging all actions.
      341
      AGPL 3.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI models to securely interact with Frappe Framework/ERPNext instances, supporting document CRUD, RPC methods, file management, workflows, reporting, and more via the Model Context Protocol.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that enables Claude, ChatGPT, and other LLMs to interact with ERPNext sites through natural language, supporting document CRUD, search, reports, workflows, and custom tools, while respecting user permissions and logging all calls.
      AGPL 3.0
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP-compatible AI clients to securely read data from customers' ERPNext/Frappe sites through a multi-tenant OAuth-protected gateway, with tools for listing, searching, counting, retrieving, and reporting on documents.
      -