Skip to content

Connections, permissions, and sessions ​

The AI agent requests tool calls, CZUR MCP Server manages local connections and delivery, and Runtime performs device and processing operations. Distinguishing authorization, client permissions, and scan sessions helps prevent duplicate actions and devices being left busy.

Choose authorization ​

MethodConfiguration and behavior
Account loginLeave the Key unset and run czur-open auth login as the same operating-system user; MCP shares account authorization
API KeyObtain a Key from the CZUR User Center and set CZUR_OPEN_API_KEY in the server environment; account login is not required

Unset, empty, or whitespace-only Keys select account authorization. A Key that is nonempty after trimming takes precedence. An invalid Key never falls back to the account; replace or remove it. auth login, auth status, and auth logout manage only account authorization and do not clear an environment Key. czur-open auth check validates the selected method.

Finish active operations before changing a Key, account, or connection setting, then update the launch environment and restart the server. Existing sessions and tasks cannot continue under a new identity. Key mode skips account login, not Runtime authorization or device activation. Offline use also requires the deployment prerequisites.

When connections are established ​

Starting the server and listing tools do not contact Runtime or automatically download or upgrade software. A call to runtime.connect, device.list, or another protected tool establishes and authorizes a connection when needed. You do not need an explicit runtime.connect before every operation.

Ordinary device and image operations can reuse the connection. device.open holds a device open; release it with device.close and the same device_id. scan.start manages its own device and video stream, so no earlier device.open is needed.

If tools are listed but calls fail, check Runtime with czur-open doctor, then authorization with czur-open auth check. Missing account authorization does not automatically open a login window; the user runs the login command.

Manage scan sessions ​

text
device.list → scan.start → scan.capture → scan.finish
  • scan.start returns an instance-local scan_id; use it for subsequent captures and finishing.
  • scan.capture performs one capture, waits for processing, and returns final images. Ask for confirmation after changing pages before repeating it.
  • scan.finish stops video, closes the device and connection, and retains delivered files. Inspect video_stopped, device_closed, command_disconnected, and any errors rather than assuming cleanup succeeded merely because the call returned.

During a scan, use its capture / finish tools rather than interleaving device calls, standalone image processing, or OCR. Finish with scan.finish before processing scan results. Also finish after a capture failure if you do not intend to continue.

One active operation ​

A server instance keeps one active scan session or one enhancement / OCR long task at a time. Other business requests during a scan return SCAN_ACTIVE; a long task holding the slot returns TASK_ACTIVE.

Long-task submission does not occupy the entire tool queue while background processing runs. Manage it with the matching get / cancel tools. Terminal query delivery releases the handle. An accepted cancellation request still requires querying; see task management. Do not start extra servers to bypass device exclusivity or authorization restrictions.

A scan_id or handle belongs to its creating server instance and authorization identity. Old handles cannot be recovered after a server restart or identity change. Check delivered files and processing state before resubmitting an operation that may already have run.

Client permissions and data protection ​

Client approval and Runtime authorization are separate. A valid account or Key does not mean the client has granted permission to execute commands, read images, or write directories.

  • Run the AI agent as an ordinary user and expose only required file directories.
  • Keep real Keys in protected configuration or environment settings, never conversations, tool arguments, or URLs.
  • Runtime downloads through runtime.install and workflow saves/deletions should follow explicit user requests. Run installers manually.
  • MCP returns images and recognized text to the client. Subsequent model transmission depends on client and model configuration. Local capture does not make the whole AI conversation offline.
  • Local output files persist. Manage access and cleanup according to their sensitivity; finishing a scan does not delete files.

Scans, enhancement, and OCR are not automatically replayed after disconnects, authorization changes, or unknown outcomes. Retain redacted errors and delivered files, confirm the outcome, then decide whether to retry. See troubleshooting.