NewEvery agent tool call now routes through the governed MCP gateway — policy check, audit log, then dispatch.Read the changelogarrow_forward
XOOZLYAI Orchestrator
routeHow it workssmart_toyAgent fleetshieldGovernance & trustsellPricingmenu_bookDocsarticleBloghistoryChangelog
Log inStart free
grid_viewProductsrouteHow it workssmart_toyAgent fleetshieldGovernance & trustsellPricingmenu_bookDocsarticleBloghistoryChangelogHelp centreLog in
Start free
  1. XOOZLY
  2. chevron_rightDocumentation
Loading the knowledge base…
XOOZLYAI Orchestrator

Ready to orchestrate your AI fleet with total confidence?

Start a project, set a cost cap, and watch the loop run with every tool call policy-checked and logged before it leaves the platform.

Start freearrow_forwardSee what shipped
  • check_circleNo credit card required
  • check_circleYour keys, your model spend
  • check_circleEvery tool call audited

Platform

  • All productsarrow_forward
  • Orchestration looparrow_forward
  • Agent fleetarrow_forward
  • Governed control planearrow_forward
  • Pricingarrow_forward

Trust & legal

  • Trust centrearrow_forward
  • Security & compliancearrow_forward
  • AI use policyarrow_forward
  • Report a vulnerabilityarrow_forward
  • Data subject requestsarrow_forward

Resources

  • Documentation & guidesarrow_forward
  • Engineering & research blogarrow_forward
  • Changelogarrow_forward
  • Uptime & reliabilityarrow_forward

Browse by domain

  • Strategy & Researcharrow_forward
  • Developmentarrow_forward
  • QAarrow_forward
  • Governance & Orchestrationarrow_forward
  • All 10 domainsarrow_forward
XOOZLY
© 2026 XOOZLY · 61 agents · 10 domains · 8 SDLC stationsAI use policyarrow_forwardLog inarrow_forward99.9% uptime SLAarrow_forward
  1. XOOZLY
  2. chevron_rightDocumentation
  3. chevron_rightGuide
Loading this guide…
  1. XOOZLY
  2. chevron_rightDocumentation
  3. chevron_rightThe MCP gateway: policy check, audit log, then dispatch
arrow_backBack to the knowledge base
schedule3 min read·verifiedChecked against the code on 25 October 2026
MCP protocols & integrationsmcp-gateway-architecturecodeapi-server/mcp_gateway/gateway.pycodeapi-server/mcp_gateway/audit.py

Governance architecture

The MCP gateway: policy check, audit log, then dispatch

Every tool call an agent makes takes exactly one path, and that path is three steps long. There is no second route to a connector, no implicit allow, and no outcome that goes unrecorded — including the denials.

open_in_newOpen MCP gateway policy editor in the consolearrow_forward
01

Policy check, audit, dispatch

Every tool call an agent makes goes through one function, and that function does three things in a fixed order. There is no bypass, and the middle step happens whether the first one passed or failed.

  1. policy1 · Policy check, deny by defaultThe connection's own policy is read: is there a policy row, did its safety sweep pass, and does this agent hold a grant naming this exact action? A missing row, a failed sweep and a missing grant are all the same outcome — denied.
  2. fact_check2 · Audit, pass or failAn allowed call and a denied call both write a record. The record carries the agent id, the action, the connection it targeted and, for a denial, the reason — ids and outcomes, never the request or response body.
  3. send3 · DispatchOnly then is the connector called. A write is not recorded as done until the created object has been read back and matches; a write with no read-back contract is refused before dispatch rather than optimistically assumed.
02

What the audit record contains

audit_logs / mcp_tool_call
{  "action": "MCP_TOOL_CALL_ALLOWED",  "actor_type": "system",  "resource_type": "mcp_server_connections",  "resource_id": "0199c4a1-7f3e-7c21-9b44-2d6f8ae51c03",  "after_state": {    "agent_id": "0199c4a1-7f3e-7c21-9b44-2d6f8ae51c04",    "action": "create_pull_request",    "correlation": { "runId": "0199c4a1-7f3e-7c21-9b44-2d6f8ae51c05" }  },  "severity": "info"}
A denial looks the same, with the action recorded as denied and the reason alongside it. Either way the row exists.
blockA denial is a tool result, not a crashA policy denial is not an exception the agent crashes on. It comes back as a tool failure with a reason, so the agent sees “that tool refused” and the audit trail sees why.
03

A write is not done until it reads back

For actions that change state somewhere else, a successful dispatch response is not treated as proof. The gateway reads the created object back and compares it against what was requested; only a match records the write as done.

fact_checkAn unverifiable write is refused, not attemptedA state-changing action with no read-back contract is refused before dispatch rather than performed on trust. One real example: triggering a remote workflow returns no identifier to read back, so it stays refused instead of being reported as a success nobody can confirm.
04

What is honestly not implemented

Governance applies to every connector type. Real outbound dispatch does not — it exists for a handful, and every other type returns an explicit “no adapter implemented” result.

  • Google Stitch, through its own MCP protocol client.
  • GitHub, through a direct REST client.
  • Slack, through a direct Web API client — note that approval buttons it posts are clickable but nothing receives the click yet; the approval still happens in XOOZLY.
  • A guarded web fetch, which refuses any host resolving to a non-public address and rate-limits per host.
  • A provider-backed web search.
blockA missing adapter never fabricates a successThis is the structural reason a tool result can be trusted: a connector with no implementation says so. Returning a plausible-looking result for an unimplemented connector is the exact failure this design exists to prevent.
05

Where the gateway is reached from

The gateway is reached from the orchestration loop through a bounded tool loop, and only for an agent that has both an active connection and a passed grant in that run's project. An agent without grants runs plan-only — its trace contains no tool calls because it was never able to make any.

Per station
6 stepsA hard cap on the loop
Per observation
4,000 charsTruncated before the model sees it
Without a grant
Plan onlyNo tool calls attempted

boltPut it into practice

Run a fleet with these guardrails on from day one.

Hard cost caps, one audited gateway in front of every tool call, and versioned rule files — the defaults, not an enterprise add-on.

Start freearrow_forward

On this page

5 sections
  1. 1. Policy check, audit, dispatchchevron_right
  2. 2. What the audit record containschevron_right
  3. 3. A write is not done until it reads backchevron_right
  4. 4. What is honestly not implementedchevron_right
  5. 5. Where the gateway is reached fromchevron_right
feedbackSomething missing?

Related guides

  • articleImporting and exporting MCP connector configurationsConnector config export & import
  • articleWebhook signature verification and retry handlingWebhooks
  • articleOAuth callback flows for third-party developer toolsOAuth callback debugger