Skip to main content

MCP Gateway Policies

Govern which MCP servers an agent may reach, which tools it may call, and what comes back.

Four decision points

The MCP Gateway evaluates its document at four stages, in pipeline order.

session
Server access
OneMCP
Identity
Cache mode
discovery
Tool visibility
Resources
Prompts
request
Invocation
Human approval
Data scan
Quotas
response
Data scan
Token savings
Web search
QuilrAI

An effect is only legal on the stages that own it. The compiler rejects a rule that places an effect on the wrong stage, so a quota cannot be attached to a session rule and a cache mode cannot be attached to a response rule.

What you can match on

GroupFields
CallerUser email, user ID, user full name, smart groups, identity provider, client IP
AgentAgent name, keyword, normalized and raw user agent, classification, matching registered agent keywords
RouteRoute kind (direct, onemcp, workflow), route name, route source
MCP serverMCP ID, name, slug, transport, auth type, system MCP, tags
OperationMCP method, operation kind
ToolTool name, type, tags, risk, and the read_only, destructive, idempotent and open_world annotations
Resource and promptResource URI, template URI, name, MIME type; prompt name
ResponseWhether the response succeeded, error code and message
Data foundDetections by exact catalog name

The ten control surfaces

SurfaceStageEffects
MCP Server Accesssessionmcp.access allow or deny
Tools, Resources & Promptsdiscovery, request, responsetool.access, resource.access, prompt.access
Human Approvalrequesttool.confirmation none or required
Data & Adversarial Risksrequest, responsedlp.action, dlp.category_actions, dlp.default_action, dlp.detectors, risk.level
Usage Quotas & Concurrencyrequestquota.minute, quota.hour, quota.day, quota.window, quota.timezone, quota.dimensions, quota.id, concurrency.limit, concurrency.ttl_seconds, concurrency.dimensions
OneMCP Featuressessiononemcp.dynamic_tools, onemcp.memory
Identity & Managed Authenticationsessionclaims.forward, token.profile, credential references
Capability Cache & Isolationsessioncache.mode: shared, tenant, private or none
Token Savingsresponsetoken_saving.smart_json_compression, html_to_text, markdown_to_text, text_compression
Web Search Securityresponseweb_search.zia_timeout_seconds, excluded_domains, url_overrides, result_domain_action

Quota and concurrency dimensions are keyed by tenant, user, agent, mcp, tool or group, over a fixed or rolling window.

Blocking a server

block_unapproved_serverssession

runs on sessionpriority 900

WhenMCP nameis any ofUnapproved NotesLegacy CRM
Then
MCP accessdeny

Denied at session, so the agent never sees the server's tools at all.

Hiding and denying a tool

hide_destructive_github_tools

priority 850

Rule 1 - runs on discovery
WhenMCP nameisGitHub
andTool is destructiveistrue
Then
Tool call accessdeny
Rule 2 - runs on request
WhenMCP nameisGitHub
andTool is destructiveistrue
Then
Tool call accessdeny

Denying at discovery removes the tool from the list the agent is offered. Denying at request refuses it if the agent calls it anyway. Use both: an agent that cached an earlier tool list can still attempt a call.

Requiring a human

confirm_write_toolsrequest

runs on requestpriority 700

WhenTool tagshas entrywrite
Then
tool confirmationrequired

The call pauses until a person approves it.

Per data type actions

The MCP target carries an explicit map effect for this, so one rule can assign a different action to each data type.

crm_data_actionsrequest

runs on requestpriority 700

WhenMCP nameisCustomer CRM
Then
Actions per sensitive data type3 data types
Auth & Secrets blockAadhaar Number / VID redactName monitor
Default sensitive data actionmonitor

Each key resolves independently, so a rule that changes one data type never erases another rule's opinion on a different one. Default sensitive data action covers any enabled category the map does not name.

note

Actions per sensitive data type, Default sensitive data action and Sensitive data detectors are evaluated before content is scanned, so a rule carrying one of them cannot also carry a data found condition. Put the data condition in a separate rule.

Quotas and concurrency

per_user_tool_budgetrequest

runs on requestpriority 500

WhenRoute kindisdirect
Then
requests per minute60
requests per day5,000
quota windowrolling
quota dimensionsusermcp
concurrent requests4

Dimensions decide what the counter is keyed by. user, mcp gives each person a separate allowance on each MCP server. Quotas are reserved all or nothing, so a call that would cross any limit is refused rather than partially served.

Session shape

contractor_session_posturesession

runs on sessionpriority 800

WhenSmart groupsincludes (ignoring case)Contractors
Then
OneMCP dynamic toolsfalse
OneMCP memorydeny
forward user claimsfalse
cache modeprivate

Response handling

compress_and_fence_searchresponse

runs on responsepriority 400

WhenMCP nameisWeb Search
Then
smart JSON compressiontrue
HTML to texttrue
excluded domainspastebin.comraw.githubusercontent.com
result domain actionblock

Differences from the LLM Gateway target

LLM GatewayMCP Gateway
Stages24, with compiler stage gating
Per data type actionsOne data rule per action inside a configurationA single Actions per sensitive data type map
PublishingPublish takes a messagePublish takes no message; drafts support rename
Access defaultAllow unless deniedDeny wins, with default-deny on an unregistered server
ReplayDays and row limitWindow, MCP, tool, user and route filters

Everything else - the sentence editor, drafts, immutable revisions, simulation, replay, rollback and the conversion review - works the same way on both targets. See Authoring and publishing.