Every organization runs on documents — and on the brittle scripts that move them between formats. Word reports become PDFs, spreadsheets become CSVs, scans become searchable files. Each new format or rule means rewriting a pipeline. There’s a more flexible way: let an AI agent do the conversions, on your own infrastructure, using the tools you give it. This article shows how to build exactly that with n8n, the Model Context Protocol (MCP), and the GroupDocs.Conversion MCP server — keeping your documents (and optionally your AI model) entirely on‑premise.

From hardcoded pipelines to agentic automation

Traditional automation encodes how a task is done: detect the file type, branch, call the converter, handle errors, write the output. Every new requirement is a code change.

An agentic workflow encodes what you want. You state the goal — “convert these reports to PDF, but check the page count first” — and expose a set of tools. The AI agent decides which tools to call and in what order, and adapts to the result. Add a tool and the agent can use it immediately, with no rewiring. That adaptability is the whole point.

What is MCP, and why it matters here

The hard part of tool‑using agents has always been integration — every agent talked to every tool differently. The Model Context Protocol is an open, vendor‑neutral standard that fixes this: any MCP‑aware agent can discover and call any MCP server’s capabilities. Think of it as “USB‑C for AI tools.”

GroupDocs publishes document operations as MCP servers. The GroupDocs.Conversion server exposes three tools an agent can call:

Tool What it does
convert Konwertuje dokument do innego formatu (PDF, DOCX, XLSX, PPTX, HTML, PNG, CSV… ponad 70 formatów)
get_document_info Inspekcja pliku — typ, liczba stron, właściwości — przed podjęciem działania
get_supported_formats Odkrywa, które konwersje są możliwe

Because it speaks MCP, your agent needs no custom GroupDocs integration. It just sees tools.

The architecture (all open‑source, bring your own LLM)

Layer Component Role
Orchestration n8n (self‑hosted) wyzwalacze, węzeł AI Agent, routowanie plików
Reasoning Your LLM, via n8n’s Chat Model node decyduje, które narzędzia wywołać — w pełni wymienialny
Tools GroupDocs.Conversion MCP (stdio) behind supergateway convert, get_document_info, get_supported_formats
Storage a shared Docker volume jak pliki przepływają w i out

A key design choice: the LLM is pluggable. n8n’s Chat Model node is provider‑agnostic, so the agent and the MCP tools never change when you swap models. The example below uses OpenAI, but the same workflow runs on Azure OpenAI, Anthropic, AWS Bedrock — or a fully self‑hosted model (Ollama, vLLM) when you need an air‑gapped deployment where the documents and the AI stay inside your network.

One integration note: the Conversion MCP is a lightweight stdio server (the secure, no‑network default). Since n8n connects to MCP tools over a URL, a small open‑source stdio‑to‑SSE bridge (supergateway) exposes it on a port. The server itself is unchanged.

How the workflow runs

  1. Trigger — webhook, przychodzący e‑mail, formularz uploadu lub obserwowany folder otrzymuje dokument.
  2. Stage — n8n zapisuje plik w udostępnionym folderze, z którego odczytuje serwer MCP.
  3. Reason — n8n AI Agent (twój Chat Model + Conversion MCP jako narzędzie) otrzymuje instrukcję typu “Convert report.docx to PDF and report the page count.” Samodzielnie wywołuje get_document_info, a potem convert.
  4. Deliver — n8n pobiera skonwertowany plik z udostępnionego storage i kieruje go dalej — e‑mail, storage obiektowy, SharePoint lub pierwotną odpowiedź.

Agent wybiera narzędzia i kolejność. To pozwala jednemu workflow obsłużyć “just convert this,” “convert only if it’s over 10 pages,” lub “convert and summarize.”

Stand it up in minutes

A minimal stack is two services sharing one volume — the converter (behind the bridge) and n8n:

services:
  conversion-mcp:                    # GroupDocs.Conversion MCP, exposed over SSE
    build: ./bridge                  # supergateway --stdio "groupdocs-conversion-mcp" --port 8000
    environment:
      GROUPDOCS_MCP_STORAGE_PATH: /data
      GROUPDOCS_LICENSE_PATH: /license/GroupDocs.Total.lic
    volumes: [ ./data:/data, ./gd-license:/license:ro ]
  n8n:
    image: n8nio/n8n:latest
    ports: ["5678:5678"]
    volumes: [ ./data:/data ]        # SAME folder — the file hand‑off

Then in n8n, build the agent in four nodes: a Chat Trigger, a Chat Model (your OpenAI credential), an MCP Client tool pointing at http://conversion-mcp:8000/sse, and an AI Agent that wires them together. Drop a file in ./data, open the chat, and ask the agent to convert it.

The complete, runnable setup — docker-compose.yml, the bridge image, and an importable n8n workflow — is in the companion open‑source repository (see below).

Licensing

Without a license, GroupDocs.Conversion runs in evaluation mode: output is watermarked and usage may be limited. For production, drop a GroupDocs.Total.lic file into the mounted license folder — output is then clean and unrestricted. You can request a temporary license to try licensed output.

Why this fits the enterprise

  • Data sovereignty — dokumenty i silnik konwersji pozostają w Twojej infrastrukturze. Wybierz model self‑hosted i AI również zostanie hostowane lokalnie.
  • No lock‑in — każdy poziom jest open source lub oparty na standardach (MCP). Swobodnie wymieniaj LLM, orchestrator lub narzędzia.
  • Auditability — każda decyzja agenta i wywołanie narzędzia są widoczne, odtwarzalne w wykonaniu n8n.
  • Composability — to korzyść kumulatywna. Skieruj tego samego agenta do innych serwerów GroupDocs MCP — Redaction, Watermark, Metadata — i jedno żądanie w języku naturalnym staje się pełnym pipeline: “redact the PII, convert to PDF, then watermark it ‘Confidential’.”

Get started

  • Companion open‑source demo: GroupDocs.Conversion.Agentic — sklonuj repozytorium, dodaj swój klucz LLM, docker compose up, i zacznij rozmawiać ze swoimi dokumentami.
  • NuGet: GroupDocs.Conversion.Mcp
  • Docker image: ghcr.io/groupdocs-conversion/conversion-net-mcp
  • Learn more about MCP: modelcontextprotocol.io

Agentic document automation isn’t a far‑off idea — it’s a docker compose up away, built from parts you can read, host, and trust. Give your AI agents the ability to convert documents, on your terms.