Production MCP architecture is the design of the network, identity, protocol and service layers that let AI agents use business tools without giving them direct access to databases or application credentials. A sound design keeps those responsibilities separate, checks permission at the point of action and records what happened. Start with a small set of well-defined tools, then add gateway, scaling and discovery patterns when your use case needs them. For help with the design and delivery, see PADISO’s MCP server development service.
MCP, short for Model Context Protocol, is an open protocol for connecting AI applications to external tools and context. A tool could look up an order, query an approved report or create a support ticket. MCP describes how a client and server exchange messages and discover capabilities. It does not replace your identity provider, API gateway, database permissions or business rules.
This guide builds a production design from the basics. It covers the three architectural tiers, transport choices, identity, permissions, data boundaries, scaling, observability and a practical rollout. The exact protocol details can change, so check the current MCP architecture documentation and protocol specification before implementing a particular version.
What does production MCP architecture mean?
A production MCP architecture is the set of components and rules that make MCP usable in a live environment with real users, data and operational risk. Production does not simply mean hosting an MCP server in the cloud. It means the service has clear ownership, controlled access, predictable failure behaviour and enough monitoring to investigate an unexpected tool call.
A useful starting point separates the system into three tiers:
| Tier | Main responsibility | Typical components |
|---|---|---|
| Ingress and transport | Accept, protect and route network requests | DNS, TLS, web application firewall, load balancer, API gateway |
| MCP protocol and policy | Handle MCP messages, expose tools and apply tool-level controls | MCP server, schema registry, authorisation checks, audit events |
| Domain services and data | Perform business operations and enforce data rules | Existing APIs, application services, databases and analytics platforms |
The tiers can run in separate services or share a deployment early on. Their purpose is to make responsibilities explicit, not to require three clusters. A small internal service may use one application with clear modules. A shared enterprise gateway may need independently scaled services and stricter boundaries.
Think of a request to fetch an order. The ingress tier verifies that the request came through an approved route and that its transport is protected. The MCP tier checks whether the caller may invoke get_order and validates the arguments. A domain API then fetches the order using an identity and access scope that the domain system understands. The model does not connect directly to the database.
MCP is not the same thing as an agent. An agent decides what to do, often using a language model. An MCP client connects that application to MCP servers. An MCP server publishes tools, resources or prompts according to the protocol. A production design must account for all three, but the model itself should not become the security boundary.
How should you split an MCP system into tiers?
Tier 1: Ingress, transport and gateway
Ingress is the front door for requests entering a service. The transport is the mechanism used to send those requests. A gateway is a network component that can route traffic and apply controls such as rate limits, authentication checks or request size limits.
For a local developer tool, MCP may run over standard input and output, often called stdio. The client starts the server as a local process and exchanges messages through operating system pipes. This can be a good fit for a workstation or a controlled development environment. It is not, by itself, a shared network service for many users.
For remote access, use an HTTP transport supported by the MCP version and clients you intend to run. Streamable HTTP is the transport specified for remote MCP communication in current protocol documentation. It uses HTTP requests and can support streaming responses. Do not assume every HTTP proxy or agent host handles streaming, sessions or reconnections in the same way. Test the actual path through your gateway, load balancer and client.
The ingress tier should normally handle:
- TLS termination, which encrypts traffic between network participants.
- Request-size and rate limits to control abuse and accidental overload.
- Network routing to the correct server or tenant boundary.
- Authentication integration where it belongs in your design.
- Request validation, including checks against unwanted origins where applicable to the HTTP deployment.
- Basic health checks and protection against abusive traffic.
TLS termination means a gateway decrypts incoming encrypted traffic so it can inspect and forward it. Traffic between the gateway and the MCP server should also be protected according to your network threat model. Do not treat a private subnet as a substitute for authentication.
An API gateway and an MCP gateway overlap, but they are not identical concepts. A standard API gateway commonly routes HTTP endpoints based on paths and methods. An MCP-aware gateway may also understand MCP messages and server capabilities, enforce policy by tool, or aggregate tool catalogues. You do not need an MCP-specific gateway to start. Use existing infrastructure where it can enforce the required controls, and add protocol-aware functions only when a concrete requirement justifies them.
Tier 2: MCP protocol and policy
This tier hosts the MCP server logic. It implements protocol behaviour, describes available capabilities and translates approved tool calls into internal service operations. It should not become a place where business rules are duplicated casually.
Keep each tool narrow and explicit. get_order_status is easier to authorise and audit than run_any_sql_query. A tool schema should specify required inputs, allowed values and the shape of the response. Validate inputs on the server even if the agent has already been shown a schema. The caller can send malformed or unexpected data, and a model can produce an invalid argument.
This layer can also apply policy before a call reaches the business system. For example, it can check whether a role may invoke a tool, whether a requested account is in the caller’s permitted scope, and whether the operation is read-only or changes business state. These checks supplement, rather than replace, the controls in the underlying application.
Keep protocol handling separate from domain logic. The MCP handler can translate a get_order_status request into a call to an order service. The order service remains responsible for rules such as whether the user can view that order and which fields are returned. This separation lets you change MCP clients without rewriting the core order system.
Tier 3: Domain services and data
A domain service is the part of an application responsible for a business area, such as payments, claims or customer accounts. It understands the business rules and owns the operation. The MCP server should call this service rather than reaching around it to write directly to a production database.
A direct database connection can be appropriate for a carefully constrained read-only analytics tool. Even then, use a dedicated database role, limit accessible schemas and columns, enforce query limits, and apply row-level security where required. Row-level security, or RLS, is a database control that restricts which records a user or role can see.
The domain tier is where existing controls should remain effective. If the normal application checks that a user owns an account before returning a statement, an MCP tool should not bypass that check by querying a broad table with a service-wide credential.
Which transport should you use for an MCP server?
Choose transport based on where the server runs, who needs to connect and how your infrastructure handles the protocol. The MCP architecture documentation explains the roles of host, client and server. The MCP specification is the authority for the transport and message requirements of a selected version.
| Situation | A sensible starting point | Main design concern |
|---|---|---|
| Local development or an individual desktop workflow | stdio | Process isolation, local secrets and machine access |
| Shared internal service | HTTP transport supported by your clients | Authentication, network boundaries, deployment and monitoring |
| Long-running operation | HTTP plus an explicit asynchronous job pattern if supported by the client and protocol version | Job ownership, status, cancellation and recovery |
| Existing REST service | A thin MCP adapter or gateway integration | Preserve the original API’s authorisation and validation |
Stdio is useful when a user starts a process locally and trusts that local environment. It does not provide a central authentication layer for a team. Avoid turning it into a production pattern simply because a prototype worked on one laptop.
Remote HTTP makes central operations possible, but creates network and identity responsibilities. Confirm how your chosen MCP client handles authentication, reconnects and errors. Confirm that proxies support the request and response behaviour required by your chosen protocol version. A design that works in a local test may fail when an ingress controller closes an idle connection or imposes a short timeout.
Do not assume a server is stateless just because you use HTTP. A stateless service does not rely on in-process memory to recognise a later request. Some MCP implementations or operations may use sessions or server-side state. If your deployment needs state, document where it lives and how requests reach it. If the selected protocol allows stateless operation for your use case, that can simplify scaling, but test that behaviour rather than inferring it from the transport name.
For a long-running operation, avoid holding a connection open indefinitely. A more resilient design accepts the request, records a job, returns a job reference and exposes a way to check its status. The MCP client must be able to work with the pattern you choose. The job system should persist its state outside an individual server process, and the domain operation should be safe to retry or should detect duplicate requests.
How should identity flow from a user to an MCP tool?
Identity answers who is asking. Authorisation answers what that identity is allowed to do. A production design needs both, and should preserve enough context to apply business permissions consistently.
A typical flow looks like this:
- A person signs in to an agent host or business application through the organisation’s identity provider.
- The host obtains or manages credentials for connecting to the MCP service.
- The MCP service validates the credential and identifies the relevant user, client and tenant claims.
- The service checks whether that identity can call the requested tool with the supplied arguments.
- The service calls a domain API using an appropriately scoped identity or service credential.
- The domain API applies its own access rules before returning data or performing an action.
An identity provider, or IdP, is the system that manages login and issues identity tokens. OAuth is a framework used to grant applications access to protected services. For remote MCP deployments, use the authorisation mechanisms and requirements in the protocol version you implement. The MCP specification’s basic protocol documentation should be read alongside its authorisation guidance, not replaced with a home-grown token convention.
Never give a model a database password, cloud secret or unrestricted API key. The model can decide which tool to request, but it should not hold the credentials used to execute that tool. Keep secrets in a managed secret store or an equivalent controlled system, and have trusted server-side code use them.
Be careful with token passthrough. Passing a token received for one service to a different backend can give that backend a credential with the wrong audience or permissions. The audience is the service the token is intended for. Where supported by the identity provider and required by your design, use a token exchange or on-behalf-of flow to obtain a token for the downstream service with a narrower scope. This is an architectural choice to verify with your identity team, not an assumption that MCP itself performs token exchange.
A service credential can be safer than forwarding a user token in some systems, but it can also grant too much access. If the service credential is broad, the MCP tier must make reliable user-level decisions and the domain API may have no visibility into the originating user. Prefer downstream user delegation where it is supported and practical. Otherwise, constrain the service identity and record the caller identity alongside every operation.
A confused deputy is a service with legitimate access that is tricked into using that access on behalf of someone who should not have it. An MCP server can become a confused deputy if it accepts a user’s request, then uses a powerful shared credential without checking whether that user may access the requested data. Prevent this by validating the caller, tool, arguments and target resource before execution, and by retaining enforcement in the domain service.
How do you authorise tools and protect business data?
Use multiple checks rather than one broad rule. A role-based access control system, or RBAC, grants permissions based on roles such as analyst or support operator. Attribute-based access control, or ABAC, makes a decision using attributes such as user, department, record classification or time of access. Either can work; many organisations combine them.
A practical authorisation decision can consider:
- Who is the user, agent host and tenant?
- Is the tool available to this identity and this agent application?
- Is the requested operation read-only or a state change?
- Does the user have access to the particular customer, order or claim?
- Are the requested fields appropriate for this user and this model provider?
- Is the request within limits for volume, value or frequency?
Separate discovery from permission. A tool catalogue tells an agent what tools exist. It does not prove that the current user can run each one. You can filter tools shown to a user, but the server must still recheck permission at call time. This prevents a client from invoking a tool it was not shown or from replaying an earlier request after access has changed.
Treat tool inputs and outputs as untrusted data. A prompt injection is text that attempts to make a model ignore its instructions or take an unintended action. It can appear in a web page, email, document or database field. Prompt filtering may reduce exposure, but it is not a substitute for access control. Do not let instructions found in retrieved content grant privileges or change the server’s policy.
For sensitive data, minimise what the tool returns. Prefer a response with the fields needed for the task, rather than a full database record. Apply masking or redaction before data is sent to a model if policy requires it. A mask replaces or removes sensitive values, such as a full account number. Check logs and error messages too, because they can accidentally contain personal information or secrets.
In Australia, teams should map the design to their actual privacy and regulatory obligations. The Privacy Act and guidance from the Office of the Australian Information Commissioner may be relevant to personal information. APRA-regulated entities should assess applicable prudential requirements, including information security and operational resilience controls. MCP does not make an organisation compliant by itself. Your control design needs to match the data, business process, provider arrangement and regulatory context. PADISO works with organisations on AI for financial services and AI for insurance where those boundaries matter.
How can you connect existing APIs without rebuilding them?
In many cases, you can place an MCP adapter in front of an existing API. The adapter maps a narrow MCP tool to a specific API operation, validates the input, applies policy and translates the response into a clear result for the agent. The underlying API does not have to become an MCP server.
For example, an existing support API might expose a route to retrieve a ticket and another route to change its priority. The adapter could provide get_ticket and set_ticket_priority. It should not expose a generic tool that lets the model construct arbitrary HTTP requests to every route.
An OpenAPI document describes HTTP API operations and their inputs and outputs. It can help generate a starting tool schema or adapter, but generated tools still need review. API specifications often include operations that are not suitable for an agent, ambiguous field names, broad permissions or response fields the model does not need. Curate the exposed set and test the mapping against real access rules.
Keep a boundary between the adapter and the business system. If the API changes, update and test the adapter. If the domain system performs an action with a financial, legal or customer impact, preserve any required approval or confirmation step. A language model selecting a tool is not the same as a person authorising the business action.
How do you control tool discovery and context size?
Tool discovery is the process by which an agent learns which tools are available and what their inputs mean. Every tool description and schema consumes context in the model’s prompt. Large catalogues can make it harder to find the right operation and can increase input tokens. The size and cost depend on the model, request pattern and how the host supplies tool definitions, so measure your own workflow rather than relying on a universal estimate.
Start by removing duplicate, vague and rarely used tools. Give each tool a clear name, a short description and a focused schema. Group tools around business tasks and permissions. Keep the catalogue for each agent role as small as practical.
For a large catalogue, consider search-based discovery. Instead of presenting every tool to the model on every turn, the system can offer a search operation that finds relevant tool definitions, then expose selected tools for use. Search may combine keyword matching with semantic retrieval. Keyword matching finds literal terms; semantic retrieval finds conceptually related descriptions. The retrieved result should still be permission-filtered and checked by the server when called.
A search layer adds its own risks. It can fail to return a relevant tool, return a tool the user cannot use, or select one with a similar name but different effect. Measure retrieval quality with representative tasks. Include negative tests where the right tool should not be exposed, and test for near-matches such as read versus update operations. For sensitive or high-impact actions, require explicit confirmation or keep the tool unavailable to autonomous execution.
Do not confuse a smaller prompt with safer architecture. Tool search reduces what the model sees; it does not replace server-side permission checks, input validation or audit logs.
How should you handle failures, retries and long-running work?
Every call can fail. A downstream service may be unavailable, a request may exceed a timeout, or the caller may disconnect before receiving the response. Define what the MCP server returns for each failure and make sure the agent can distinguish a business rejection from a temporary infrastructure problem.
Use timeouts at each network boundary. A timeout should reflect the operation’s expected behaviour and the user experience, not a guess copied from another service. Avoid retries for operations that may create duplicate effects unless they are idempotent. Idempotent means repeating the same request has the same effect as doing it once. A payment or account update usually needs an idempotency key or a duplicate-detection rule.
For long tasks, use a durable job pattern. The MCP layer can validate and enqueue work, then return a reference that the client can use to check progress. A worker processes the job outside the request-serving process. Store status and results in a durable system, associate the job with the initiating user and tenant, and define retention and cancellation behaviour.
Add circuit breakers around unstable dependencies. A circuit breaker temporarily stops sending calls to a failing service so the failure does not spread through the system. Return a structured error that says what failed and whether a retry is appropriate. Avoid exposing internal stack traces, database addresses or credentials in the error sent to the model.
Keep human approval for consequential actions where business policy requires it. A good design can separate preparation from execution: the agent drafts a change, a person reviews it, and a controlled tool applies the approved change. The approval record should be tied to the exact action and parameters, not simply to a general statement that the user trusts the agent.
What should you log and monitor?
Observability means being able to understand the system’s behaviour from its logs, metrics and traces. A trace links activity across multiple services. For an MCP tool call, you should be able to follow the request from the agent host through the MCP server to the domain API without logging sensitive content unnecessarily.
Record structured audit events for tool calls. Useful fields include the request or trace identifier, authenticated user or service identity, tenant, tool name, time, authorisation result, downstream service and outcome. Record enough about arguments to investigate the action, but redact or omit sensitive values according to policy. A hash or a small set of approved identifiers may be better than saving full inputs and outputs.
Operational metrics should help answer questions such as:
- Which tools are called, and how often?
- How often do calls fail or time out?
- Which downstream dependencies cause delays?
- Are denied calls increasing or concentrated in one integration?
- Are users repeatedly retrying the same operation?
- Is the system spending time or model tokens on tool discovery and oversized results?
Do not treat model conversation logs as the only audit trail. They may be unavailable, incomplete or inappropriate to retain. Keep a separate operational record with clear access and retention controls. Connect MCP events to your existing incident process and make sure someone owns alerts and follow-up.
A practical rollout checklist for production MCP architecture
Use this checklist before exposing an MCP server to a wider group:
| Area | Questions to answer before launch |
|---|---|
| Use case | What job will the agent perform, and what should it never do? |
| Tools | Is each tool narrow, documented, validated and owned by a team? |
| Transport | Does the selected client support the transport and protocol version in the deployed network path? |
| Identity | How is the caller authenticated, and how is identity carried to the domain service? |
| Authorisation | Are permissions checked at tool-call time and again by the business service? |
| Data | What personal, confidential or regulated data can enter a prompt, response, log or trace? |
| Failure handling | What happens on timeout, duplicate request, disconnect or downstream outage? |
| Operations | Who monitors the service, responds to incidents and updates tool schemas? |
| Testing | Are there tests for denied access, malformed arguments, prompt injection and unintended side effects? |
A staged rollout keeps risk manageable:
- Pick one narrow workflow with a clear owner and a measurable business purpose.
- Map the current user journey, APIs, data fields and approval steps before writing tools.
- Build a small adapter around existing domain operations. Keep credentials and business rules out of model prompts.
- Test authentication, authorisation and failure cases with users who should and should not have access.
- Run the workflow in a controlled environment and inspect tool calls, outputs, latency and user corrections.
- Add production monitoring, incident ownership and a rollback path before broad access.
- Expand the catalogue only when the first workflow is supportable and users can explain its boundaries.
The implementation should have a named owner for each exposed tool. A tool without an owner tends to become an undocumented integration that is hard to retire when its backend changes.
Where PADISO fits
PADISO helps teams design and build MCP servers, agents and the platforms around them. Our MCP server development service can help define the protocol boundary and integration approach, while platform engineering covers the surrounding architecture and operational controls. The first step is to map one valuable workflow to its users, systems, permissions and failure cases.
To move forward, write down one task an agent should perform, the data it needs and the actions it must not take. Then use that as the basis for a design review or speak with PADISO through our contact page.