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 Convert a document to another format (PDF, DOCX, XLSX, PPTX, HTML, PNG, CSV… 70+ formats)
get_document_info Inspect a file — type, page count, properties — before acting
get_supported_formats Discover which conversions are possible

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) triggers, the AI Agent node, file routing
Reasoning Your LLM, via n8n’s Chat Model node decides which tools to call — fully swappable
Tools GroupDocs.Conversion MCP (stdio) behind supergateway convert, get_document_info, get_supported_formats
Storage a shared Docker volume how files flow in and 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 — a webhook, inbound email, form upload, or watched folder receives a document.
  2. Stage — n8n writes the file into the shared storage folder the MCP server reads from.
  3. Reason — the n8n AI Agent (your Chat Model + the Conversion MCP as a tool) receives an instruction like “Convert report.docx to PDF and report the page count.” It autonomously calls get_document_info, then convert.
  4. Deliver — n8n picks the converted file from shared storage and routes it onward — email, object storage, SharePoint, or the original response.

The agent chooses the tools and the order. That’s what lets a single workflow handle “just convert this,” “convert only if it’s over 10 pages,” or “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 — documents and the conversion engine stay on your infrastructure. Choose a self-hosted model and the AI does too.
  • No lock-in — every layer is open source or standards-based (MCP). Swap the LLM, the orchestrator, or the tools freely.
  • Auditability — every agent decision and tool call is a visible, replayable n8n execution.
  • Composability — this is the compounding benefit. Point the same agent at the other GroupDocs MCP servers — Redaction, Watermark, Metadata — and one natural-language request becomes a full pipeline: “redact the PII, convert to PDF, then watermark it ‘Confidential’.”

Get started

  • Companion open-source demo: GroupDocs.Conversion.Agentic — clone it, add your LLM key, docker compose up, and start talking to your documents.
  • 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.