Intramedial is in restricted beta. At sign up or sign in, you have to provide the beta tester password you received or request one at preview@intramedial.com. Thank you.
Loading…
mcp.enforceModule 04
Plane module
MCP gateway enforcement
Put a front on an MCP server so each tool call is admitted like any other intent, and a refused call never reaches the server.
mcp.enforce asks Intralock whether an agent may call an MCP tool and returns a verdict, with no model in the path. The same gateway can also forward a call to a registered upstream under the workspace's mode: observe records, advise reports, enforce refuses.
Intralock · Leases · Parley · Fleet Map
A Trustvice Product
Agents act when the plane says yes, and the record says why.
Put admission in front of your MCP servers, repositories, SaaS tools and cloud accounts. Every agent gets a lease or a reason – and you keep the lever to stop any of them.
mcp/enforce returns allow or refuse and forwards nothing. To have the gateway admit, strip, forward and screen a call, register an upstream with upstream-add and send the call to mcp/call.
Record
The record
What gets recorded
actorDid
Required. The agent making the call. An authenticated agent can only name itself.
tool
Required. The MCP tool name. It is also the admitted resource unless resource is sent.
A tool named bash or fs.write admits as a write, so it needs a grant and, under the confirmation floor, a human approval before it runs.
Trying it before enforcing
Run in observe for a week. shadow lists the last 50 calls the plane saw, so you can see which would have been refused.
Defanging replies
call screens the upstream's reply, defangs instruction-shaped text and sets instructionShaped in provenance, so a tool result cannot pose as an instruction.
Dropping risky arguments
In advise and enforce, call removes command and shell from the arguments and lists the removed names in stripped.
When to use something else
A single admission check without MCP framing. Use coordination.admit; the gateway calls it for you.
Collecting a human decision for a write. Approvers use coordination.approve; the gateway only returns the approvalId.
Gating GitHub repositories. Use github.enforce, which admits repo: resources and posts the result back to GitHub.
Evidence
Guarantees
What it does, and what it does not
A module is a strong claim about a narrow thing. Rely on it for exactly what it is.
It does
enforce runs Intralock admission whatever mode is stored, so the verdict is the same pure-function answer as coordination.admit.
In enforce mode a refused call is not forwarded: the response says forwarded: false and no request goes upstream.
Every enforce and observe request appends an mcp.shadow event, and every call an mcp.call event, to the ledger.
A mutation-shaped tool name cannot be downgraded to read or call by the request.
It does not
That a client cannot bypass the gateway. It admits only calls sent to it; an agent holding the server's address can call it directly.
That a screened reply is safe. Defanging and the instructionShaped flag are heuristics on text, not a guarantee.
That an upstream address is safe. The check reads the URL text and cannot see how a hostname resolves.
That the response's mode is the mode used. On enforce it reports the stored mode, which may be observe, though the verdict is always Intralock's.
Details
Build notes
Before you build
Verdict shape
enforce returns the shadow row with shadow: false, plus allow, reason, the admitted action, llm: false and protocolVersion.
Approvals
A write without a token comes back from call with allow: false and an approvalId. The enforce route returns only allow and reason.
Mapping packs
An upstream can carry a mapping pack that names each tool's action and resource. A mapped tool admits against its resource instead of the default.
Permissions
mode, upstream-add and upstream-remove need policies.approve. enforce, call and shadow carry no permission of their own, so the admission verdict is the control.
Limits and metering
call times out an upstream at 8000 ms and refuses a reply larger than 1 MiB.
At most 50 upstreams are registered, the call history keeps 200 rows and shadow returns the last 50 events.
A mapping pack holds at most 200 tools. Extra entries are dropped.
enforce without actorDid or tool returns 400, and call without upstream does too.
Access
API & MCP
REST and MCP
Authenticate with a workspace API key as a Bearer token. The base URL is https://api.intramedial.com.
REST endpoints
POST/api/v1/acp/mcp/enforceAdmit a tool call and return the verdict; forwards nothing.
POST/api/v1/acp/mcp/callAdmit, strip, forward and screen a call through an upstream.
POST/api/v1/acp/mcp/modeSet the workspace's gateway mode.
GET/api/v1/acp/mcp/shadowList the last 50 observed events.
POST/api/v1/acp/mcp/upstream-addRegister an upstream MCP server.
MCP actions
MCPcoordination.mcp.enforceAsk for a verdict from an agent.
MCPcoordination.mcp.modeSet the mode from an agent.
MCPcoordination.mcp.shadowRead the shadow log from an agent.