Quick Answer
MCP architecture is a client-server design with three roles. The host is the AI application, such as an IDE or chat assistant. Inside it, one MCP client connects to each MCP server. Servers expose three primitives: tools the model can call, resources that provide context, and prompts that structure interactions. Messages use JSON-RPC 2.0 over stdio for local servers or Streamable HTTP for remote ones.

Every AI agent eventually hits the same wall: the data and tools it needs live in other systems. MCP architecture is the standard way across that wall. Instead of writing a separate integration between every AI application and every system, the Model Context Protocol defines one interface: a system is wrapped once as an MCP server, and any compatible AI application can use it. This guide walks through how MCP architecture is put together, follows a real request from question to answer, compares the deployment patterns teams actually use, and covers the security decisions that matter most.

Why The Model Context Protocol Exists

MCP Architecture

Picture a company with five AI applications (a coding assistant, a support agent, an internal chatbot and two analytics tools) and eight systems they need to reach. Without a standard, that is up to forty separate integrations, each with its own authentication, error handling and maintenance. Add a new system and every application needs another one.

MCP architecture turns that grid into a hub, which is the whole point of the Model Context Protocol. Each system is exposed once as an MCP server, each application speaks MCP once, and any application can use any server. The official specification borrows the idea from the Language Server Protocol, which did the same for code editors and programming languages.

The approach caught on quickly. Anthropic released MCP in 2024 and in December 2025 donated it to the Agentic AI Foundation under the Linux Foundation, co-founded with Block and OpenAI. ChatGPT, Cursor, Gemini, Microsoft Copilot and Visual Studio Code were among the products listed as supporting it.

One boundary is worth stating early: MCP only standardizes how context and actions are exchanged. Which model you use, how the agent plans and how it manages memory stay with the application and the AI agent framework underneath it.

The Three Building Blocks Of MCP Architecture

The Host: Where The Model And The User Live

The host is the AI application the person actually uses: Claude Desktop, Visual Studio Code, or a custom support agent your team built. It runs the model, holds the conversation, and decides what the user must approve. Because consent lives here, the host is also where most safety decisions are made.

The MCP Client: One Connection Per Server

Inside the host sits one MCP client for every MCP server it connects to. A host using four servers runs four clients. The architecture overview shows Visual Studio Code creating a new client object each time a server is added. This one-to-one design keeps servers isolated: a server only ever sees what its own client sends it.

The MCP Server: Where Your Systems Plug In

An MCP server is a program that exposes capabilities from a system, such as a file share, a database or a CRM. The word says nothing about location. A local MCP server is usually a small process the host starts on the same machine; a remote MCP server is a web service many clients reach over the network.

Underneath these roles, MCP has two layers. The data layer defines the JSON-RPC 2.0 messages themselves, and the transport layer defines how they travel and how requests are authorized. Because the layers are separate, the same server logic can run locally or remotely.

Inside An MCP Server: Designing Tools, Resources And Prompts

The clearest way to understand the three server primitives is to design a server. Take an HR system that employees want to use through an internal assistant.

  • Resources hold read-only context the application loads when relevant: the leave policy, the holiday calendar, the employee’s own profile. Nothing in a resource can change state.
  • Tools are actions the model may decide to take: check_leave_balance, submit_leave_request. Each needs a precise name, a description the model can understand and a strict input schema, because the model picks tools by reading those descriptions.
  • Prompts are reusable workflows a user chooses on purpose, such as “Plan my leave for next month”, which bundles the right instructions and examples.

The most common design mistake is making everything a tool. If the model only needs to read the leave policy, a resource is cheaper and safer. Keep tools for actions and keep each one narrow; submit_leave_request is far easier to secure than a general update_hr_record.

The client can help the server too. Through elicitation, a server can pause a request to ask the user for missing details or a confirmation, for example before submitting a leave request. Two older client features, sampling and roots, are deprecated in the 2026-07-28 revision; new servers should call model APIs directly and receive folders through tool parameters or configuration instead.

Following One Request Through MCP: A Worked Example

MCP Architecture Request Flow

An employee types: “Can I take Friday off?” Here is what happens inside the MCP architecture.

  1. The host receives the question and knows, from earlier discovery, which tools the HR server offers. Discovery uses server/discover and tools/list, and the results can be cached.
  2. The model chooses a tool. Given the question and the tool list, it asks to call check_leave_balance for this employee.
  3. The host checks consent against its rules, and the MCP client sends tools/call to the HR server.
  4. The server does the work, validating the arguments and querying the HR system under the employee’s own permissions.
  5. The result comes back as content blocks, and the model sees there are three days left.
  6. The model answers, and offers to submit the request. If the employee agrees, the server can use elicitation to confirm the date before calling submit_leave_request.

Behind the scenes, the call in step 3 is a short message that names the tool and passes its arguments. Under the current specification, each of these messages also carries its own protocol version and capabilities, which is what makes MCP stateless.

What Changed When MCP Became Stateless

Older explanations of MCP architecture start with an initialize handshake that opens a session. The 2026-07-28 changelog removed that handshake, protocol-level sessions and the Mcp-Session-Id header. Each request is now self-contained, servers advertise what they support through server/discover, and when a server needs more input it returns an input-required result that the client answers by retrying the request.

The practical effect is that a remote MCP server can sit behind a load balancer and scale like any stateless web API. Servers that need state across calls mint their own handles, such as a draft request ID, and receive them back as ordinary tool arguments. If you work with an SDK, confirm it supports the current revision.

Local Or Remote: Choosing A Transport

MCP defines two standard transports, and the choice usually comes down to three questions.

Who will use the server? If it is one person on their own machine, such as a developer working with local files, stdio is the natural fit: the host starts the server as a subprocess and they talk over standard input and output. If many people or agents need it, use Streamable HTTP, where each message is an HTTP POST to a single endpoint and replies come back as JSON or a stream of events.

Where does the data live? Local files and tools point to stdio. Business systems, SaaS platforms and shared databases point to a remote server over Streamable HTTP.

How will you authenticate? Stdio servers take credentials from their local environment. Remote servers should use the OAuth-based flow in the MCP authorization specification, covered in the security section below.

Two practical notes: the older HTTP with SSE transport is deprecated, so new remote servers should not use it; and if a local server must use HTTP, bind it to localhost and still require a token, because other software on the same machine can reach an open port.

Three MCP Architecture Patterns In Practice

Teams rarely deploy a single server in isolation. These three patterns cover most real deployments, and many organizations move through them in order.

Pattern 1: Local Servers On Each Machine

Developers run a handful of stdio servers for files, Git and local databases inside their IDE or desktop assistant. It is quick to set up and needs no infrastructure. The weakness is control: each person installs their own servers, so there is little visibility into what code is running or which credentials it holds.

Pattern 2: Shared Remote Servers

Each important business system gets one remote MCP server, run by the team that owns the system. Every approved AI application connects to it over Streamable HTTP with OAuth. This is the pattern most companies grow into, because one well-secured server serves every agent, and access can be managed centrally.

Pattern 3: A Gateway In Front Of Many Servers

As the number of servers grows, some organizations add a gateway: a single entry point that sits between hosts and many MCP servers. It applies one set of authentication rules, allowlists which servers and tools each application may use, logs every call and can filter tool descriptions before they reach the model. The cost is one more component in the path, which adds latency and must be highly available. Because MCP requests can carry OpenTelemetry trace context, a gateway also makes it easy to follow calls in the same traces you use for AI agent observability.

Securing MCP Architecture

MCP connects a model directly to real systems, and the specification is explicit that the protocol cannot enforce safety by itself. Hosts must get user consent before invoking tools, and tool descriptions should be treated as untrusted unless they come from a trusted server.

For remote servers, the MCP authorization specification builds on OAuth 2.1. The MCP server acts as a resource server and points clients to its authorization server through Protected Resource Metadata. Clients request tokens for that specific server, and the server must reject any token issued for something else and must never pass client tokens through to downstream APIs. The spec also recommends starting with a minimal set of scopes and asking for more only when a privileged tool is first used, so a leaked token unlocks as little as possible.

Five Attacks To Design Against

Tool poisoning. Hidden instructions in a tool description steer the model, for example to read private files and send them elsewhere. Invariant Labs documented this attack along with the next two. Install servers only from trusted sources and review their descriptions.

Rug pulls. A server quietly changes a tool description after users approved it. Pin server versions and alert when descriptions change.

Tool shadowing. One malicious server’s description changes how the agent uses a different, trusted tool. Avoid mixing untrusted servers with sensitive ones in the same session.

Confused deputy. A proxy server that uses one shared client ID with a third-party API can be tricked into handing an attacker an authorization code. The spec’s security best practices require per-client consent and exact redirect URI checks.

Local server compromise. A malicious install command or package runs with the user’s own privileges. Show the full command before installing and sandbox local servers where possible.

The common thread is trust: every MCP server you connect is code and text your agent will act on. Review servers like any third-party dependency and back them with the same least-privilege limits you apply through AI agent guardrails.

Planning to connect your systems to AI agents?
Talk to Xicom’s AI engineers about MCP server design, authorization and security.

Five Common Misconceptions About MCP

“MCP replaces function calling.” It builds on it. The host turns each MCP tool into a function definition the model can call. MCP standardizes where tools come from and how they are invoked; function calling is still how the model asks to use them.

“MCP replaces RAG.” RAG retrieves relevant documents for the model to read; MCP connects the model to systems and actions. They combine well: a retrieval system can be exposed as an MCP server, with search as a tool and documents as resources, so one production RAG architecture can serve every assistant in the company.

“An MCP server has to be a remote service.” Many useful servers run locally over stdio. Remote is right for shared systems, not for everything.

“If it speaks MCP, it is safe.” The protocol defines messages, not trust. Authorization, scopes, consent and server vetting are all decisions you make.

“More tools make a smarter agent.” The opposite is often true. A model choosing among dozens of similar tools picks the wrong one more often, and every tool is more attack surface. Expose the few tools a use case needs, and give each a clear, distinct description.

Should You Build Your Own MCP Server?

If the vendor of a system already publishes a maintained MCP server, start there. Build your own when an internal system has no server, when several teams or products need the same integration, when you need controls an off-the-shelf server lacks, such as your own audit logging or data masking, or when you want customers to connect their AI tools to your platform. If one agent only needs a couple of simple functions, plain function calling is usually enough.

Which systems to expose first, and with what permissions, shapes what every future agent can do, so it is often settled as part of an AI consulting roadmap rather than ticket by ticket.

How Xicom Approaches MCP Architecture

We begin with the systems, not the protocol. With the client, we decide which systems agents genuinely need, what each should expose as a tool, resource or prompt, and which deployment pattern fits their stage, whether that is a few shared remote servers or a gateway in front of many. Servers are built stateless, authorize every request with narrowly scoped tokens, act under the end user’s own permissions and log every call with trace context, then are tested against the current specification and the hosts the client actually uses.

MCP servers usually sit inside a broader custom AI development effort that includes the agents and applications using them. With more than 20 years of enterprise software delivery and ISO/IEC 27001 certification for information security, we treat each MCP server as production infrastructure from the first version.

To expose your own systems to AI agents, see our MCP server development services.

Conclusion

MCP architecture replaces a tangle of one-off integrations with a single protocol: a host that owns the model and the user, one MCP client per server, and servers that expose tools, resources and prompts over stdio or Streamable HTTP. The current stateless design lets remote servers scale like ordinary web services, and the deployment usually grows from local servers to shared remote servers and, at scale, a gateway. What the protocol does not do is decide what to trust. Design primitives carefully, keep tools few and scopes narrow, vet every server you connect, and MCP becomes a stable foundation for every agent you add.

Need an MCP server for your systems?
Get an MCP architecture review covering primitives, deployment patterns, authorization and security from Xicom’s AI team.

FAQs

What is MCP architecture?

MCP architecture is the client-server design of the Model Context Protocol. A host application, such as an IDE or AI assistant, runs one MCP client for each MCP server it connects to. Servers expose tools, resources and prompts, and the two sides exchange JSON-RPC messages over stdio or Streamable HTTP.

What is the difference between an MCP client and an MCP server?

An MCP client is a connector inside the host application that keeps a dedicated connection to one server and passes its tools and data to the host. An MCP server is the program that exposes those capabilities, such as a file share, database or CRM, running locally or remotely.

Should an MCP server use stdio or Streamable HTTP?

Use stdio when the server runs on the same machine as the host and serves one person, such as a local developer tool. Use Streamable HTTP when the server runs remotely and serves many users or agents. The older HTTP with SSE transport is deprecated, so new servers should not use it.

What is an MCP gateway?

An MCP gateway is a single entry point placed between AI applications and many MCP servers. It applies shared authentication, controls which servers and tools each application may use, logs every call and can filter tool descriptions. It adds a component to the request path, so it must be fast and highly available.

Is MCP architecture secure?

MCP architecture can be secure, but the protocol cannot enforce safety by itself. Remote servers should use OAuth 2.1 with tokens issued only for that server and minimal scopes. Hosts must ask for consent before tool calls, and teams should install servers only from trusted sources, because tool descriptions can be poisoned.

Do MCP servers still use the initialize handshake?

Not in the current specification. The 2026-07-28 revision made MCP stateless: every request carries its protocol version and capabilities, and servers advertise what they support through server/discover. SDKs can still talk to older servers that use the handshake, so check that your SDK supports the current revision.

Rishi Malhotra
The Author

Rishi Malhotra

Operations Head · Xicom
With 12+ years of experience in technology leadership, I specialize in building and managing high-performing teams to deliver scalable solutions across mobile, web, AI, and custom software. As Operations Head at Xicom Technologies, I oversee end-to-end delivery for global clients like Coca-Cola, KIA, Emirates, and AT&T, aligning business goals with technical execution. My expertise includes AI, Blockchain, Swift, Kotlin, React Native, and Flutter, with a strong focus on agile delivery, operational efficiency, and measurable business impact.

Make your ideas turn into reality
With our AI & mobile app solutions

Discuss Your Project with Our Experts

5 + 1 =