The MCP Gateway for Least Privilege is here Formal released an MCP Gateway that enforces least privilege on Model Context Protocol connections by intercepting MCP traffic at the network layer and applying programmable policies, addressing the gap Formal identifies in the MCP standard's OAuth scopes and tool annotations. Formal illustrates the problem with an infra agent named Sam whose GitHub MCP connection, granted the classic OAuth `repo` scope, also carried permissions including `delete_file`, `create_repository`, `merge_pull_request` and `update_pull_request_branch`, while a Grafana token allowed alert management when Sam only needed to query metrics. Setup requires installing Formal Endpoint as a forward proxy on the agent's VM, routing MCP traffic through a network rule, and deploying the MCP Gateway as a Formal Connector in the customer's VPC via Formal Helm charts. This is Sam: Sam is the infra firefighter agent at your company. It helps you triage, investigate and resolve production alerts during incidents. In order to do this, you hosted Sam’s harness on a cloud VM and connected multiple MCPs to it: Sentry, Grafana, Linear, GitHub and Slack. However, during an incident yesterday, something weird happened: 1. Sam investigated a checkout crash in Sentry. The error context included the customer’s email and billing address. 2. While investigating, it tried to silence duplicate checkout notifications in Grafana. Its token allowed alert management, even though Sam only needed to query metrics. 3. Sam silenced alerts for service=checkout instead of just the specific crash alert. Notifications for other checkout issues were silenced too. 4. It opened a GitHub PR with a fix, then copied the raw error into a Linear issue and the Slack incident channel. 5. The bug got fixed, but customer data was now visible to people who never had access to Sentry, and the broad alert silence remained active. How could you secure your MCPs against this? The MCP standard provides OAuth scopes and tool annotations, but the latter can be completely ignored, and scopes are not standardized to enforce least privilege. The fundamental issue is that approving an MCP connection does not answer what should happen inside that connection. Take GitHub MCP as an example. With classic OAuth https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps available-scopes , commenting on a private repository’s PR requires the repo scope, which also gives: create or update file push files delete file create branch create repository fork repository issue write add issue comment update issue comment create pull request update pull request update pull request branch merge pull request pull request review write add comment to pending review add reply to pull request comment So this is what Sam actually looks like: Formal aims to deploy real least privilege everywhere, including MCPs. To achieve this, Formal works at the network layer, intercepts incoming and outgoing traffic such as MCP calls, and helps you define programmable policies to map the exact behaviors you want to enable. Here’s how you can configure Sam with Formal 1. Setting up Sam Start by installing Formal Endpoint https://docs.formal.ai/docs/guides/client-apps/linux , the forward proxy, on Sam’s VM and authenticating it. bash $ formal auth whoami Username: idp:formal:machine:sam $ formal transparent-proxy status Catch-all transparent proxy is active. All TCP traffic is being intercepted. From there, you can select which network traffic to intercept with a network rule https://app.formal.ai/network-rules to route Sam’s MCP traffic through Formal: { "condition": { "pre tls": user.id == "