Skip to main content
Glama

FlexFiles MCP server

Use FlexFiles from Claude, Cursor, VS Code and other AI apps. Ask "compress report.pdf", "merge these two PDFs" or "make this scan searchable", and the assistant runs the FlexFiles tool and saves the result next to your file.

It covers all 29 FlexFiles tools: compress, merge, split, convert to and from Word, Excel, PowerPoint, JPG, HTML and text, OCR, protect and unlock, repair, deskew, flatten, add pages, links, headers and footers, search and replace, remove annotations, and image convert, compress, enhance and background removal.

What you need

Related MCP server: mcp-file-servers

Set it up

Replace ff_your_key with your key in the snippets below.

Claude Code

claude mcp add flexfiles --env FLEXFILES_API_KEY=ff_your_key -- npx -y @flexfiles/mcp

Claude Desktop: Settings → Developer → Edit Config, then add to claude_desktop_config.json:

{
  "mcpServers": {
    "flexfiles": {
      "command": "npx",
      "args": ["-y", "@flexfiles/mcp"],
      "env": { "FLEXFILES_API_KEY": "ff_your_key" }
    }
  }
}

Cursor: the same mcpServers block in ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project).

VS Code (agent mode): .vscode/mcp.json. VS Code asks for the key once and stores it securely:

{
  "inputs": [
    { "type": "promptString", "id": "flexfiles-key", "description": "FlexFiles API key", "password": true }
  ],
  "servers": {
    "flexfiles": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@flexfiles/mcp"],
      "env": { "FLEXFILES_API_KEY": "${input:flexfiles-key}" }
    }
  }
}

Other apps that run local MCP servers take the same command (npx -y @flexfiles/mcp) and environment variable.

Tools

Tool

What it does

convert_file

Runs a FlexFiles tool on local files or https links, waits for the result (50 s by default) and saves it locally.

get_conversion

Checks a conversion that took longer and saves its result once it's done.

list_conversions

Lists recent conversions, newest first.

list_tools

Shows each tool's accepted files and settings (passwords, page ranges, formats).

get_account

Shows which FlexFiles account and plan the key uses.

Example requests:

  • "Compress ~/Documents/report.pdf as much as possible."

  • "Merge invoice-1.pdf and invoice-2.pdf, in that order."

  • "Convert contract.pdf to Word, pages 1 to 3 only."

  • "Protect payslip.pdf with the password I give you."

  • "Make scan.pdf searchable; it's in French."

Files and safety

  • Results are saved next to the first input file, or in the folder you name. Nothing is overwritten: when FlexFiles names the result like the original, it's saved as report - Compress PDF.pdf, and clashes get (1), (2). Your originals are never changed.

  • Only documents are sent. A local file is uploaded only when its content is a PDF, image, Word or HTML file of the kind the tool reads. Anything else (keys, .env files, archives, folders) is refused before upload, so a document asking the assistant to "compress ~/.ssh/id_rsa" gets nowhere.

  • Links: an https link is passed to FlexFiles, which downloads it itself (the link must be public and the download must finish within 15 seconds).

  • Files go to your FlexFiles account and are kept as your plan's retention rules say; see the privacy policy.

  • The key is sent only to the FlexFiles API, never to download links, and requests carrying it don't follow redirects.

Settings

Variable

Meaning

FLEXFILES_API_KEY

Your FlexFiles API key (required for conversions).

FLEXFILES_API_URL

API address; defaults to https://api.flexfiles.io/api/v1.

Long conversions: convert_file waits up to wait_seconds (50 by default), sending progress updates to apps that show them. A job still running after that comes back with a conversion_id; the assistant collects it later with get_conversion.

Usage counts against your plan's daily conversions and API limits (30 conversions a minute). FlexFiles records that a conversion came from this server (X-FlexFiles-Client: mcp-local/<version>) to count usage per integration.

Troubleshooting

  • "No FlexFiles API key is set": add FLEXFILES_API_KEY to the server's env and restart the app.

  • "API access is no longer available on your current plan": API keys need Pro or Business.

  • "… isn't a PDF, image, Word or HTML file": the file isn't a kind FlexFiles reads, or isn't what its name says.

  • Results land in an odd folder: some desktop apps start servers in /; pass save_to, or use absolute paths. Results of links go to the server's working folder, or to ~/Downloads when that's /.

Development

npm install
npm run typecheck
npm run build
npm test
npm run update-catalog   # refresh the bundled tool list from the API

The server reads the tool list from GET /api/v1/tools at startup and falls back to the bundled copy in src/catalogFallback.ts when the API can't be reached.

License

MIT

Available Tools

5 tools
convert_fileConvert fileA

Run a FlexFiles tool on local files or https links and save the result locally. Originals are never changed. Actions:

  • merge-pdf: Combine PDFs into one file, in the order given.

  • add-page-to-pdf: Insert the pages of a second PDF into the first one.

  • protect-pdf: Add a password to a PDF.

  • unlock-pdf: Remove the password from a PDF you know the password for.

  • search-and-replace: Find text in a PDF and replace it.

  • split-pdf: Split a PDF into several files with a fixed number of pages each.

  • remove-pdf-pages: Delete pages from a PDF.

  • add-header-footer: Add header and/or footer text to PDF pages.

  • add-link-to-pdf: Make URLs and email addresses in a PDF clickable, or link chosen text.

  • pdf-to-jpg: Turn PDF pages into JPG images.

  • pdf-to-word: Convert a PDF to an editable Word document (.docx).

  • html-to-pdf: Convert an HTML file to PDF.

  • pdf-to-html: Convert a PDF to an HTML page.

  • pdf-to-pptx: Convert a PDF to a PowerPoint presentation (.pptx).

  • pdf-to-txt: Extract the text of a PDF into a .txt file.

  • extract-pdf-images: Save the images inside a PDF as separate files.

  • pdf-to-excel: Extract tables from a PDF into an Excel workbook (.xlsx).

  • compress-pdf: Make a PDF file smaller.

  • convert-image: Convert images to another format (PNG, JPEG, WebP and more).

  • enhance-image: Upscale and sharpen images.

  • remove-background: Remove the background from images, or replace it with a colour or another image.

  • tiny-image: Make images smaller.

  • ocr-pdf: Make a scanned PDF's text searchable and selectable.

  • deskew-pdf: Straighten tilted scanned pages.

  • word-to-pdf: Convert a Word document (.doc or .docx) to PDF.

  • repair-pdf: Recover a damaged or corrupted PDF.

  • jpg-to-pdf: Combine images into one PDF, one image per page.

  • flatten-pdf: Bake form fields and annotations into the page so they can't be edited.

  • remove-annotations: Remove highlights, comments, drawings, form fields or links from a PDF. Settings go in options (call list_tools with the action to see them).

Inputs: files (required), action (required), options, save_to, +3 more. Returns: done, next, error, action, +13 more

get_accountFlexFiles accountA
Read-only

Show which FlexFiles account and plan the configured API key uses.

Inputs: no named parameters. Returns: name, plan, email, scopes, +2 more

get_conversionGet conversionA
Idempotent

Check a conversion started earlier; once it's completed, save the result locally (once) and return the paths and download links.

Inputs: conversion_id (required), save_to, download, wait_seconds. Returns: done, next, error, action, +13 more

list_conversionsList conversionsA
Read-only

List the account's finished conversions, newest first (website and API).

Inputs: limit, action, source, status. Returns: conversions

list_toolsList FlexFiles toolsA
Read-only

Show FlexFiles tools: the files each accepts and its settings (names, types, choices, defaults).

Inputs: action. Returns: tools, source

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 5 tools

    Disambiguation4/5

    Four of the five tools have clearly distinct roles: account info, polling a conversion, listing conversions, and inspecting the tool catalog. The only friction is convert_file, which bundles ~30 actions behind one name, so agents must read the action vocabulary rather than select a tool; get_conversion vs. list_conversions could also briefly be confused but descriptions clarify.

    Naming Consistency5/5

    All five top-level tools follow the same snake_case verb_noun pattern: convert_file, get_account, get_conversion, list_conversions, list_tools. The kebab-case action identifiers live inside convert_file's parameter space, so they don't break the tool-name convention.

    Tool Count4/5

    Five tools is a compact, well-scoped surface for an API that actually exposes 30+ operations, and the dispatcher pattern keeps the MCP surface small. It is slightly under-fragmented, however, since nearly all real work hides behind a single overloaded tool, forcing discovery via list_tools.

    Completeness4/5

    Coverage is broad: bidirectional conversions (PDF/Word/HTML/PPTX/Excel/TXT/JPG), PDF editing (merge, split, page ops, headers, links, protect/unlock, flatten, annotate removal, repair, compress, OCR, deskew), image processing, plus job status and catalog discovery. Gaps are minor, e.g. no cancel-conversion or delete/cleanup of stored results, but all core workflows have a path.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables file operations (PDF, Office, images, archives, media) through natural language, with tools for reading, writing, converting, and analyzing files locally.
      1
      -
    • A
      license
      C
      quality
      D
      maintenance
      Enables AI assistants to perform PDF operations like merge, split, compress, convert, encrypt, OCR, and summarize using natural language.
      98
      8 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to perform file operations through the GigAI Tools API, such as merging PDFs, converting and compressing images, extracting PDF text, and generating QR codes, with results saved locally and tools synced from the live API catalog.
      MIT