To batch convert a folder with an AI agent, point the GroupDocs.Conversion.Mcp server at the folder and describe the job in one sentence. The agent works through the files, calls the conversion engine once per document, and reports what it produced, all locally in Claude, Cursor or GitHub Copilot. It is batch processing driven by a sentence:
Convert every DOCX in my documents folder to PDF, keep the originals
The step-by-step version with config and troubleshooting is in the documentation: How to batch-convert a folder of documents with an AI agent. This post walks through the same job as a short session, from the first prompt to handling failures.
คุณเริ่มต้นที่ไหน: โฟลเดอร์จัดเก็บหรือพรอมต์?
Start with the storage folder. A batch job succeeds or fails on the folder mapping, and the mapping is set once in the server entry, not in each prompt. Two environment variables control it:
{
"mcpServers": {
"groupdocs-conversion": {
"type": "stdio",
"command": "dnx",
"args": ["GroupDocs.Conversion.Mcp", "--yes"],
"env": {
"GROUPDOCS_MCP_STORAGE_PATH": "/path/to/invoices",
"GROUPDOCS_MCP_OUTPUT_PATH": "/path/to/invoices/converted"
}
}
}
}
GROUPDOCS_MCP_STORAGE_PATH is the folder the agent can read. GROUPDOCS_MCP_OUTPUT_PATH is where converted files land. With both set, the source folder stays untouched and every result goes to converted. This is the cleanest layout for a batch. The dnx command needs the .NET 10 SDK; the Docker image ghcr.io/groupdocs-conversion/conversion-net-mcp:latest mounts the folder as /data. Restart Claude Desktop, Claude Code, VS Code or Cursor after you register the server.
พรอมต์แรกทำอะไร?
Give the agent the simple case first:
Convert everything in this folder from DOCX to PDF.
The agent enumerates the folder and calls the convert tool for each file with format: "pdf". Each call takes a file name from storage and returns the saved file name. Run it twice and the second run creates new, distinctly named files next to the first.
คุณเพิ่มตัวกรองหรือกฎอย่างไร?
The prompt is the orchestration layer. Filtering, sequencing and an error policy are plain language:
Turn all the PDFs into Markdown; skip files that are already converted.
Convert the invoices to PDF/A for archiving, and list any file that failed.
Make PNG previews of every presentation.
For sequencing, the agent can call get_document_info first, which returns file type, page count and basic properties without converting:
Check the page count of each PDF first, and only convert the ones with more than 10 pages.
The decision “more than 10 pages” is the agent’s. The conversion remains the engine’s.
เกิดอะไรขึ้นเมื่อไฟล์หนึ่งล้มเหลว?
When the engine cannot convert a file, for example because the source format is unsupported or the password is wrong, the response text for that file starts with the operation and the reason. A file name that does not exist returns the list of files the server can see so the agent can correct itself. For protected files, convert accepts an optional password parameter.
That is why a failure policy belongs in the prompt: “list any file that failed” asks the agent for a report at the end of the run, so a failure does not pass unnoticed. Read the report and re-run only the failures.
ตัวอย่างเซสชัน
This is an abridged, illustrative session. The file names are invented and the reply is built from documented behavior, not a screenshot.
You: Convert the invoices to PDF/A for archiving, and list any file that failed.
Agent: [enumerates the invoice files]
Agent: [calls convert for each file, one at a time]
Agent: Converted 11 files to the output folder.
Failed: invoice-0412.docx (password-protected, no password given).
คุณติดตามความคืบหน้าในโฟลเดอร์ขนาดใหญ่อย่างไร?
The agent usually processes files one after another, so run time grows with the number of files and their size. For progress reporting, ask for it in the prompt: “tell me after every ten files” or “summarize at the end”. A few hundred documents work fine, and the final report tells you what happened. Start with a copy of a small subset, check two or three outputs by eye, and then run the full folder.
ถ้าต้องรันแบตช์โดยไม่มีผู้ดูแลล่ะ?
An agent session needs a person to start it. For scheduled pipelines, the n8n walkthrough shows a workflow tool driving the same server, and the engine is also scriptable through the GroupDocs.Conversion .NET library. Use the chat for ad hoc batches where you want to read the report.
ขีดจำกัดคืออะไร?
- Evaluation mode caps a batch at 15 documents. หากไม่มีลิขสิทธิ์ กระบวนการเซิร์ฟเวอร์หนึ่งสามารถเปิดไฟล์ได้สูงสุด 15 ไฟล์และผลลัพธ์จะมีลายน้ำการประเมิน หลังจากนั้นการเรียกต่อไปจะล้มเหลวจนกว่าเซิร์ฟเวอร์จะรีสตาร์ท ตรวจสอบโหมดด้วย
get_license_statusก่อนเริ่มแบตช์จริง หรือถามว่า “สถานะลิขสิทธิ์ของเซิร์ฟเวอร์การแปลงคืออะไร?” - Metered licensing needs outbound access. เมื่อใช้คีย์แบบตามการใช้งาน การใช้จะถูกส่งรายงานไปยังเซิร์ฟเวอร์ของ GroupDocs ดังนั้นเครื่องที่อยู่หลังไฟร์วอลล์ควรใช้ไฟล์ลิขสิทธิ์ เนื้อหาเอกสารจะไม่ถูกส่งออก
- Scans stay images. OCR ไม่ได้เป็นส่วนหนึ่งของเซิร์ฟเวอร์ ดังนั้นแบตช์ของ PDF ที่เป็นภาพเท่านั้นจะไม่เพิ่มชั้นข้อความ
คำถามที่พบบ่อย
ฉันจะทำการแปลงไฟล์ DOCX ทั้งหมดในโฟลเดอร์เป็น PDF ด้วย AI อย่างไร?
ตั้งค่าโฟลเดอร์จัดเก็บ แล้วขอให้เอเจนต์ทำตามนั้นในหนึ่งประโยค มันจะแปลงไฟล์ทีละไฟล์ผ่านเซิร์ฟเวอร์ในเครื่องและไม่มีการอัปโหลดใด ๆ
เอเจนต์ AI สามารถประมวลผลโฟลเดอร์ทั้งหมดในเครื่องได้หรือไม่?
ได้เลย เอเจนต์และเซิร์ฟเวอร์การแปลงทำงานบนเครื่องของคุณและไฟล์จะถูกอ่านและเขียนลงในโฟลเดอร์ของคุณเอง
วิธีที่ดีที่สุดในการทำอัตโนมัติ pipeline การแปลงเอกสารคืออะไร?
ใช้แชทสำหรับแบตช์แบบอาดฮ็อกที่คุณต้องการตรวจสอบ สำหรับ pipeline ที่ทำงานตามกำหนดเวลา ให้ควบคุมเซิร์ฟเวอร์เดียวกันผ่านเครื่องมือ workflow เช่น n8n หรือสคริปต์ด้วยไลบรารี .NET
ศึกษาเพิ่มเติม
- เอกสารคู่มือแบบมาตรฐาน: How to batch-convert a folder of documents with an AI agent
- ศูนย์รวมเอกสาร: GroupDocs.Conversion MCP Server
- เริ่มต้นที่นี่: Why your AI agent should not convert documents by itself
- ที่เกี่ยวข้อง: 3 ways to turn PDFs into LLM-ready Markdown (and why local wins)
- ที่เกี่ยวข้อง: Automate report delivery: let the agent write Markdown and ship Word
- ประกาศ: Your AI Agent Can Now Convert Documents — Locally. Introducing GroupDocs.Conversion MCP
- โมเดลการใช้งานในองค์กรและความปลอดภัย: 3 architectures for AI document processing, and the one that keeps files inside your network
- คำถาม: GroupDocs Conversion forum
- แหล่งที่มา: GroupDocs.Conversion.Mcp on GitHub