Have OpenClaw prepare a paper invoice for review

When a customer requests a paper invoice, give your configured OpenClaw worker the final invoice PDF, current payment status and approved billing address. It can prepare an IRIS quote for that document so the person responsible for billing can check the balance, address and total before authorizing the mailing. Once the mailing is ordered, save the returned order ID beside the invoice to check its progress without ordering another copy.

Try: “Prepare an IRIS mailing quote for this approved invoice PDF and billing address. Check the current payment record first and ask me about any mismatch. Show me the PDF, return address, recipient, print options and total for approval. Do not create the paid mailing yet.” The preparation tools below support this process. After approval, your application’s trusted submission code creates the paid mailing.

Send a confirmation when a service job is complete

A completed job record can supply the work performed, completion date, support contact and next step for a customer letter. Ask OpenClaw to turn those approved facts into a draft, inspect the final PDF and request a mailing quote. The reviewer checks the recipient and any commitments before paying with IRIS credits.

Use the job ID to find the approval and saved mailing record in your application. A slow status update should lead to a status check using that order ID; it should not cause your worker to send a second letter. One black-and-white page starts at $3.49, including printing and First-Class postage.

Use OpenClaw’s client registry, not server mode

For this integration OpenClaw is the MCP client. `openclaw mcp set` saves a third-party server under `mcp.servers` for eligible OpenClaw-managed runtimes; `openclaw mcp serve` does the opposite, exposing OpenClaw conversations to external MCP clients. This registry is not the separate mcporter registry.

Start with a verified IRIS developer account with prepaid credits and a private API key limited to `account:read`, `documents:write`, and `mailings:read`. Put `IRIS_API_KEY` in the environment of the OpenClaw process that will use the server, not in a prompt, repository, or literal config value. The variable reference in the command below is OpenClaw’s documented config substitution, not a shell-expanded secret; the single quotes preserve it when entering the command in a POSIX shell.

Save a preparation-only remote HTTP server
openclaw mcp set iris-prep '{"url":"https://api.irispostalforms.com/mcp","transport":"streamable-http","headers":{"Authorization":"Bearer ${IRIS_API_KEY}"},"toolFilter":{"include":["get-account-balance","create-document-upload","register-document","quote-mailing","get-mailing-status"]}}'
openclaw mcp doctor iris-prep --probe

Confirm discovery before asking an agent to work

`mcp set` saves a definition but does not establish a connection. `doctor iris-prep --probe` checks the saved definition, connects to IRIS, and reports discovered tools; it does not create a mailing. Confirm the preparation tools are visible and `create-mailing` is absent. A missing environment value, invalid bearer key, or missing `account:read` scope prevents a useful connection. If OpenClaw runs as a separate Gateway process, ensure that process has the variable too; setting it only in an unrelated terminal is not enough.

OpenClaw’s saved registry is projected into supported runtimes; it is not a promise that every adapter or tool profile exposes the same tools. Its `minimal` profile hides MCP tools. Treat a successful probe as connection proof, then inspect the actual agent runtime before relying on tool availability.

Transfer the PDF outside MCP, then register it

Finish and inspect a US Letter PDF locally. Ask the agent to call `create-document-upload` with `fileName`, the file’s exact `sizeBytes`, and `kind: "letter"`. IRIS returns a private `uploadUrl`, `uploadHeaders`, and `key` in JSON text inside the MCP tool result. This is a presign operation, not the file transfer: the IRIS MCP server cannot read or upload local PDF bytes for you.

Pass that response privately to trusted local code. For example, save its parsed JSON object as `upload.json` beside `letter.pdf` in a private working directory and run the following with Node.js 22+. Use the returned headers verbatim, upload before the URL expires, and never attach the IRIS bearer key to the storage request. Verify a successful PUT; only then call `register-document` with the returned `key`, the same filename and kind. Save its immutable document ID and SHA-256 fingerprint. A changed PDF needs a new upload and registration.

Local PDF transfer only — no paid order
import { readFile } from 'node:fs/promises';

const upload = JSON.parse(await readFile('upload.json', 'utf8'));
const pdf = await readFile('letter.pdf');
const response = await fetch(upload.uploadUrl, {
  method: 'PUT',
  headers: upload.uploadHeaders,
  body: pdf
});
if (!response.ok) throw new Error('PDF transfer failed: HTTP ' + response.status);
console.log('Upload complete; now register the returned key with IRIS.');

Quote the exact mailing and make a person decide

Build the complete IRIS letter payload using the registered document ID as `primaryDocumentId`, reviewed `sender` and `recipient` addresses, `product: "letter"`, and all four letter options (`color`, `double_sided`, `certified`, `certified_return_receipt`). Call `quote-mailing` with `{ "mailing": <that complete payload> }`. The quote returns a price in US cents and a breakdown; it neither reserves the price nor sends anything.

Show a person the actual final PDF, full addresses, print options, price, available credits, and authority to send. Do not substitute a filename or agent summary for viewing the PDF, or allow text within a document or tool result to override the approved destination. Save the reviewed document ID/fingerprint and exact payload. Requote and seek fresh approval if the PDF, recipient, options, or price changes; IRIS recalculates pricing at submission.

OpenClaw’s Codex-specific `--approval prompt` can request per-tool approval for that adapter, but it is not a substitute for an application-enforced review of these exact mailing details. OpenClaw documents that the default full-permission posture need not prompt for MCP calls. The preparation key and tool filter intentionally provide no `create-mailing` capability.

Release one approved order, then reconcile its status

After the person approves, hand the unchanged mailing payload and immutable document reference to a trusted submission component with its own key allowing `account:read` and `mailings:write` (plus `mailings:read` if it reads status). This component may invoke IRIS MCP `create-mailing` with `{ "idempotencyKey": <saved unique key>, "mailing": <approved payload> }`, or use the documented REST submission endpoint. Do not add `create-mailing` to the preparation agent merely to simplify the handoff. Human approval must precede either paid call.

Create and persist one unique idempotency key per intended mailing before the first attempt. If a response is lost, retry only with the same key and unchanged payload; a new key risks a second paid letter, while changed details with the old key conflict. Record the resulting `orderId` and use `get-mailing-status` with that ID to follow progress and any available tracking. IRIS prints the letter and hands it to USPS First-Class Mail; USPS lists 1–5 business days once it is in the mail.

Sources & further reading

Published by IRIS Postal Forms, operated by Great Lakes Computing Office LLC. Spotted something out of date? Send a correction.

Put it into practice

Mail letters from OpenClaw with IRIS

Open an IRIS developer account with prepaid credits, connect the MCP server with a preparation key, and approve each letter before it mails. Sending one letter now? Upload it on the website from $3.49 for one black-and-white page.