Skip to main content

Security and trust posture

Running agents against MCP servers in production raises three questions Diagrid is built to answer:

  • Who is this caller? Can the platform prove a tool call came from a specific agent, and not from impersonated or hijacked credentials?
  • What may this caller do? Are there enforceable limits on which tools an agent can use — limits the LLM cannot reason its way around?
  • What has this caller done? When something goes wrong, is there a record of what happened, by which identity, in what order?

Diagrid answers each of these at its MCP proxy endpoint, so the answers stay consistent regardless of which agent framework, language, or LLM you use, and without any change to MCP client or server code.

How Diagrid answers the three questions​

QuestionDiagrid control
Who is this caller?Every agent reaches an MCP server through Diagrid's MCP proxy endpoint, authenticating with its API token. Diagrid validates that token before any policy runs. Internally the call is carried over mTLS using SPIFFE-issued workload identities that Diagrid attests and rotates automatically.
What may this caller do?A deny-by-default MCPServerAccessPolicy allow-lists which caller agents may use which tools. Tool discovery is filtered to authorized tools and unauthorized calls are rejected with 403 — the LLM cannot reason its way around either, because enforcement happens after its decision.
What has this caller done?Every MCP call flows through Diagrid's data plane and is captured in logs, metrics, and distributed traces. The observability console shows which agent called which server and tool, when, and whether the policy allowed or denied it.

Default postures​

Diagrid's defaults favor refusal over permissiveness. None of these require you to "turn on a security mode" — they are how the platform behaves out of the box.

  • Deny by default. A newly created MCP server denies every caller and every tool until you explicitly grant access.
  • No upstream credentials in agent code. The upstream server's credential is stored in your project's secret store and injected by Diagrid at request time. The agent holds only its own Diagrid token and receives tool results, never the credential.
  • The upstream URL is hidden. Callers address servers by connection name through Diagrid; they never see or connect to the upstream URL directly.
  • mTLS is on everywhere. Internal traffic between Diagrid workloads is mutually authenticated using SPIFFE identities. You don't configure it; it isn't a per-resource flag.

Threat model​

The failure modes below account for most of the security risk when agents use MCP tools in production. Diagrid's controls map directly to each.

Failure modeWhat it looks likeDiagrid control
Unauthorized tool useAn agent tries to use a tool it isn't entitled to.The MCP access policy filters discovery and rejects the call with 403 at Diagrid's data plane, before it reaches the upstream server.
Over-broad accessAn agent is granted a whole server when it needs only one tool.Policy grants are per-tool, so you allow exactly the tools an agent needs and nothing more.
JailbreakingA prompt persuades the LLM to attempt an unauthorized action.The LLM's decision happens before the platform; authorization runs after. A jailbroken LLM that tries a forbidden tool still hits a deny before any code on the upstream server runs.
Credential leakageUpstream API keys appear in logs, prompts, or agent code.Upstream credentials are resolved from the secret store at request time and never sent to or visible to the agent. The caller's own token is stripped before the call is forwarded upstream.
Caller spoofingA request claims to be from an agent that didn't send it.The caller is identified by its API token at the endpoint and by its SPIFFE identity on the internal hop; both are verified before the policy is evaluated.
No provenanceNo verifiable record of who did what.Every MCP call is recorded by Diagrid's observability pipeline — logs, metrics, traces — alongside the policy decision.

What stays your responsibility​

Diagrid draws the trust boundary at the platform's surface. Some risks live outside it.

Where the trust boundary sitsDiagridtrust boundaryYour agentyour responsibilityUpstreamyour responsibilityLLM picks a toolAuthenticatestops spoofingAccess policydenies by defaultInject credentialkeeps keys hiddenRecord the callallowed or deniedMCP servertool callallowed calls
Where the trust boundary sitsDiagrid checks every call after the LLM has decided, so a jailbroken or injected prompt still meets the policy. The LLM inside your agent and the upstream server itself stay your responsibility.
  • Prompt injection and LLM-layer attacks. Diagrid enforces authorization regardless of what the LLM does, but it does not inspect prompt content. Defense against prompt injection — content filters, output validation — belongs in your agent's pre-LLM and post-LLM layers.
  • The security of the upstream server itself. When you connect to a third-party MCP server (GitHub, Stripe, Linear), Diagrid secures the connection, not the server. Vet third-party MCP servers as you would any other dependency.
  • Audit sink durability and integrity. Diagrid emits observability data to your sinks; their long-term durability and tamper resistance are governed by the sink you write to. Choose one whose retention and integrity guarantees match your compliance obligations.

Next steps​