Skip to content

MCP Gateway

The model calls tools now.

What has been protected so far is the text going to the model. That is no longer where enterprise usage is growing: the model calls a tool wired to the company's database, the rows come back straight into its context, and that path sits outside the existing gateway.

Overhead (p95)
~13 ms
Chunked evaluation
over 1 MB
Default
off
Vault retention
90 days

The blind spot

A tool result enters from outside the gateway.

A developer asks a tool-capable client, the model calls the company's MCP server, and the rows that come back go to the model. The gateway cannot see it: a tool result is added to the request body on the client side, and by the time the gateway sees anything it is already too late. The flow is dangerous both ways — arguments can carry data outwards, while results and tool definitions bring untrusted text inwards.

Two directions

The defaults matter more than the capability list.

Both directions run through the same decision chain. But they do not share a default, and the difference is worth writing down.

Inbound: the tool result

default: mask

The rows a tool returns — identity numbers, IBANs, phones, addresses — are evaluated before they enter the model's context.

Personal data is swapped for a synthetic value, and the result is delivered that way.

Outbound: the tool arguments

default: evaluate

The arguments the model sends to a tool can carry company data outwards, so that path runs through the same chain.

It is evaluated and recorded but not masked — quietly rewriting an argument breaks the search. Masking or blocking is switched on per server.

Tool definitions

A definition is untrusted text too.

Definition scanning

A tool definition is untrusted text that enters the model's context like any other. A poisoned description is ordinary prompt injection, so every text field on a definition surface runs through Prompt Shield.

An unapproved tool does not run

A newly seen tool lands in an approval queue and cannot be called until it is approved. That is the default; relaxing it is a separate decision.

Pin and drift

Approval is bound to a hash of the definition that was seen. If the server changes it afterwards — the classic rug pull — the tool stops being callable and the panel shows the difference.

Discovery and a reachability check

The gateway connects to the upstream itself and collects the tools, so the inventory does not wait for a first client. The same call is a reachability test: an unreachable address is visible to the administrator before a user complains.

The request path

Network, session and large results.

Results over 1 MB

A large result is split and evaluated in parallel. A blocked chunk is dropped and the rest is delivered, so one row does not cost the whole answer.

SSRF protection

By default an upstream address cannot resolve to a private, loopback or link-local address. Reaching a server on the internal network is a deliberate setting.

The session is bound to the caller

A session belongs to the person who opened it and the Origin is validated, so another tenant or user taking it over is prevented structurally.

Opening a masked value

Masked values are kept in an encrypted vault for 90 days. Opening one does not come with the admin role: it needs a separately granted permission and a fresh SSO step-up. Every reveal is logged as who and which token, never the value.

Audit

The MCP detail is recorded.

Every decision produces an event. The event names come from the code itself; raw personal data never enters this stream.

eventwhat it records
mcp_result_maskedPersonal data in a tool result was masked.
mcp_outbound_pii_passedPersonal data in an outgoing argument passed unmasked (the default mode).
mcp_tool_call_blockedA tool call was blocked.
mcp_tool_not_approvedAn unapproved tool was called.
mcp_tool_poisoning_blockedAn injection in a tool definition was caught.
mcp_tool_definition_changedAn approved definition changed and the tool was closed.
mcp_tools_discoveredA server's tools were collected.
mcp_token_revealedA masked value was revealed: who, and which token.

Performance

The measurement, with its conditions.

From the customer-installation test of 17 November 2026. The fixed overhead is low; the cost grows linearly with the size of the result.

scenariodirectTrustLayeroverhead
ping (empty result)1,214,513
customer record (personal data)1,214,713,5
~10 KB result1,428,827
~100 KB result3,3181178
~1 MB result201 6111 591

p95, ms

Measured on a MacBook (Apple Silicon) with Docker Desktop, a backend container held to 2 CPUs and 2 GB, two uvicorn workers, self-signed TLS and nginx in the path. A measurement on a target-class server (4 vCPU or more) has not been done, so these are not a production commitment. No errors were seen across 20 concurrent calls.

Clients

Configuration is one address change.

The client calls the tool through the gateway rather than directly. The snippets below are for the clients that were tried.

Cursor

~/.cursor/mcp.json
{
  "mcpServers": {
    "crm": {
      "url": "https://trustlayer.sirket.local/v1/mcp/crm",
      "headers": {
        "Authorization": "Bearer tl_…",
        "X-User-Id": "ayse.yilmaz"
      }
    }
  }
}

Codex

~/.codex/config.toml
[mcp_servers.crm]
url = "https://trustlayer.sirket.local/v1/mcp/crm"

[mcp_servers.crm.headers]
Authorization = "Bearer tl_…"
X-User-Id = "ayse.yilmaz"

A bridge for stdio clients

There is a desktop bridge for clients that only speak stdio. It has no signed distribution yet and we claim no platform support; we set it up with you.

See it with your own data.

In a technical session we run your prompts and your policy through it live.