You can have an AI agent put its review comments inside the document instead of in the chat. The GroupDocs.Annotation.Mcp server lets an LLM in Claude, Cursor or GitHub Copilot add highlights, notes and strikeouts to a PDF, Word, Excel or PowerPoint file, and it writes them locally on your machine:

Highlight the payment clause on page 2 and add a note asking legal to confirm.

The step‑by‑step version with config and troubleshooting is in the documentation: How to annotate documents with AI agents using MCP.

為什麼在聊天視窗中的 AI 反饋會遺失?

Ask an assistant to review a contract and you get a list: “Clause 4 shifts liability, clause 7 has an open date.” The list lives in a conversation. The colleague who opens the contract next week sees none of it, and you have to copy each point back to the right paragraph by hand.

The agent is not the problem. It lacks a way to write into the file. A review is only useful where the reader will meet it, which is next to the text it refers to.

錯誤做法是什麼樣子?

The common workaround is to paste the document text into a chat and ask for comments. Three things go wrong, and you can check each on a document of your own:

  • The comments carry no position. “Page 2, second paragraph” is a description you must resolve yourself.
  • The result is a transcript, not a deliverable. Nothing can be sent to the next reviewer except a screenshot or a pasted block.
  • The document is unchanged, so the review cannot be filtered, counted or carried to the next draft.

正確做法是什麼:使用 AI 代理為文件加註?

Split the work by what each side is good at. The agent understands the instruction “flag anything that shifts risk to us”. The engine writes a real annotation into the real file. The tool that does the writing is add_annotation. It accepts seven annotation types: textfield, area, point, arrow, highlight, underline and strikeout. Its arguments are the file, the type, the text, a 1‑based page number and x/y document coordinates.

The result is saved as <name>_annotated.<ext> next to your original. The original is never modified. The same call works across the 50+ formats the engine handles, so a Word draft and a PDF are marked up the same way.

哪些工具能確保標註位置正確?

Coordinates are the weak point of any agent that cannot see the page, and the documentation says so plainly. Three tools reduce the guesswork:

  • get_document_info returns the file type, page count and size, plus per‑page width and height when the engine reports them, which gives the agent a page box to reason about.
  • get_annotations returns existing annotations with their bounding boxes, which the agent can use as anchors.
  • generate_pages_preview renders a page as an image so a vision‑capable model can locate the text before it annotates. It currently fails for PDF files on Linux; see the limits below.

串聯標註時唯一的陷阱是什麼?

Every writing tool saves a new file. A second annotation must be applied to the file the first call produced, not to the original, or the first annotation stays behind in a file nobody opens again. Say it in the prompt:

Highlight the payment clause, then on the resulting file strike out the old delivery date.

範例會話(節錄)

This is an illustration built from the documented behavior of the tools, not a captured screenshot.

You:   Highlight the payment clause on page 2 of contract.pdf and add a note
       asking legal to confirm.

Agent: [calls get_document_info on contract.pdf]
       contract.pdf is a PDF with 6 pages.
       [calls add_annotation: type=highlight, page=2, x=100, y=250,
        text="Legal to confirm these payment terms"]
       Added highlight annotation to contract.pdf on page 2.
       The annotated copy is contract_annotated.pdf. Your original is unchanged.

如何在我的 AI 客戶端啟動標註伺服器?

To run it as a container, mount the folder with your documents at /data:

docker run --rm -i -v $(pwd)/documents:/data \
  -e GROUPDOCS_MCP_OUTPUT_PATH=/data/output \
  ghcr.io/groupdocs-annotation/annotation-net-mcp:latest

If you would rather not use a container, install the .NET 10 SDK and launch dnx GroupDocs.Annotation.Mcp --yes; on Windows this is also the channel to use for PDF page previews. The hub page has ready‑made registration snippets for Claude Desktop, Claude Code, VS Code with GitHub Copilot, Cursor, Windsurf and other clients. Set GROUPDOCS_MCP_OUTPUT_PATH to a folder other than the storage folder before chaining edits on a produced file. With the default (outputs land in the storage folder) the second write fails with being used by another process; with a separate output folder add_reply, update_annotation and remove_annotations on the produced file all succeed. With the Docker image, pass -e GROUPDOCS_MCP_OUTPUT_PATH=/data/output. After registration the client launches the server itself and talks to it over stdio, so nothing listens on a network port and the server sends no document content to a cloud service.

誠實的限制

  • Evaluation mode. Without a license, a trial badge is stamped at the top of every page, so annotated output is not distributable. Ask “What is the license status of the annotation server?” first; the agent calls get_license_status.
  • Placement is approximate without help. An agent that guesses x/y from a prompt places an area or point annotation approximately. Read first or render first for precise placement.
  • Preview on Linux. generate_pages_preview currently fails for PDF files on Linux, including the Docker image (TypeInitializationException for Gdip: System.Drawing.Common is not supported on non‑Windows platforms); Word and other Office documents render, and on Windows with dnx every format renders. The other ten tools are unaffected.

常見問題

Can Claude add comments to a PDF? Yes, through an MCP server that exposes an annotation tool. With GroupDocs.Annotation.Mcp the agent calls add_annotation and the comment is written into <name>_annotated.pdf.

Does the AI need to upload my document to annotate it? No, not through the server: it opens the file in your mounted folder and saves the annotated copy next to it. Only what the model itself sees, such as text you paste or page images the agent views, goes to your model provider.

Does it work on Word and Excel, not only PDF? Yes. The same annotation types work across PDF, DOCX, XLSX, PPTX and images, with the 50+ formats listed in the documentation.

深入了解