BYOA Ready — Bring Your Own Agent
Open platform

Bring your own agent.

thevisionqc is agent-ready. Point your own AI agent at our Model Context Protocol endpoint — or call the same platform over plain REST — authenticate with a scoped key, and it drives quality and safety for you. Your agent sees only your data, at the level you allow, and every call is metered.

What it is

Your agent, your line.

BYOA opens thevisionqc to the AI agent you already use. Instead of a person opening the portal to read a defect breakdown or acknowledge a safety event, your agent does it — through a small, curated set of tools that run under the exact same tenant isolation and permissions a human login has.

01 · Connect

Two ways in

Speak the Model Context Protocol (JSON-RPC 2.0 over one HTTP endpoint) from any MCP-capable agent — Claude, or your own. Or call the same portal API over plain REST with the key as a bearer token. Same data, same rules.

02 · Scope

A key that can't overreach

Every key is read or read & operate. A read key is capped at view on every function — it can never act on your line. Keys are minted by your account's main contact, shown once, and revocable at any time.

03 · Account

Metered per call

Every agent call is written to an audit trail and counted. You see the meter in your portal — total and per key — and it becomes a line on your invoice. No surprises, no black box.

Endpoint & authentication

One endpoint, one header.

The MCP server lives at a single endpoint on your portal host:

POST https://<your-portal>/api/portal/mcp

Authenticate every request with your agent key, either as a bearer token or a dedicated header:

# either Authorization: Bearer vqc_ag_9f2c… # or x-agent-key: vqc_ag_9f2c…

Keys are prefixed vqc_ag_. Only a SHA-256 hash is stored on our side — the raw key is shown to you exactly once, at creation, and cannot be recovered afterwards. Rotate one at any time by revoking it and minting a new one.

Tools

What your agent can do.

A curated toolset — read tools any key may call, write tools only an operate-scope key may. Every tool runs under row-level security on your tenant; none of them can name another customer.

ToolWhat it returns / doesAccess
get_production_overviewYour products with inspection totals and GOOD / BAD / UNSURE counts over a window.read
get_quality_summaryHeadline counts — total, passed, requires-review, manual-inspect — over a window.read
get_defect_breakdownObject-detection defect categories with counts, over a window.read
list_recent_inspectionsThe most recent inspections, newest first, with verdict and decision.read
list_production_batchesPer-batch records — inspected, OK, NG, start and end.read
list_safety_camerasYour safety cameras and how many zones each has.read
get_safety_eventsRecent workplace-safety events (intrusion, PPE, fire) with severity and camera.read
acknowledge_safety_eventAcknowledge one safety event on the line.operate

Common argument shapes: window is one of "24h", "7d", "30d" (default 7d); limit is 1–100; verdict is one of "GOOD", "BAD", "UNSURE"; acknowledge_safety_event takes a required event_id string.

Protocol

The MCP handshake.

Standard JSON-RPC 2.0. Initialize once, list the tools, then call them. Notifications (no id) are accepted and answered with 202.

1 · initialize — request & response

→ request { "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05" } } ← response { "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2024-11-05", "capabilities": { "tools": {} }, "serverInfo": { "name": "thevisionqc", "version": "1.0.0" } } }

2 · tools/list — each tool carries its own inputSchema

{ "jsonrpc": "2.0", "id": 2, "result": { "tools": [ { "name": "get_quality_summary", "description": "Headline inspection counts over a window.", "inputSchema": { "type": "object", "properties": { "window": { "type": "string", "enum": ["24h", "7d", "30d"] } } } } // … the other tools ] } }

3 · tools/call — the result is text content your agent reads

→ request { "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "get_quality_summary", "arguments": { "window": "30d" } } } ← response { "jsonrpc": "2.0", "id": 3, "result": { "content": [ { "type": "text", "text": "{ \"total\": 664, \"passed\": 396, \"requiresReview\": 73, \"manualInspect\": 16 }" } ] } }

Call a write tool with a read-scope key and the platform refuses it politely — the result comes back with "isError": true and a message telling you to ask the account owner for an operate-scope key. Nothing on your line is touched.

Or plain REST

No MCP? No problem.

The same key authenticates the portal's REST API. Send it as a bearer token and read the tenant-scoped JSON directly.

GET /api/portal/quality/summary?window=30d Authorization: Bearer vqc_ag_9f2c… ← 200 { "total": 664, "passed": 396, "requiresReview": 73, "manualInspect": 16 }
Security

Isolated by construction.

Your tenant, only

An agent key resolves to the same principal a portal login would — bound to your account. Every query runs under PostgreSQL row-level security on that tenant, so a tool cannot return, or even name, another customer's data.

Least privilege

A read key has every feature grant capped at view. Operate is granted per key, deliberately, only to an agent you want to act on your line — and even then only for the functions your account is entitled to.

SHA-256 hashed keys Shown once Revocable Full audit trail Row-level security Scope-gated writes

Ready to connect your agent?

Your account's main contact mints a key in the portal in a click. Talk to us and we'll help you wire up your first agent.