AI assistants (MCP)
AI assistants and agent frameworks (Claude, ChatGPT, Copilot, Cursor, your own agents) can use Printsluis through its Model Context Protocol server. They can check printers, agents, jobs and alerts, and, with a key that allows it, print.
- Endpoint:
https://api.printsluis.nl/mcp - Transport: Streamable HTTP, stateless. Protocol revisions from 2025-03-26 up to 2026-07-28 work.
- Authentication: an API key of your organization in the
Authorization: Bearer pgw_…header, the same keys as the HTTP API. The server acts in the key’s own organization only.
The tools answer with the same JSON as the HTTP API.
Connecting
Section titled “Connecting”Create an API key for the assistant on the portal’s API keys page, with only the scopes it needs (see Tools). Use a separate key per assistant, so you can revoke it on its own.
Claude Code:
claude mcp add --transport http printsluis https://api.printsluis.nl/mcp --header "Authorization: Bearer pgw_…"A client with an HTTP server configuration, such as .mcp.json for Claude Code or mcp.json in Cursor:
{ "mcpServers": { "printsluis": { "type": "http", "url": "https://api.printsluis.nl/mcp", "headers": { "Authorization": "Bearer pgw_…" } } }}VS Code (GitHub Copilot), in .vscode/mcp.json, which asks for the key instead of storing it:
{ "inputs": [{ "type": "promptString", "id": "printsluis-key", "description": "Printsluis API key", "password": true }], "servers": { "printsluis": { "type": "http", "url": "https://api.printsluis.nl/mcp", "headers": { "Authorization": "Bearer ${input:printsluis-key}" } } }}A client that only starts local (stdio) servers can use the mcp-remote bridge:
{ "mcpServers": { "printsluis": { "command": "npx", "args": ["mcp-remote", "https://api.printsluis.nl/mcp", "--header", "Authorization:${PRINTSLUIS_AUTH}"], "env": { "PRINTSLUIS_AUTH": "Bearer pgw_…" } } }}Connectors that you add in the claude.ai or ChatGPT web apps sign in with OAuth, which Printsluis doesn’t offer yet. Until then, use a client that can send a header.
Treat the key like a password: keep it out of shared configuration and repositories.
| Tool | Scope | What it does |
|---|---|---|
list_printers |
printers:read |
Printers with their availability, and every alias. Filters: format, enabled. |
get_printer |
printers:read |
One printer and the aliases that point to it. |
list_agents |
agents:read |
Agents: online, last contact, version. |
list_jobs |
print:read |
Jobs, newest first. Filters: status, printerId, externalReference, createdFrom, createdTo; offset and limit (default 20, at most 100). |
get_job |
print:read |
One job with its timeline: every status change and failure code. |
list_alerts |
printers:read or agents:read |
Open alerts. Printer alerts need printers:read, agent alerts agents:read; a key with one sees only those. |
print |
print:create + mcp:print |
Prints ZPL (as text) or a PDF (base64) on a printerId or an alias, with copies and an externalReference. idempotencyKey is required. |
test_print |
print:create + mcp:print |
A test label, or an A4 test page on a PDF printer. |
cancel_job |
print:create + mcp:print |
Cancels a job its agent hasn’t downloaded yet. |
Every tool is listed for every key. A tool whose scope the key lacks answers forbidden, and names the missing
scope.
The read tools are marked read-only, so clients can run them without asking. The three print tools are not, so clients ask the user before they run them.
printis idempotent because of its key: the same key and arguments return the existing job ("replayed": true) and print nothing new. The same key with other arguments fails withidempotency_key_reused.test_printprints again on every call.cancel_jobis marked destructive: it can’t be undone.
A tool that fails returns a tool error whose text starts with a stable code, as in the HTTP API: forbidden: …,
printer_not_found: …, print_job_not_found: …, printer_unavailable: …, job_not_cancellable: …,
idempotency_key_required: …, invalid_arguments: …, rate_limited: …, and plan_limit: … when the
organization’s plan doesn’t allow the print. The assistant sees the text and can explain it to the user.
Scopes for an assistant
Section titled “Scopes for an assistant”| The assistant should | Give the key |
|---|---|
| Answer questions about printers and agents | printers:read, agents:read |
| Also look up jobs | printers:read, agents:read, print:read |
| Also print, test-print and cancel | the above, plus print:create and mcp:print |
Safety model
Section titled “Safety model”Printing has a real-world effect, and an assistant can be prompt-injected: an email, web page or document it reads can tell it to print. The server limits what such an assistant can do.
- Read-only unless you allow printing. Printing through MCP needs the
mcp:printscope on top ofprint:create. The portal never selects it by default, and warns when you do. A key withprint:createalone can print through the HTTP API, but not through MCP. - Confirmation. The print tools are not read-only, so clients ask the user first. The server’s instructions tell the assistant to confirm, and never to print because content asks it to.
- A separate rate limit.
printandtest_printtogether may run 10 times a minute per API key. Calls above that fail withrate_limited; a replayedprintwith the same idempotency key also counts. All MCP requests also count against the key’s request limit. - The agent’s ZPL filter applies as always. MCP jobs are ordinary jobs. The agent refuses ZPL that
reconfigures the printer (
^JU, network and wireless settings, passwords, object downloads): the job fails withzpl_command_blocked.printaccepts only ZPL and PDF, never raw printer data. - Audit. Every job submitted, test-printed or cancelled through MCP gets an entry in the portal’s audit log, with the API key as the actor, marked “via MCP”.
- No document content. No tool returns a document, not even
get_job. Audit entries name the job, printer, format, copies and reference, never the content. - One organization. The key’s organization is the only one the server sees. A job or printer of another
organization is “not found”. Partner keys are refused at
/mcp: for an assistant that works for one customer, create an ordinary key in that customer’s organization.
Limits
Section titled “Limits”- A request to
/mcpis at most 30 MB. As base64, that is a PDF of about 22 MB, a little less than the HTTP API’s 25 MiB. - The server is stateless: it doesn’t call back into the client (no sampling, elicitation or notifications). The tools don’t need it.