Enterprise MCP security means controlling what an AI host can discover, call and pass to each connected tool, then containing the consequences if a control fails. Build that control as a system around MCP, not as a setting on one server: authenticate every connection, restrict each action, isolate execution, require approval for consequential changes and record enough evidence to investigate what happened. If you are designing the MCP layer itself, see our MCP server development service.
This guide is for platform architects and security teams implementing internal MCP servers for agents. It gives you a step-by-step approach to planning, access control, gateway design, sandboxing, approval gates and production checks. The core principle is simple: an agent should receive only the tools and authority it needs for a specific task, and every boundary should be enforced outside the model.
MCP is a protocol for connecting AI applications to tools and data sources. It standardises how a host discovers and invokes server capabilities, but it does not replace your identity system, application authorisation, network controls or security review. The MCP authorisation specification is a useful starting point for understanding protocol-level authorisation. For broader implementation decisions, our AI agents and automation service covers the design and production controls around agent workflows.
What should enterprise MCP security have in place?
Do not begin by selecting a gateway product. Begin by finding out what is already running and what each tool can do. A platform team cannot apply useful controls to a server it does not know exists, or to a tool whose access and side effects are undocumented.
Make an inventory of hosts, servers and tools
Create an inventory that records:
- The agent host or application that connects to each MCP server.
- The server owner, business purpose, deployment location and support contact.
- The transport used and how the process or service is started.
- Every exposed tool, resource and prompt, including its input schema and intended use.
- The systems and data each capability can reach.
- The identity used downstream, the permissions it has and how credentials are stored.
- Whether calls read data, change state, send communications or run code.
- Where logs are stored and who can review them.
Include local development integrations as well as centrally hosted services. A local process can have access to a developer's files, environment variables or cloud credentials. A remote service can be reachable from several hosts and may have a larger blast radius. Neither is safe simply because it is labelled internal.
Classify risk by action and data
Classify capabilities by what they can do, not by the name of the server. A tool called lookup_customer might return a full customer record. A tool called preview_change might still trigger a write if its implementation is wrong. Review the handler and downstream permissions, not just the manifest description.
A practical classification has three dimensions:
- Impact: What happens if the tool is called incorrectly or maliciously?
- Data sensitivity: What information can the tool return or expose to a model provider?
- Reach: Which services, accounts, networks or users can it affect?
Use the highest risk dimension to determine the first controls to apply. A read-only query over public documentation needs less friction than a bulk payment, account deletion or production deployment. But read-only does not mean harmless: broad retrieval can expose personal or commercially sensitive information.
Decide which calls are in scope for a first release
Keep the initial production set small. Pick a clear business workflow, identify the minimum tools it needs and write down what successful and unsafe execution look like. Our AI strategy and solutioning service can help teams prioritise use cases and define the operating boundaries before they build.
Do not start with broad, general-purpose access to internal systems. A narrow workflow is easier to test, monitor and explain to security reviewers. Expand only after you can show that the current set of tools behaves as intended and has working controls.
Step 1: Set a trust boundary around each MCP connection
Draw the request path from the user to the host, through the MCP server, to the system of record. Mark where identity changes, where untrusted content enters, where data crosses a network boundary and where a write can occur. This diagram becomes the basis for your design and test plan.
Treat these components as separate trust zones:
- User and identity provider: authenticates the human and establishes their permissions.
- Host or agent runtime: chooses tools and constructs arguments. It can make mistakes or be manipulated by prompt content.
- MCP gateway: applies central policy to connections and tool calls.
- MCP server: implements capabilities and translates calls into downstream operations.
- Business system: enforces the final permission check and owns the authoritative data.
- Execution sandbox: contains code or processes that should not share the host's full privileges.
The host is not a security boundary just because it displays a confirmation prompt. Model output is not a trusted instruction. Tool descriptions and returned content can be malicious, compromised or simply misleading. Security decisions must be enforced by components that do not rely on the model following instructions.
The MCP security overview from Anthropic introduces the protocol and its intended role. For implementation, apply the same basic caution as you would to any integration layer: validate identity and inputs at the boundary, and enforce permissions again in the system that performs the action.
Prefer a managed remote boundary for production
For a centrally governed service, put a managed gateway or equivalent policy point between hosts and remote MCP servers. This gives you one place to authenticate clients, apply allowlists, record calls and manage approved server versions.
Local stdio connections may be convenient in development, but production use needs an explicit threat review. The process inherits operating-system context from the host that launches it, and the organisation may have limited visibility into what it can access. If you retain local execution, isolate it, restrict its file and network access, control how packages are installed and capture activity centrally where possible.
A gateway does not make an unsafe server safe by itself. It is one control point, not a substitute for server-side authorisation, secure implementation or downstream access checks.
Step 2: Approve the server and pin its tool definitions
Treat each MCP server as software that needs an owner, version and review. Before connecting a host, establish how the server is built, tested, deployed and updated. Use a controlled build pipeline and a trusted package source. Review dependencies and verify that the deployed artefact is the one that passed review.
Tool definitions deserve the same attention as executable code. A name, description or input schema can influence which capability an agent selects and what arguments it sends. Changes to metadata can therefore change runtime behaviour even when the server's application code appears unchanged.
A useful approval process is:
- Capture the complete set of tools and their schemas from the candidate server.
- Review names, descriptions, argument types, required fields and stated side effects.
- Map every tool to a named owner and a downstream permission.
- Save an approved definition version or cryptographic hash in your release record.
- Compare the live definitions with the approved version on deployment and at an appropriate interval.
- Block or quarantine unexpected changes until a reviewer approves them.
Hashing a manifest detects a change; it does not prove that the original definition is safe. A malicious description can be present in the first approved version. Review the actual implementation and test the tool's behaviour as well.
Apply the same change control to server URLs, package versions, configuration, credentials and downstream endpoints. Do not allow a server to silently expand from an internal read-only source to a system with write permissions. A change to capability or access should trigger review just as a code change would.
The OWASP MCP Top 10 overview is a useful checklist for protocol-related risks, including token handling, tool poisoning, authentication gaps and excessive data exposure. Use it to inform your review, not as a replacement for testing the implementation you plan to deploy.
Step 3: Authenticate every caller and issue narrow tokens
Require authentication for remote connections. Do not rely on a server being hard to find, reachable only from a corporate network or called by a known agent. Network location can be one signal, but it does not establish which user or workload is making a request.
Use your organisation's identity provider and define separate identities for human users, agent workloads and server processes. Where a workflow acts on a person's behalf, preserve the relationship between the user and the workload. The downstream operation should be authorised against the person's actual permissions, not just a highly privileged service account assigned to the agent.
Scope access to a specific server and action
Issue short-lived tokens with the least privilege needed for the task. Bind a token to its intended audience or resource so a credential issued for one service cannot be reused at another. The MCP authorisation specification describes the protocol's approach to protected resources and access tokens; align its requirements with your identity provider and application architecture.
Avoid these common shortcuts:
- A shared administrator token used by every agent and tool.
- A long-lived API key in an agent prompt, tool result or local configuration file.
- A token that grants both read and write operations when the workflow only needs to search.
- A service identity that bypasses the user's permissions without an explicit business decision.
- Passing an upstream credential into a model context so the agent can use it directly.
Instead, keep upstream credentials in a broker or server-side secret store. The server should obtain or use the credential only when a permitted call is made. Return a result to the agent, not the secret that enabled the call. If the host is compromised, the agent's view should not include reusable credentials for other systems.
Enforce authorisation in the server and downstream system
A gateway can check whether a caller may invoke a tool, but the MCP server should still validate the user's identity, the requested operation and the resource being changed. The downstream business system should enforce its own access control wherever possible.
For example, a ticketing agent may be allowed to read assigned tickets but not change billing details. Enforce that distinction in the application API, not only by hiding a tool from the model. A hidden tool can still be called if another component is misconfigured or compromised.
For high-impact operations, pass a user identity or a verifiable delegated context through the call chain. Log both the agent identity and the originating user. If your identity platform supports delegated authorisation, test how it handles expiry, revocation, refresh and the user's changing permissions.
Step 4: Put policy between the host and the server
A gateway or policy enforcement point should control which hosts can connect, which servers they can reach and which tools they can invoke. The exact deployment can vary, but the policy should be explicit and testable.
At a minimum, consider controls for:
- Client identity: which registered host or workload is making the request.
- Server allowlisting: which MCP endpoints and versions are approved.
- Tool allowlisting: which tools a specific workflow may call.
- Argument validation: whether values match the expected schema and business rules.
- Rate and volume limits: whether a call pattern is outside normal use.
- Data handling: whether a response contains information the host should not receive.
- Change detection: whether the server's definitions or configuration have changed.
JSON schema validation catches malformed types and missing fields. It will not establish that a value is sensible or safe. A valid account identifier can still refer to the wrong account. Add business rules such as permitted record ownership, allowed date ranges, maximum transaction size or a check that the target environment is not production.
Do not assume that filtering words in a prompt or response is a reliable prompt-injection defence. Untrusted text may be indirect, encoded or mixed with useful content. Reduce risk by limiting what tools can do, separating untrusted data from instructions where the host supports it, requiring confirmation for consequential actions and preventing retrieved content from granting new authority.
Keep tools small and specific
Prefer a tool such as get_invoice_status over a generic tool that accepts arbitrary SQL or a shell command. Narrow interfaces are easier to authorise and audit. They also reduce the number of ways that unexpected model output can affect the backend.
If a general-purpose capability is necessary, put it behind stronger controls. Validate arguments, restrict available operations, set resource limits and use an isolated execution environment. Make the boundary visible in the risk register and in the approval workflow.
Step 5: Sandbox code and constrain network access
Sandboxing limits the damage if a tool runs unsafe code or a process is compromised. Choose the isolation level based on what the server executes and what it can reach. A container is not automatically a strong security boundary, especially if it shares a host kernel, has broad filesystem access or can reach internal networks.
| Execution pattern | Suitable starting control | Main trade-off | Example use |
|---|---|---|---|
| Read-only API connector with fixed operations | Hardened container, minimal permissions and restricted egress | Shares the host kernel, so configuration and host security matter | Querying a specific internal service |
| Data transformation or parsing of untrusted files | Stronger container isolation or a user-space kernel, plus resource limits | Adds operational complexity and can affect compatibility | Extracting structured information from uploaded files |
| Agent-generated shell commands or arbitrary code | MicroVM or similarly strong isolation, disposable per task where practical | Higher startup and infrastructure overhead | Running generated scripts against synthetic or approved input |
This is a design comparison, not a claim that one technology is safe by default. Validate the actual configuration and threat model. The MCP execution sandboxing guide offers further background on isolation choices.
Apply a baseline to any sandbox that runs untrusted or model-generated work:
- Run as a non-root user and drop unnecessary Linux capabilities.
- Make the root filesystem read-only where the workload permits.
- Use temporary storage and remove it after the task.
- Set CPU, memory, process and execution-time limits.
- Deny network access by default, then allow only required destinations.
- Do not mount developer home directories, host sockets or cloud credential files.
- Keep secrets outside the sandbox and provide narrowly scoped access through a broker.
- Separate workloads between users or tasks when their data must not mix.
Be precise about what read-only means. A process may have a read-only filesystem and still exfiltrate data over the network. A network-denied process may still access a mounted secret. Test combinations of filesystem, process and network controls rather than relying on a single sandbox label.
Use a controlled path to downstream services
A sandbox should reach only the APIs needed for its task. Put those connections behind an authenticated proxy or service endpoint that checks identity and policy. Avoid broad subnet access, unrestricted DNS or a default route to internal systems.
Keep the MCP server and its execution environment separate where possible. A server that accepts tool requests should not automatically share the same privileges as a process that runs arbitrary code. If a workload needs to call a downstream API, give it a constrained route and identity, not access to the entire internal network.
Step 6: Require approval for actions with real consequences
Classify actions by their effects and set approval rules before launch. Do not rely on an LLM's description of what it intends to do. The policy engine should identify the operation from the tool and validated arguments, then decide whether it can proceed.
A sensible starting policy is:
- Read: allow within the user's access and data-minimisation rules.
- Low-impact change: allow only if the user has permission and the change is reversible or readily reviewed.
- High-impact change: require explicit human approval before execution.
- Destructive or broad action: require stronger verification, a second approver or prohibit the workflow until a separate control is designed.
Examples that often need stronger gates include deleting records, changing access permissions, sending a bulk communication, moving money, altering production infrastructure or exporting sensitive data. Decide based on your own operational risk and applicable obligations.
The approval screen should show the exact action and the parsed target values. It should not display only a vague message such as 'the agent wants to update a record'. Show which record, which fields will change, the current and proposed values where appropriate, and the effect of confirming. Bind approval to that specific request and expire it if the arguments change.
Treat an approval as authorisation for one defined action, not a reusable permission for the rest of the conversation. If a user edits a parameter after approving, require a new decision. Record the approver, the time, the request and the final result.
Step 7: Log the full decision path and monitor behaviour
A useful audit trail connects the user request to the tool call and the resulting change. Without that chain, a log entry that says only 'tool invoked' will not help an incident responder establish what happened.
For each call, capture fields such as:
- Request or trace identifier, timestamp and environment.
- Human user identity, agent identity and MCP client identity.
- Server name, approved version and tool definition version.
- Tool name and validated arguments, with sensitive fields redacted or tokenised.
- Policy decision, approval status and approver identity where relevant.
- Downstream system and operation identifier.
- Success or failure status, duration and a suitably minimised result summary.
- Any validation, authorisation, rate-limit or sandbox event.
Do not log secrets or full sensitive payloads merely because they are available. Set retention and access controls for audit data, and decide how to preserve enough evidence without creating a second store of personal or confidential information. Logging should be designed with your privacy and security teams.
Send events to the organisation's central monitoring and incident response systems. Set alerts for patterns that matter, such as an unexpected tool definition change, repeated denied calls, attempts to invoke tools outside an allowlist, unusual volumes or a write operation without the expected approval record. Review whether alerts are actionable and who owns them outside business hours.
For Australian regulated organisations, assess how the design fits your information security, operational risk, privacy and third-party risk obligations. For example, APRA-regulated entities should involve the accountable security and risk teams when mapping MCP assets, access controls and service-provider dependencies to applicable requirements. Do not assume that putting an MCP gateway in place demonstrates compliance by itself.
Step 8: Test the controls before production
Test negative cases, not just the intended happy path. A successful demo proves that a tool can work. It does not prove that the host cannot call the wrong tool, the server cannot be impersonated or a compromised process cannot reach unrelated systems.
Build a test suite that covers:
- Authentication: missing, expired, invalid and wrong-audience credentials are rejected.
- Authorisation: a user without permission cannot read or change a protected resource, even if the host requests it.
- Scope: a token for one server or operation cannot be reused for another.
- Manifest changes: an altered tool name, description or schema is detected and handled according to policy.
- Input handling: malformed, oversized and unexpected arguments are rejected safely.
- Prompt injection: untrusted tool output cannot independently grant access or bypass an approval gate.
- Sandbox containment: the process cannot read host secrets, write outside its temporary area or access unapproved network destinations.
- Approval integrity: changing arguments after approval invalidates that approval.
- Logging: allowed, denied, failed and approved calls all produce the expected audit record.
- Recovery: credentials can be revoked, a server can be disabled and a compromised version can be rolled back.
Test with a harmless environment and synthetic data first. Include the team that owns the downstream system, since it can confirm whether its own permissions and audit trail behave as expected. Re-run relevant tests after changes to the host, gateway, server, identity provider or tool definitions.
Step 9: Operate the service as a product
Security is not a one-time review. Assign an owner for the gateway, each server and every downstream integration. Define who approves new tools, who handles incidents and who can disable a connection. Keep an up-to-date inventory and make removal of unused tools part of normal service maintenance.
Use a staged release process:
- Development: test with synthetic data and restricted credentials.
- Pre-production: verify identity, policy, logging, network restrictions and approval flows end to end.
- Production: enable only approved workflows, monitor them and maintain a rapid disable path.
Changes should move through version control and review. Keep configuration that affects access, egress and approval in a controlled deployment process. Avoid emergency edits that cannot be traced or reproduced.
Review permissions periodically and when a user changes role, a workflow changes or an integration is retired. Remove unused credentials and endpoints. Confirm that service owners still need each exposed capability and that logs are reaching the right place.
For a broader architecture and operating model review, our enterprise architecture and platform engineering team can help map the boundaries and delivery controls. Teams building their own server can also review our MCP server development service.
Common mistakes to avoid
Treating MCP as the whole security model
The protocol describes how components communicate. Your application still needs to decide who can call a tool, what data they can see and which business rules apply. Put those decisions in enforceable controls around and behind the protocol.
Giving the agent a powerful credential
A broad key makes a simple integration, but it also makes an agent compromise more consequential. Keep credentials in a server-side broker and restrict each operation to the smallest useful permission set.
Relying on descriptions or model judgement
A description helps the model select a tool, but it is not an access control. A model can misunderstand, and metadata can change. Enforce permissions and action rules in code.
Assuming read-only means low risk
A read can expose customer data, internal plans or credentials accidentally returned by a poorly designed endpoint. Limit the records and fields returned, and inspect what enters the model context.
Making approval a rubber stamp
An approval that does not display exact parameters, expires slowly or survives a parameter change does not meaningfully control execution. Bind approval to one reviewed action and record the decision.
Logging everything without considering exposure
Full prompts and responses may contain personal information, secrets or confidential business data. Log what supports security and operations, redact sensitive content and protect audit records from broad access.
A practical launch checklist
Before enabling a production workflow, confirm that:
- Every MCP server and host has an owner and is in the inventory.
- Each tool has a reviewed purpose, schema, permission and risk classification.
- Production connections use approved endpoints and authenticated identities.
- Tokens are short-lived, narrowly scoped and not exposed to the model.
- The user and agent identities remain traceable through downstream calls.
- Server-side and downstream authorisation reject unauthorised operations.
- Tool definitions and deployed versions are controlled and monitored for changes.
- Code execution runs in a sandbox with restricted filesystem, resources and egress.
- Consequential actions require explicit, parameter-specific approval.
- Logs capture the decision path without retaining unnecessary sensitive content.
- Negative tests cover access, injection, containment, approval and recovery.
- An incident owner can disable a server, revoke credentials and preserve evidence.
Where should you start?
Start with one workflow and one server. Inventory its tools, identify the data and actions each can reach, then draw the request path from user to downstream system. Use that map to choose the smallest permission set and the controls that must be enforced before the first production call.
Enterprise MCP security is not achieved by a single gateway, token standard or sandbox. It comes from layered controls that remain effective when the model makes a poor choice, a tool is misconfigured or a component is compromised. PADISO helps teams design and build these systems through MCP server development, AI automation and platform engineering. The first step is to review one real workflow and agree which actions it must never perform without a person in the loop.