EXPLAINER17 min read

MCP Gateway Architecture: Secure Enterprise Tools

An MCP gateway puts identity, policy and traffic controls between AI clients and the tools they can call.

P
PADISO teamPublished 5 Dec 2026

MCP gateway architecture places a controlled service between an AI client and the Model Context Protocol (MCP) servers that expose business tools and data. It gives you one place to authenticate users, decide which tools each user can discover and call, limit risky requests, and record what happened. The MCP specification does not require a gateway, but direct connections become harder to govern as clients, users and tool servers multiply. If you are planning a production deployment, start by mapping the identity and tool boundaries in your MCP server development work.

What is MCP, and what does a gateway add?

MCP is a protocol for connecting AI applications to external tools and information. A client, such as an AI assistant or an agent built into your product, can connect to an MCP server. The server may offer tools, such as creating a support ticket, and resources, such as a document or a database view. The protocol defines how the client and server exchange messages. It does not decide, by itself, which employee should be allowed to run a tool or how that tool should be governed across your organisation.

A gateway is a service that sits in the request path. The client connects to the gateway, and the gateway connects to one or more MCP servers. It can inspect MCP messages, apply central policy, and forward permitted requests. In network terms it resembles a reverse proxy, a service that accepts requests on behalf of backend services. The difference is that an MCP gateway needs to understand the meaning of MCP messages, not just their network destination.

Think of a conventional office building. The MCP servers are rooms containing different equipment. The client is a person asking to use a tool. A gateway is the reception and access-control desk. It checks who the person is, which rooms they can enter, and what gets recorded. It cannot make an unsafe tool safe simply by standing in front of it, but it can enforce consistent rules before a request reaches that tool.

A gateway is not automatically necessary for every MCP connection. A developer experimenting with a local server can reasonably connect a client directly to it. Production use changes the situation: multiple users may have different permissions, tools may reach sensitive systems, and a single agent may make repeated calls without a person reviewing each one. Central controls help you manage these risks across teams rather than relying on each client configuration to be correct.

The MCP architecture documentation describes the protocol's client and server roles and its communication model. For an organisation, the gateway is an additional deployment and governance choice around that protocol. It is not a replacement for MCP servers, the identity provider, or the security controls of the systems behind the servers.

How does MCP gateway architecture work?

At a high level, the request path is:

  1. A user signs into an AI client using the organisation's identity system.
  2. The client sends an MCP request to the gateway.
  3. The gateway checks the caller's identity and policy for the requested operation.
  4. If allowed, the gateway sends the request to the relevant MCP server.
  5. The server calls its underlying system, such as a ticketing platform or database.
  6. The gateway returns the result to the client and records an appropriate audit event.

MCP messages commonly use JSON-RPC, a format for sending structured requests and responses. For example, a client can request the available tools with tools/list, then invoke a tool with tools/call. In a remote deployment, several different operations can travel over the same HTTP endpoint. A gateway that only sees the HTTP path may therefore be unable to tell whether a request is asking for a tool catalogue or attempting a consequential action. An MCP-aware gateway can inspect the JSON-RPC method and, where appropriate, the tool name and parameters.

A simplified production arrangement might look like this:

AI client
   |
   | authenticated MCP request
   v
MCP gateway
   | identity, policy, filtering, limits, audit
   |
   +------ Support MCP server ------ Ticketing system
   +------ Finance MCP server ------ Approved finance API
   +------ Data MCP server --------- Governed data service

The gateway should be a policy enforcement point, meaning a component that checks and applies access rules. The identity provider remains responsible for verifying the user's login. Each MCP server remains responsible for its own tool implementation and backend access. The target system should continue to enforce its own permissions where possible. This layered design means a gateway error should not automatically give an agent unrestricted access to a database or business application.

Proxy, gateway and registry are different jobs

An MCP proxy primarily forwards or translates traffic. It may bridge a local process that communicates through standard input and output, often called stdio, to a remote service that uses HTTP. This can solve a connection problem without providing a complete security policy layer.

An MCP gateway adds controls such as identity checks, tool-level authorisation, request limits and logging. A registry is a catalogue that helps teams discover and manage available servers or tools. Some products combine these functions, but they are not interchangeable concepts. Nango's explanation of MCP gateways and proxies is a useful starting point for distinguishing the transport role from the governance role.

A standard API gateway may be adaptable, especially if it supports custom policy logic or plugins. But many API gateways primarily make decisions using HTTP routes, methods and headers. If every MCP operation arrives as a POST to the same route, that layer may not distinguish a harmless discovery request from a write operation inside the JSON-RPC body. Before reusing existing infrastructure, test whether it can parse and enforce policy on the MCP operation itself. Kong's overview of what an MCP gateway does discusses this protocol-specific layer.

Which risks does a gateway reduce?

A gateway helps address several risks that otherwise tend to be handled separately by individual client and server teams. It does not remove the need for secure tool design, identity management or monitoring.

Credentials spread across clients

A direct connection can require each client to hold a secret, such as an API key or personal access token. Those secrets may be copied into local configuration, shared across users, or granted broader access than the task needs. A gateway can instead accept a user identity and obtain or use a separately scoped credential when it calls the downstream service.

The preferred design is not to pass a long-lived backend secret through the model or include it in a prompt. The gateway should keep credentials outside the model's context and avoid returning them in tool responses. Where supported, use short-lived credentials, narrow scopes and a managed secrets system. If the downstream server supports a secure user-delegation flow, use it. Otherwise, a service identity may be necessary, but then the gateway must make sure the service account's broad access is constrained by user-level policy.

OAuth 2.0 Token Exchange, described in RFC 8693, is one standard for exchanging a token for another token with a different audience or scope. It can be part of a delegation design, but does not automatically solve identity propagation. You need to define which identity is represented, what the receiving server trusts, and what permissions the exchanged token grants.

Unclear user identity and access

If a tool server sees only a shared service account, its logs may show that the service account acted, not which employee initiated the request. A gateway can associate the request with a verified user identity and pass appropriate identity context downstream. That context should be trustworthy and protected against client tampering.

Authorisation means deciding what an authenticated identity is permitted to do. Role-based access control (RBAC) assigns permissions through roles, such as finance analyst or support manager. A gateway can apply RBAC to tools, but broad roles are not enough for every operation. A user might be allowed to read a record but not approve a payment, or to create a support ticket but not export all customer data. Policies should account for action, data scope and, where needed, business context.

Enterprise-managed authorisation approaches aim to reduce repeated individual sign-in flows by using identity assertions from a corporate identity provider. The exact protocol and support vary across clients and vendors. Treat terms such as Enterprise-Managed Authorization, ID-JAG or Cross-App Access as implementation-specific until you have checked the relevant specifications and product support. The Highflame overview of enterprise-managed authorisation explains the general direction. Do not assume a feature is universally available just because it has a name.

Excessive tool discovery

When a client asks for tools/list, the server can return descriptions and input schemas for its tools. An input schema describes the expected shape and types of the tool's parameters. If a client receives every tool across every business area, users may see options they should not use, and the model has to consider irrelevant tool definitions.

A gateway can filter the returned list using the user's role, the client or agent's purpose, and the policy for each tool. This is sometimes called schema filtering or tool pruning. For example, an accounts-payable assistant might receive tools to look up an invoice and prepare a payment batch, but not tools to change supplier bank details. The filtering must be enforced again when a tool is called. Hiding a tool from discovery is not authorisation, because a client could still send a direct call if the gateway does not check it.

Schema filtering is useful for security and usability, but it is not a substitute for good tool design. Expose narrow actions with clear names and explicit parameters. Avoid a general-purpose tool such as run_any_sql unless you have strong controls around the query, data access and results. A smaller, safer set of tools is easier to test and review.

Runaway calls and resource use

An agent can make repeated calls because of a loop, a retry policy, a poor tool description or an unexpected response. A simple HTTP request limit may treat every message identically. A protocol-aware gateway can apply different limits to discovery and execution, and different limits to different tools or users.

A token bucket is one common rate-limiting method. It allows a defined burst of requests, then refills capacity over time. This is useful because client start-up can generate several protocol operations close together, while repeated execution calls may need tighter controls. Do not copy a generic request-per-second setting without testing your actual clients. Measure normal connection behaviour, set an intentional burst allowance, and limit expensive or consequential tool calls separately.

The gateway can also detect repeated calls with the same identity, tool and parameters. A duplicate detector may slow or reject an identical request within a defined period. That can help contain a stuck loop, but it requires care. Some legitimate tasks retry an operation after a timeout, and a repeated request may not be safe to block if the first request's outcome is unknown. Use idempotency keys for operations that change state, where the backend supports them. An idempotency key lets the system recognise that a retry is the same intended action rather than a new action.

Audit and investigation

Centralised logs can link a request to a user, agent, tool, policy decision and outcome. That makes it easier to investigate what happened across multiple servers. A useful audit event records enough context to answer who initiated the action, which tool was involved, whether the policy allowed it, and what result or error occurred.

Logging every full prompt and tool response can create a new privacy and security problem. Tool arguments and results may contain personal information, commercial data or credentials. Define what you need for security investigation, redact or omit sensitive fields, control access to logs, and set retention rules. Send events to your established monitoring or security information and event management (SIEM) system if that is part of your operating model.

What should the gateway enforce?

A practical policy should describe more than whether a user can connect. It should state which identity can use which tool, under what conditions, and how the request is controlled. A starting policy matrix could look like this:

Control Example policy question Example implementation
Identity Who is calling, and which client is being used? Validate the user token and identify the registered client.
Tool discovery Which tools may this user see? Filter tools/list using role and tenant policy.
Tool execution Is this user allowed to run this action? Authorise tool name, operation and data scope at tools/call.
Input validation Does the request match the tool's contract? Validate parameters against the published schema and stricter business rules.
Rate control Is the caller making too many or costly requests? Apply per-user, per-tool and per-tenant limits with tested burst handling.
Data protection Does the response contain information the model should not receive? Redact or block sensitive fields before returning the result.
Audit Can the action be reconstructed later? Record identity, tool, decision and outcome with sensitive data minimised.

JSON Schema validation can check whether input has the expected structure, such as a string where a string is required. It cannot prove that the request is safe or sensible. A valid request could still ask for a prohibited account, an excessive date range or a destructive change. Add semantic checks for business rules and enforce permissions in the backend as well.

Treat tool outputs as untrusted input. A tool may return content that includes hostile instructions, private data or unexpected markup. The gateway can remove fields that should not reach the model and enforce output size limits, but prompt-injection protection also depends on how the client and agent handle retrieved content. The gateway is one layer in the defence, not a guarantee that a model will ignore malicious text.

A good control is explicit about what happens when a dependency fails. If the identity provider cannot be reached, should the gateway deny access, or can it use a carefully bounded cached decision? For sensitive tools, fail closed, meaning reject the call rather than allow it without a fresh authorisation decision. Any cached identity or policy decision needs an expiry, an invalidation plan and a documented risk owner.

How to design the network and trust boundaries

Put the gateway where it can reach the MCP servers but where clients cannot bypass it. For example, expose the gateway through an approved internal or external entry point, while keeping backend servers on private network segments. Restrict backend firewall rules so that only the gateway or approved workloads can connect. If a client can still reach a server directly, gateway policy is optional in practice.

Use encrypted connections between components. Mutual TLS (mTLS) is a form of Transport Layer Security in which both ends present certificates, allowing each service to authenticate the other. It can help secure gateway-to-server traffic, particularly between workloads. It does not replace user authentication: a certificate that identifies the gateway does not, by itself, establish which employee asked for a tool call.

Separate the control plane from the data plane where the product supports it. The control plane is where operators configure servers, policies and identities. The data plane processes live MCP requests. This separation can reduce the number of systems that need direct access to credentials or production traffic, but it also creates deployment and availability considerations. Understand where policy is stored, how it reaches the data plane, and what happens during a control-plane outage.

For high availability, run enough gateway capacity to handle expected traffic and maintenance, and test how sessions behave when an instance restarts. The gateway may need to preserve protocol state or connection information depending on the transport and client. Establish timeouts for downstream calls, and bound response sizes so that a slow or unexpectedly large backend response does not consume resources indefinitely.

These are architecture decisions, not merely product settings. PADISO's platform engineering service can help teams define the network, identity and operational boundaries alongside the gateway choice.

How should you choose an MCP gateway?

Start with the controls you need, then evaluate products against them. A feature list can say that a product supports MCP, but that does not tell you whether it can apply policy at the level your risk requires. Ask vendors to demonstrate the whole request path, including denied calls, identity propagation and audit output.

Use this evaluation checklist:

  • Can it authenticate the user, not only the client application?
  • Can it distinguish MCP methods and tool names inside the request body?
  • Can it authorise each tool call after filtering discovery results?
  • Can it pass user identity to the server without trusting client-supplied identity fields?
  • Can it obtain scoped downstream credentials without exposing long-lived secrets to the model?
  • Can it validate arguments and apply additional business rules?
  • Can it limit requests by user, tenant, tool or operation?
  • Can it handle connection-start bursts without blocking normal clients?
  • Can it redact sensitive content and produce useful audit records?
  • Can it prevent clients from bypassing the gateway to reach the server directly?
  • Can you export policy and logs, and understand where data is processed?
  • Can you test upgrades and policy changes before they affect production?

Deployment options include a self-managed gateway, a managed service, or gateway capabilities integrated into an existing API management platform. Self-managed deployments give your platform team more control over network placement and upgrades, but the team owns operations and patching. A managed option can reduce that burden, but you need to assess data handling, identity integration, availability commitments and exit options. An existing API gateway can be a good fit if its MCP support is genuinely protocol-aware, not just a route to an HTTP endpoint.

Products differ in how they implement these capabilities. For example, Solo's agentgateway describes an agent-focused gateway approach, while Tyk's enterprise MCP gateway considerations cover policy and management questions. Treat vendor material as a description of the vendor's product, then verify the relevant behaviour in a proof of concept. Do not assume the same feature set or maturity across vendors.

A proof of concept should use a low-risk server and include at least one read operation and one state-changing operation. Test a permitted user, a denied user, an expired token, malformed parameters, a repeated call, a slow backend and a response containing data that should be redacted. Verify that direct access to the server is blocked. Confirm that your security team can find and interpret the audit event without needing to inspect model prompts unnecessarily.

How do you roll out a gateway safely?

A staged rollout helps you learn how real clients behave without putting every backend behind an untested policy. Start with a small inventory and a narrow use case. Do not begin by exposing every existing tool server through one shared gateway endpoint.

Stage 1: Inventory users, clients and tools

List the AI clients you intend to support, the MCP servers they use, and the business systems behind each server. For each tool, write down what it reads or changes, what data it can access, who owns it, and whether the action has a human approval step. Mark tools that can create external effects, such as sending a message, changing a record or initiating a transaction.

Also identify where identity is checked today. A gateway cannot create a reliable user identity if the client cannot present one and the organisation has not decided how to trust it. Resolve that design before connecting sensitive systems.

Stage 2: Classify and narrow the tools

Group tools by business purpose and risk. Replace broad tools with smaller, task-specific operations where practical. Separate read and write permissions. Define which roles need each tool and which data scope is appropriate. If a tool has no clear owner or its permissions cannot be explained, keep it out of the first release.

Stage 3: Implement identity and backend credentials

Choose how the gateway verifies the user and how it obtains downstream access. Prefer short-lived, least-privilege credentials. Least privilege means granting only the access needed for a specific task. Test token expiry, employee offboarding and permission changes. Ensure that secrets do not appear in client configuration, prompts, logs or tool results.

Stage 4: Add policy, limits and audit

Implement tool-level authorisation and validate the request body. Set rate limits based on observed client behaviour and the cost or impact of each tool. Decide how to handle retries and repeated calls. Send minimised audit events to the systems your operations and security teams already use. Establish an alert for suspicious patterns, but avoid generating alerts for every normal discovery request.

Stage 5: Test failure paths and bypasses

Test malformed input, missing identity, expired credentials, backend timeouts and gateway restarts. Check whether denied requests are logged clearly and whether errors reveal sensitive system details. Verify that backend network rules prevent direct client access. Test changes in a non-production environment and document a rollback path.

Stage 6: Expand by use case, not by server count

Add tools when there is a clear user need and an accountable owner. Review permissions as teams and systems change. Retire unused tools and credentials. Revisit rate limits and audit fields using operating evidence, rather than leaving the initial policy untouched. This keeps the gateway a managed product in your platform, not a one-off security appliance.

What are the common implementation mistakes?

The first mistake is treating the gateway as a magic security boundary. If a tool server has excessive database permissions, accepts unsafe inputs or can be reached directly, the gateway cannot fully compensate. Keep backend authorisation and network controls in place.

The second is filtering tools/list but failing to check tools/call. Discovery filtering improves the client's view, but a caller can still attempt a hidden tool unless execution is independently authorised. Enforce the same policy at the point of action.

The third is using one broad service account for every user and tool. This makes identity and audit difficult, and it can turn a gateway compromise into an organisation-wide access problem. Scope credentials by service and purpose, and preserve user attribution.

The fourth is applying rate limits to all messages as if they were equally risky. Protocol setup and tool execution have different effects. Observe normal clients, allow necessary connection bursts, then apply tighter limits to costly or state-changing calls. Rate limits should protect service health, not silently break normal sessions.

The fifth is logging too much. Full prompts and tool responses may contain sensitive information. Capture enough to trace decisions, but define redaction, access and retention before sending logs to a central system.

The sixth is assuming a protocol label guarantees compatibility or security. MCP clients, transports and gateway products can differ in implementation and supported features. Test the exact clients, servers, identity flows and failure cases you intend to run.

Finally, avoid building a gateway that becomes a single point of operational failure. Define its availability needs, capacity, upgrade process and recovery plan. A central policy point is valuable only if you can operate it reliably and understand what happens when it is unavailable.

Where PADISO fits

MCP gateway design sits across AI integration, identity, platform architecture and operational security. PADISO helps teams assess the use case, design the tool and gateway boundaries, and build or integrate the production components through our AI agents and automation service and MCP server development service. The first step is to map one agent workflow, the systems it touches and the decisions that must remain under human control.

If you are preparing an MCP deployment, take the PADISO AI readiness test and use the result to identify gaps in identity, data access and operating ownership before you expose tools to users.

WANT TO TALK THROUGH YOUR SITUATION?

Talk it through with us. Thirty minutes, no slides.

P
Written by the PADISO TeamSydney-based technology leaders who build what they advise on. Seven years of fractional CTO, architecture and AI work for enterprise, government and private equity.

Keep reading

All posts →

Let's talk.

Tell us what you are weighing up, whether it is a build, a roadmap or a deal. You will leave the call knowing your next step.

Book a 30-min callhi@padiso.co