How to sign documents with AI agents using MCP

Signing through an agent works because the agent understands “sign this with our order reference” while the engine produces a real signature in a real document, locally — including certificate-backed digital signatures.

Note
The commands and config snippets on this page are for the .NET build of the server — the only platform available today. Installation and client setup: MCP server for .NET. Other platforms will expose the same tools with their own launch command; everything else on this page applies unchanged.

The pattern

  1. Put the document in the storage folder the server can see.
  2. Ask: “Sign contract.pdf with a QR code containing ORDER-2026-0418.”
  3. The agent calls sign with type and text.
  4. The engine writes a signed copy to your output folder; the original is untouched.

Choosing the type

You wanttypeNotes
A visible name/date stamptextA mark, not proof
A machine-readable referenceqrcodeScannable; carries structured text
A scan-line referencebarcodeCode39/Code128/EAN family
Legal, tamper-evident signingdigitalNeeds a certificate + password

The first three place a mark. Only digital binds identity to the bytes: it proves who signed and that nothing changed afterwards. When someone says “we need this signed”, ask which of the two they actually mean.

Digital signing, concretely

Sign contract.pdf digitally using signing-cert.pfx.

The agent passes certificate (the certificate file, in the same FileInput shape as the document) and certificatePassword. Both are read from local disk by the local process. The password is a secret like any other — put it in an environment variable rather than a literal in a committed client config (how).

Order matters

Visual marks rewrite the file. Apply one after a digital signature and that digital signature becomes invalid — the bytes it covered have changed. So: all visual marks first, digital signature last. If an agent is chaining signatures, say so explicitly in the prompt.

The evaluation trap

Unlicensed, only the first two pages are processed and every page gets a trial badge. A signature destined for page 5 of a contract silently never lands. Before any signing run that matters:

What is the license status of the signature server?

get_license_status answers in one call. See Licensing.

Setup

dnx GroupDocs.Signature.Mcp --yes

with GROUPDOCS_MCP_STORAGE_PATH pointing at your documents folder — per-client config or the installer.

Where to go next