How to sign documents with AI agents using MCP
Leave feedback
On this page
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
Put the document in the storage folder the server can see.
Ask: “Sign contract.pdf with a QR code containing ORDER-2026-0418.”
The engine writes a signed copy to your output folder; the original is untouched.
Choosing the type
You want
type
Notes
A visible name/date stamp
text
A mark, not proof
A machine-readable reference
qrcode
Scannable; carries structured text
A scan-line reference
barcode
Code39/Code128/EAN family
Legal, tamper-evident signing
digital
Needs 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?