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.
Why does AI feedback in a chat window get lost?
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.
What does the wrong approach look like?
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.
What is the right approach: annotate documents with an AI agent?
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.
Which tools make the placement correct?
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_inforeturns 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_annotationsreturns existing annotations with their bounding boxes, which the agent can use as anchors.generate_pages_previewrenders 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.
What is the one trap in chained annotations?
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.
Example session (abridged)
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.
How do I start the annotation server in my AI client?
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.
Honest limits
- 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/yfrom a prompt places anareaorpointannotation approximately. Read first or render first for precise placement. - Preview on Linux.
generate_pages_previewcurrently fails for PDF files on Linux, including the Docker image (TypeInitializationExceptionforGdip:System.Drawing.Commonis not supported on non-Windows platforms); Word and other Office documents render, and on Windows withdnxevery format renders. The other ten tools are unaffected.
FAQ
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.
Go deeper
- Documentation, canonical how-to: How to annotate documents with AI agents using MCP
- Documentation hub: GroupDocs.Annotation MCP Server
- Next: Enforce review workflows with automated annotation threads using MCP
- Next: 3 ways to extract every comment from a document set with MCP
- Next: Show the agent what it did
- On-premise and security model: 3 architectures for AI document processing, and the one that keeps files inside your network
- Questions: GroupDocs Annotation forum
- Source: GroupDocs.Annotation.Mcp on GitHub