Nexolve

Architecture · Agents

Model Context Protocol (MCP) Architecture, Explained

The short answer

The Model Context Protocol (MCP) is an open standard for connecting AI applications to tools and data. An AI application (the host) runs an MCP client for each MCP server it connects to; servers expose tools the model can call, resources it can read and prompts it can use, over stdio locally or Streamable HTTP remotely. Since the 2026-07-28 specification, the protocol is stateless: every request carries its own version and capabilities.

By Maitreya Kulkarni · Updated · 12 min read

01 · The architecture

How Do Hosts, Clients And Servers Fit Together?

The host is the AI application a person uses. For each server it connects to, it runs a client that speaks JSON-RPC over a transport. The server exposes tools, resources and prompts backed by your systems, and remote servers are protected by OAuth.

NX-AR-05 · Architecture

The MCP architecture

  • Outside world
  • Data & integration
  • AI agent
  • System of record
  1. L1

    Hosts

    (Outside world)
    • AI applications

      Claude, ChatGPT, IDEs

      . Hands work to: MCP client.
    • Your own agents

      . Hands work to: MCP client.
  2. L2

    Client

    (Data & integration)
    • MCP client

      One per server connection

      . Hands work to: Streamable HTTP, stdio.
  3. L3

    Transport

    (Data & integration)
    • Streamable HTTP

      Remote servers, OAuth

      . Hands work to: MCP server.
    • stdio

      Local processes

      . Hands work to: MCP server.
  4. L4

    Server

    (AI agent)
    • MCP server

      Your capabilities, your rules

      . Hands work to: Tools, Resources, Prompts.
  5. L5

    Primitives

    (AI agent)
    • Tools

      Actions with typed inputs

      . Hands work to: Your APIs and data.
    • Resources

      Context the model can read

      . Hands work to: Your APIs and data.
    • Prompts

      Reusable templates

      . Hands work to: Your APIs and data.
  6. L6

    Your systems

    (System of record)
    • Your APIs and data

    • Authorization server

      OAuth 2.1

      . Hands work to: Streamable HTTP.
One host can connect to many servers, each through its own client. The model never talks to your systems directly: it asks the host to call a tool, and the server decides what that tool is allowed to do.

02 · Why MCP

What Problem Does MCP Solve?

Integration sprawl. Without a standard, every AI application needs a custom connector for every system: N applications times M systems. With MCP, each system is wrapped once as a server and every compatible application can use it, so the work becomes N plus M.

01

Write once

One MCP server for your product works in Claude, ChatGPT, IDEs and your own agents.

02

Typed and described

Tools come with JSON Schema inputs and outputs and descriptions models understand.

03

Permissioned

Remote servers use OAuth, so access is granted by a person and scoped per user.

03 · Primitives

What Can An MCP Server Offer?

Three core primitives, plus optional extensions. Tools are actions the model can invoke, resources are data the application can read into context, and prompts are reusable templates a person can pick. Extensions such as Tasks add long-running work.

MCP server primitives
ToolsControlled byThe model (with user approval)Examplesearch_products, create_order
ResourcesControlled byThe applicationExampleA file, a record, a schema
PromptsControlled byThe userExample“Summarise this account”
Tasks (extension)Controlled byClient pollsExampleA report that takes minutes

04 · 2026-07-28

What Changed In The 2026-07-28 Specification?

MCP became stateless. The initialize handshake and protocol-level sessions are gone; every request carries its protocol version and client capabilities in its metadata, and servers advertise themselves through a new server/discover call. Several older features were deprecated with a twelve-month window.

01

Stateless core

No initialize or initialized messages; each request is self-describing, which makes servers easy to scale and cache.

02

No sessions

The Mcp-Session-Id header is gone from Streamable HTTP; servers needing state pass explicit handles as tool arguments.

03

Multi round-trip requests

Servers ask for missing input (confirmations, elicitation) in a result, and clients retry with the answers.

04

Tasks as an extension

Long-running work moved to the io.modelcontextprotocol/tasks extension, with polling instead of a blocking call.

05

Cacheable discovery

List results carry freshness hints, and tools should be listed in a stable order for prompt caching.

06

Deprecations

Roots, Sampling and Logging are deprecated, and Client ID Metadata Documents replace dynamic client registration.

tools/call request (JSON-RPC 2.0)
{  "jsonrpc": "2.0",  "id": 7,  "method": "tools/call",  "params": {    "name": "search_products",    "arguments": { "query": "trail shoes", "max_price": 150 },    "_meta": {      "io.modelcontextprotocol/protocolVersion": "2026-07-28"    }  }}

05 · Security

How Is A Remote MCP Server Secured?

With OAuth 2.1 and least privilege. The server publishes protected-resource metadata pointing to its authorization server, the person approves scopes in their browser, and the client presents a short-lived token bound to that server. Tool output is treated as untrusted by the host.

01

Protected-resource metadata

Defined by RFC 9728, it tells clients where to get tokens for your server.

02

Audience-bound tokens

Tokens are valid only for your server, so a leaked token can't be replayed elsewhere.

03

Scoped tools

Read and write tools need separate scopes; destructive tools are annotated so hosts ask first.

04

Injection awareness

User-generated text returned by tools is labelled and sanitised, so it can't steer the calling model.

06 · Step by step

What Does A Tool Call Look Like On The Wire?

Under the stateless specification, a client can discover a server's capabilities, then send each request with its protocol version and capabilities in the message itself. If the server needs more input, such as a person's confirmation, it returns an input-required result and the client retries with the answer.

NX-AR-05b · Sequence

A tool call over Streamable HTTP

  • Your people
  • Outside world
  • AI agent
  • System of record

Your peopleThe person

Outside worldHost and client

AI agentMCP server

System of recordYour API

  1. 01Host and client to MCP server: Discover capabilities

    server/discover

  2. 02MCP server to Host and client: Versions, tools, identity

  3. 03Host and client to MCP server: Call a tool

    tools/call + _meta protocolVersion

  4. 04MCP server to Host and client: Input required

    resultType: input_required

  5. 05Host and client to The person: Asks to confirm

  6. 06The person to Host and client: Confirms

  7. 07Host and client to MCP server: Retry with the answer

    inputResponses

  8. 08MCP server to Your API: Runs the action

  9. 09Your API to MCP server: Result

  10. 10MCP server to Host and client: Structured result

    resultType: complete

Multi round-trip requests replace server-initiated requests: instead of the server calling back into the client, it asks for what it needs in a result, and the client retries the original request with the answers.

The ecosystem

  • MCP
  • Claude
  • ChatGPT
  • Gemini
  • GitHub
  • Cloudflare

Build it with us

We Build This For Real Businesses.

The services where this architecture does the work, designed, built and handed over by Nexolve.

FAQ

Questions About MCP Architecture.

Still unsure about something? Ask us

No. Anthropic introduced it, but it is an open standard supported by many AI applications and agent frameworks, including ChatGPT and major IDEs.

MCP sits on top of your APIs. An API is designed for developers; an MCP server describes capabilities in a way AI models can discover and call safely, with schemas, descriptions and permissions.

Not immediately. SDKs keep backward compatibility with earlier revisions, and deprecated features remain functional for at least twelve months, but new servers should follow the stateless model.

MCP connects an agent to tools and data. A2A connects agents to other agents as peers, for delegating whole tasks. They complement each other.

Contact

Want This Architecture Built For You?

A 20-minute call. We'll listen to the problem, tell you honestly whether we're the right team for it, and outline what the build would look like.

  1. 01Tell us the problemA 20-minute call. Rough is fine.
  2. 02Get a scoped planWhat we'd build and what it takes, within 48 hours.
  3. 03Start on your timelineOnce the scope is signed off, we build in milestones.