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.
Kodlanmış boru hatlarından ajan tabanlı otomasyona
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.
MCP nedir ve burada neden önemlidir
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:
| Araç | Ne işe yarar |
|---|---|
convert |
Bir belgeyi başka bir formata dönüştürür (PDF, DOCX, XLSX, PPTX, HTML, PNG, CSV… 70+ format) |
get_document_info |
Dosyayı inceler — tür, sayfa sayısı, özellikler — işlem yapmadan önce |
get_supported_formats |
Hangi dönüşümlerin mümkün olduğunu keşfeder |
Because it speaks MCP, your agent needs no custom GroupDocs integration. It just sees tools.
Mimari (tamamen açık kaynak, kendi LLM’nizi getirin)
| Katman | Bileşen | Rol |
|---|---|---|
| Orkestrasyon | n8n (self-hosted) | tetikleyiciler, AI Ajan düğümü, dosya yönlendirme |
| Mantık | Your LLM, via n8n’s Chat Model node | hangi araçların çağrılacağını belirler — tamamen değiştirilebilir |
| Araçlar | GroupDocs.Conversion MCP (stdio) behind supergateway | convert, get_document_info, get_supported_formats |
| Depolama | a shared Docker volume | paylaşılan bir Docker hacmi — dosyaların nasıl içeri ve dışarı akacağını |
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.
İş akışı nasıl çalışır
- Trigger — bir webhook, gelen e‑posta, form yükleme veya izlenen klasör bir belge alır.
- Stage — n8n dosyayı MCP sunucusunun okuduğu paylaşılan depolama klasörüne yazar.
- Reason — n8n AI Agent (Chat Model’iniz + Conversion MCP bir araç olarak) “report.docx dosyasını PDF’ye dönüştür ve sayfa sayısını raporla.” gibi bir talimat alır. Otonom olarak
get_document_infoardındanconvertçağırır. - Deliver — n8n dönüştürülmüş dosyayı paylaşılan depolamadan alır ve e‑posta, nesne depolama, SharePoint veya orijinal yanıt gibi bir hedefe yönlendirir.
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.”
Dakikalar içinde kurun
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).
Lisanslama
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.
Neden kurumsal ortama uygun
- Data sovereignty — belgeler ve dönüşüm motoru altyapınızda kalır. Kendinize ait bir model seçin, AI da aynı şekilde kalır.
- No lock‑in — her katman açık kaynak veya standart‑tabanlı (MCP). LLM, orkestratör veya araçları özgürce değiştirin.
- Auditability — her ajan kararı ve araç çağrısı görünür, yeniden oynatılabilir bir n8n yürütmesi olarak kaydedilir.
- Composability — bu, birikimli faydadır. Aynı ajanı diğer GroupDocs MCP sunucularına — Redaction, Watermark, Metadata — yönlendirin ve tek bir doğal dil isteği tam bir boru hattına dönüşür: “PII’yi gizle, PDF’ye dönüştür, ardından ‘Confidential’ damgası ekle.”
Başlayın
- Companion open‑source demo: GroupDocs.Conversion.Agentic — klonlayın, LLM anahtarınızı ekleyin,
docker compose upçalıştırın ve belgelerinizle konuşmaya başlayın. - 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.