ServicesSalesforce consultingArchitectureImplementationOrg health checkDevelopmentIntegrations and APIsData migrationTesting and QAManaged supportSpecialist supportMarketing Cloud auditDeliverability
SolutionsMarketing Cloud EngagementMarketing Cloud NextSalesforce + BrazeAccount EngagementData Cloud (Data 360)Identity resolutionInsights and segmentsAgentforce and AIMCP integrationsSales and Service CloudReal-time personalisationIntegration solutionsEnterprise AI integrationBy industry
ArchitectureSalesforce CRMData 360Salesforce + BrazeAgentforceCustomer 360API-led integrationEvent-drivenMCP host, client and serverIdentity and consentMCP securityData governanceCI/CD and releasesOur public MCP server
ResourcesEngineering journalDecision guidesSolution blueprintsSalesforce productsProjects and achievementsSales ROI calculatorWhere we workChecklists and templatesPlanning toolsReadiness assessmentGlossaryAbout GeekMidstOur approachContact
CompanyAbout GeekMidstOur approachDelivery methodologyTrust and evidenceProjectsAchievementsBook a consultationContactWhere we workSecurity and data
Book a Consultation

MCP Security and Governance

The MCP specification's security best practices in plain English, and the enterprise controls around them: registries, approvals, audit, data classes and incidents.

Type
Resource
Topic
MCP
Reading time
5 min
Updated
Author
GeekMidst Team
Reviewed by
Site owner
Talk to an expert
Banner for the GeekMidst free resource “MCP Security and Governance”, covering Start with the authorisation model and The spec's named risks

MCP gives AI applications a standard way to reach your data and actions. That makes it useful, and it also means a weak server can be reached by every assistant that connects to it. This resource summarises the security best practices in the MCP specification (2026-07-28) and adds the enterprise governance that sits around them. It is guidance, not a compliance guarantee: check regulatory points with your legal adviser.

Start with the authorisation model

Authorisation is optional in MCP, which is fine for public, read-only content like the GeekMidst MCP server. Any server that touches non-public data should follow the spec's authorisation rules:

  • The server is an OAuth 2.1 resource server and must publish RFC 9728 protected resource metadata naming at least one authorisation server.
  • On 401 it sends a WWW-Authenticate header pointing to that metadata.
  • Tokens arrive as Authorization: Bearer on every request, never in the query string.
  • The server must check the token was issued for it (audience, RFC 8707). Invalid or expired tokens get 401; insufficient scope gets 403 with insufficient_scope.
  • Clients use PKCE and send the resource parameter. Client ID Metadata Documents are the recommended registration route; Dynamic Client Registration is deprecated in 2026-07-28.

The MCP security and authorisation architecture shows these flows as a diagram.

The spec's named risks

Confused deputy

A proxy-style MCP server that talks to a third-party authorisation server on behalf of many clients can be tricked into granting one client access approved for another. The spec requires such proxies to obtain per-client consent before forwarding to the third-party authorisation server and to validate redirect_uri exactly.

Token passthrough

Forwarding the token a client sent straight to an upstream API is explicitly forbidden: "MCP servers MUST NOT accept any tokens that were not explicitly issued for the MCP server." Passthrough bypasses audience checks, rate limits and audit at the server. Use a separate credential or token for the upstream API, held server side.

Server-side request forgery (SSRF)

Any time a server or client fetches a URL it was given, such as a metadata URL during discovery or a link inside tool arguments, it can be pointed at internal addresses. Allowlist destinations, block private and link-local ranges, and do not follow redirects blindly. The spec's SSRF section has the detailed guidance.

State handle hijacking

This replaces the older session hijacking section. Servers that implement authorisation must verify every inbound request and must not use sessions or state handles for authentication. Identifiers must be secure and non-deterministic, and should be bound to the user (for example <user_id>:<session_id>).

Local MCP server compromise

Local servers run with the user's own rights, so a malicious or careless install can read files or run commands. Review what a local server can do before installing it, prefer reviewed packages, bind local HTTP servers to 127.0.0.1 and authenticate their connections, as the transport rules advise.

Scope minimisation

Request the smallest scopes for the task and add more only when a tool needs them. Broad tokens turn a small mistake into a large incident. The spec also covers authorisation URL validation, mix-up attacks, localhost redirect URI impersonation and Client ID Metadata Document trust policies; read those sections if you run an authorisation server.

Prompt injection through tool outputs

Tool results and resources are data that the model reads. A document, email or record can contain text written to steer the model ("ignore your instructions and…"). Controls:

  • Treat every tool output as untrusted content, and say so in the host's instructions.
  • Keep write tools behind human confirmation that shows the exact arguments.
  • Split read and write capabilities across servers, so a poisoned read cannot quietly trigger a write.
  • Treat tool annotations as hints: the spec says clients must treat them as untrusted unless the server is trusted.

Braze, for example, advises against client "auto-mode" for its server, and Slackbot requires per-call user approval for third-party tools.

Enterprise governance controls

ControlWhat it means in practice
Server registry and allowlistsAn internal list of approved servers, their owners and their tools. Agentforce admins allowlist tools before agents can use them; MuleSoft Agent Registry inventories MCP servers. The public MCP Registry is in preview and lists only public servers.
ApprovalsA named owner approves each new server and each new write tool, with a security review of its permissions.
AuditEvery call records caller, tool, outcome and time. Salesforce Hosted MCP Servers record the user in the audit trail; Braze logs OAuth connections to its security event report.
Data classificationEach tool states the highest data class it can return. Restricted data stays out of tools unless there is a documented need.
Least privilegePer-user OAuth where possible, so each call runs with the user's own permissions rather than a shared account.
Incident responseKnow how to revoke tokens, disable a server and remove a tool quickly. Braze admins can revoke all MCP tokens; Salesforce standard servers are off until an admin enables them.

Governance rollout

  1. 01

    Inventory

    List every MCP server and client already in use, including local ones on developer machines.

  2. 02

    Classify

    Record each server's data classes, read/write scope and owner.

  3. 03

    Decide

    Approve, restrict or remove each server, and allowlist the tools you keep.

  4. 04

    Protect

    Enforce OAuth, audience checks, origin validation and rate limits on remote servers.

  5. 05

    Monitor

    Review audit logs and failed calls, and alert on new or unusual tools.

  6. 06

    Rehearse

    Practise revoking tokens and disabling a server before you need to.

Questions we hear

Is a read-only server safe by default?
Safer, not safe. It can still leak data to the wrong user or return injected text. Access control and isolation tests still matter.
Can we let the AI use a shared service account?
It is simpler, but every call then runs with the account's rights. Per-user OAuth keeps permissions and audit tied to a real person.
Do tool annotations stop destructive actions?
No. They are hints for the client. Enforcement belongs in the server and the upstream system's permissions.
Who should own MCP governance?
Usually the team that already owns API and identity governance, with security approving new write tools.

Sources

  • https://modelcontextprotocol.io/specification/2026-07-28/basic/security_best_practices
  • https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization
  • https://modelcontextprotocol.io/docs/2025-11-25/tutorials/security/security_best_practices
  • https://modelcontextprotocol.io/specification/2026-07-28/server/tools
  • https://developer.salesforce.com/blogs/2026/04/salesforce-hosted-mcp-servers-are-now-generally-available
  • https://www.braze.com/docs/developer_guide/mcp_server/setup/

Get an MCP security review

We will review your servers, tokens, tools and approval rules against the spec's best practices and your own policies.

Book a consultation →

Tell us what you are trying to fix.

Share your Salesforce setup, goals and constraints. A practitioner reads every message and replies with questions, first thoughts or an honest view of whether you need outside help at all.

Talk to a Salesforce Expert
Book a Consultation