Quilzomanual

MCP gateway: govern the tools AI agents call, with pinning and approvals

Agents call only the tools a person agreed to, as those tools were on the day they agreed, and other vendors' agents reach your tool servers only through Quilzo.

In the adminIntegrationsYour accounts

An MCP gateway sits between AI agents and MCP servers and decides each tool call: who may call which tool, how often, whether a person approves it first, and with which credential. Quilzo is one for its own agents, and offers the same to other vendors' agents at /mcp/gateway/NAME.

Declare a tool server

  1. Write the declaration

    Declarations live in integrations.json in the store. Each names one host, why this install reaches it, and the tools it may call there. Everything is off until somebody turns it on, so an example pasted from somewhere does nothing by accident.

    {
      "declared": [
        {
          "name": "tracker",
          "kind": "mcp",
          "enabled": true,
          "purpose": "File and read issues in the support tracker",
          "endpoint": "tracker.example.com",
          "uses": ["list_issues", "create_issue"],
          "writes": true,
          "secret": "tracker-token"
        }
      ]
    }
    FieldMeans
    endpointExactly one hostname, or an IPv4 address: no scheme, no wildcard. Quilzo always uses https.
    port, pathWhere on that host the server answers, when it is not port 443 and /. Most MCP servers answer at /mcp.
    usesThe tools this install may call there. Never "everything the server offers": a server can add or redefine a tool after the day you trusted it.
    writesThe tools change something on the far side, so a reviewer does not have to guess from their names.
    secretThe name of the credential, never its value: the store keeps history that cannot be deleted. Keep the value sealed with quilzo secret set tracker-token < file, or set QUILZO_SECRET_TRACKER_TOKEN (the name in capitals, with anything else turned into _), which wins when both are there.
    quilzo integrations list
    tracker  mcp  enabled
      File and read issues in the support tracker
      reaches tracker.example.com
      may call list_issues, create_issue
      changes something on the far side
  2. Look at what the server offers, and pin it

    quilzo integrations tools tracker asks the server what it offers and marks what you agreed to. The difference between the two lists is worth reading. When you are satisfied, pin the tools: Quilzo records a SHA-256 of each tool's definition (name, description and input schema) as the server gave it that day.

    quilzo integrations tools tracker
    quilzo integrations pin tracker list_issues create_issue

    A pinned tool whose definition later changes is refused until a person pins it again, and the shield is told. This is the answer to tool poisoning: a name staying the same is not the tool staying the same. Only a pinned tool can be chosen by a model.

  3. Check it in the admin

    Administration › Integrations shows each server, what it may call, how it authenticates, and whether it is offered through the gateway.

    The Integrations screen: tracker reaches tracker.example.com, may call list_issues and create_issue, is enabled and offered through the gateway to authors
    A declared tool server, offered through the gateway. The waiting call shown is sample data in the program's own format.

A REST API, from its OpenAPI description

An API with no MCP server is declared from its OpenAPI 3 document (JSON). Each operation becomes a tool by its name, with the same allow-list, pins, gateway and approvals as an MCP server's tools. Import once to see what is on offer, then again naming what this install may call:

quilzo integrations import billing-openapi.json
quilzo integrations import billing-openapi.json --uses getInvoice,listInvoices --secret billing-key

The declaration arrives switched off, with only the named operations, as kind http: each one's method, its path under the endpoint, and its path and query parameters. A bearer token, or an API key in a header the document names, comes from the secret, never from the agent.

An operation that spends money declares pays: where its amount, currency and payee are, so each payment is checked against the agent's mandates (see agents that pay).

A callIs
BuiltOnly from what its operation declares. An argument it does not declare is refused rather than passed on, and path values are escaped. A JSON body is checked against its schema first: types, required fields, enumerations, lengths and bounds. A field the schema does not list is refused unless the schema sets additionalProperties.
SentOver https, to the declared host and nothing else, with no redirects followed.
AnsweredUp to 32 KiB of the response, or the status and the start of the error.
ChangedAn operation edited after it was pinned is refused until somebody pins it again.

An import never fetches what a document refers to: a reference outside the document is named and left out. Header and cookie parameters, and an API key in a query string, are not imported. A REST API can be offered to other vendors' agents through the gateway like an MCP server.

An MCP server from the registry

A server's server.json from the MCP registry becomes a declaration of its Streamable HTTP address. Without --uses the server is asked what it offers and nothing is declared:

quilzo integrations import server.json
quilzo integrations import server.json --uses list_issues,create_issue --secret tracker-token

A server published only as a package runs on your side first; give its address with --endpoint. Another vendor's agent is imported the same way, from its A2A agent card, as kind a2a (see A2A).

Let an agent use a tool

An agent names each tool it needs, on its host, with a purpose, in its declaration. Tools that change something can ask first:

"tools": [
  { "name": "list_issues", "host": "tracker.example.com", "purpose": "see whether a problem is already reported" },
  { "name": "create_issue", "host": "tracker.example.com", "purpose": "report a problem it finds", "writes": true }
],
"ask_first": ["create_issue"]

A call is allowed only if the agent declares the tool, an enabled integration offers it, and it is pinned. Every call is recorded, and the exfiltration breaker stops a call when the run holds something private and has read somebody else's words (see Limits that hold). Try a call by hand with quilzo integrations call tracker list_issues. A tool that answers that it failed makes the command exit non-zero, and the call is a failure on the record. A call refused before it is sent (an argument the declaration does not name, a tool not pinned, a private address nobody declared) is recorded as denied, since the far side was asked nothing.

A tool server on your own network

Quilzo refuses private, loopback and link-local addresses unless you say otherwise, so a declaration cannot be pointed at whatever else is inside your network. To use an MCP server that runs inside it, name the range it is in with reach:

{
  "name": "knowledge",
  "kind": "mcp",
  "enabled": true,
  "purpose": "Search the internal knowledge base",
  "endpoint": "kb.corp.example",
  "port": 8443,
  "path": "/mcp",
  "reach": ["10.20.0.0/16"],
  "uses": ["search"]
}
  • Every address the name resolves to must be inside a declared range. Quilzo checks this when it connects, so changing a DNS answer later does not let the declaration reach anything else.
  • Only private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10, fc00::/7) and loopback can be named. Link-local, where cloud metadata lives, never can. Up to 8 ranges, each written from where it starts.
  • The server still needs https. If your organisation signs its own certificates, the machine running Quilzo has to trust that authority, through the system's certificate store or SSL_CERT_FILE.
  • In an offline deployment (network.mode set to offline) only loopback is reached, whatever is declared.

The Integrations screen and quilzo integrations list show the range next to the server, so a reviewer sees what was opened.

With each person's own account

An integration's secret is one key for the whole install: every agent that reaches it acts there as whoever the key belongs to. An integration can name a connection instead. A call then goes as the person the agent acts for, with the account they connected themselves, and with nobody's when nobody is.

  1. Declare where people connect

    An administrator declares the provider once, from a template, with the client ID the provider issued. Where it issues a client secret too, keep that sealed with quilzo secret set and name it with --client-secret.

    quilzo connect provider add google --template google --client-id ID

    It prints the address to register with the provider as the redirect: the admin's own address, followed by /connections/callback. The templates are google, microsoft and github. quilzo connect providers lists what is declared, with the scopes it asks for and the API hosts its tokens may go to; a token goes to those hosts and nowhere else.

  2. Declare an integration that goes with it

    quilzo integrations template
    quilzo integrations template google-calendar --uses listEvents

    The first lists the templates: google-calendar, microsoft-calendar and github-issues, each with the operations it offers. The second declares one with only the operations named. It arrives switched off, like every declaration. Pin it and turn it on as usual. --as gives it another name and --connection another provider. An integration with a connection is never offered through the gateway, where there is no person to act for.

  3. People connect their own accounts

    Each person opens Administration › Your accounts and presses Connect beside the provider, then signs in there and agrees.

    ToRun
    Connect your accountquilzo connect start google, then open the address it prints where you are signed in to the admin
    See the accounts you connectedquilzo connect list
    Disconnect onequilzo connect revoke google, or Disconnect on Your accounts

Connecting is OAuth 2.1: an authorization code with PKCE (S256), and a state that is used once, lasts ten minutes and belongs to the person who started it. The tokens are kept sealed, refreshed when due, and revoked at the provider when somebody disconnects, where it offers that. The page the provider sends people back to shows only an OAuth error code, never other words a link could put there.

A remote MCP server that asks people to sign in

quilzo connect provider discover tracker https://tracker.example.com/mcp

Quilzo reads who authorises the server from what it publishes: its protected-resource metadata (RFC 9728), then its authorization server's metadata (RFC 8414). It registers itself there as a public client when the server takes registrations (RFC 7591), or uses the client ID given with --client-id. A server that does not offer PKCE with S256 is refused, and every authorization and token request names the server (RFC 8707), so a token is for it alone. An integration naming that connection then reaches the server as each person.

Writes that did not get through

A write is named by the run and step that made it. A write to a REST API carries that name as its Idempotency-Key header, and a message to another agent carries it as its message ID, so a far side that keeps them does not do the same thing twice when a step is tried again.

A REST API that does not answer, or answers that it is busy (408, 425, 429, 502, 503 or 504), is tried up to three times, waiting as its Retry-After asks, up to ten seconds, or one second and then two. A read is always tried again; a write only when it carries its key.

A write an agent made that still failed is kept, with its run and step, the integration, the tool, its key and what the far side said, never its arguments, which the run's own record holds. It is listed under Writes that did not get through on Integrations, and nothing is sent again by itself: settle it at the far side, then take it off the list.

ToRun
See what did not get throughquilzo integrations undelivered
Take one off, once it is settledquilzo integrations undelivered --dismiss N, or Settled on the screen

Offer your MCP servers to other agents

Another vendor's agent, or one your teams built, can reach a declared server through Quilzo instead of directly. It gets only the pinned tools, at the role and daily limit you set, with Quilzo's credential injected and never its own. Every call is checked, counted and recorded with a digest of its arguments.

  1. Turn the gateway on for one server

    quilzo integrations gateway tracker --role author --daily 200 --ask create_issue

    --role is the least role a caller needs (reader, author or publisher). --daily caps one caller's calls a day (500 if you name none). --ask lists tools a person approves call by call. --off stops offering it.

  2. Give the caller the address and a token

    The server is offered at https://YOUR-ADMIN/mcp/gateway/tracker. A caller authenticates with a Quilzo token or an OAuth connection (see Connect AI apps), and is limited by that principal's access.

  3. Decide the calls that wait

    A call to a tool under --ask waits under Calls waiting for a person. Approved, exactly that call goes through once, within the hour. Somebody other than the person it acts for must decide.

    Calls waiting for a person: create_issue on tracker for helpdesk-bot through the help desk agent, with its arguments, and Approve or Decline
    A call waiting for a second person (sample data).
    quilzo integrations held
    quilzo integrations approve gq_915959844d12
    quilzo integrations decline gq_915959844d12

Every caller of the gateway, and every tool server, also appears on the Fleet map.

Tell other systems when something happens

A webhook is a signed POST to a URL you choose when something is published, rolled-back, scheduled, submitted (a form), proposed (a change waiting for approval), booked or booking-cancelled (see Bookings), subscribed or unsubscribed (see Newsletter). Only https endpoints are accepted.

quilzo webhook add https://deploy.example.com/hooks/quilzo

The signing key is printed once. A delivery that fails is tried twice more, after one second and then four, and each attempt is signed for the moment it is sent. A 429 or 408 is tried again like a 5xx; any other 4xx ends the delivery. Each delivery carries X-Quilzo-Event, X-Quilzo-Delivery, X-Quilzo-Timestamp and X-Quilzo-Signature. The signature is an HMAC-SHA256 over the timestamp and the body, each prefixed with its length, so the boundary between them cannot be moved. Reject anything more than five minutes old. A receiver in Python:

import hmac, hashlib, struct, time
def verify(key, timestamp, body, signature, now=None):
    if abs((now or time.time()) - int(timestamp)) > 300:
        return False                      # too old or from the future: a replay
    mac = hmac.new(key.encode(), digestmod=hashlib.sha256)
    for field in (timestamp.encode(), body):
        mac.update(struct.pack(">Q", len(field)) + field)
    return hmac.compare_digest("v1=" + mac.hexdigest(), signature)
The Webhooks section: one endpoint receiving every event, its key partly shown, with Turn off and Remove
Webhooks, under Integrations.

quilzo webhook list, webhook test and webhook remove ID manage them.

Traces and the audit log, to your own tools

Set telemetry.otlp_endpoint and every agent run is sent as OpenTelemetry spans using the GenAI semantic conventions (gen_ai.operation.name, gen_ai.tool.name and the rest) to the collector you already run.

The audit log exports to a SIEM as OCSF (the default), CEF or JSON Lines. --envelope writes every exported event's hash, in order, beside the export, so the receiving side can tell whether anything was added, removed or reordered:

quilzo siem ocsf --envelope envelope.json > audit.ocsf.jsonl
quilzo siem jsonl --envelope evidence.json > audit.jsonl
quilzo siem verify audit.jsonl --envelope evidence.json
verified  185 event(s), sequences 1-185
  nothing was added, removed, reordered or altered since export

An OCSF or CEF record carries its event's hash (metadata.uid, or cs3 in CEF) rather than the whole event, so compare those with the envelope. A JSON Lines export carries each event whole, which is what siem verify recomputes; keep one of those as evidence.

The audit log, streamed as it is written

Set siem.stream.url and quilzo serve pushes the log every fifteen seconds to a SIEM, so the record is kept where Quilzo cannot reach it. Each request is a batch of OCSF records that follows the last exactly. It carries the chain envelope, each record's Merkle leaf and a tree head signed with Ed25519 and ML-DSA, and the request is signed as an HTTP message (RFC 9421) over its body's digest. A receiver that keeps the leaves can prove it holds every record, unchanged.

ToRun
Send to a SIEMquilzo config set siem.stream.url https://siem.example.com/quilzo
Give the receiver the keys to check what it is sentquilzo siem stream key --json
See how far it has got, and why it is failingquilzo siem stream status
Send what is waiting nowquilzo siem stream send

The receiver answers 2xx for a batch it took, or 409 with {"holds": N} when it holds a different last record; the stream carries on from there. Nothing is lost while the receiver is down: the stream waits, and posture reports one failing for an hour. People appear as the pseudonyms the log keeps for them, which are all it holds from its first record. A receiver off this network needs siem.stream.allow_remote. Both are weaker settings, so each takes two administrators.

Next