AI
Learning Studio
Claude Skills2026-03-172 min read

MCP Architecture Deep Dive

Deep dive into MCP protocol, transport, resources, tools, and prompts

MCPModel Context ProtocolArchitectureProtocolTake NoteMark Doubt

MCP Protocol Overview

MCP (Model Context Protocol) is an open protocol from Anthropic that connects AI models to external data sources, tools, and services. Through a unified interface, models can discover, read, and invoke capabilities without custom adapters for each data source.

Protocol Layer

MCP defines a JSON-RPC 2.0 style message format:

  • Initialization: Client and Server exchange capability lists (supported Resources, Tools, Prompts)
  • Request–response: Standard formats for List, Read, Call, etc.
  • Notifications: Server can push resource change events

Transport Layer

  • stdio: Communicate via stdin/stdout with a subprocess; suitable for local MCP servers (e.g., file system, database)
  • SSE over HTTP: Server exposes an HTTP endpoint; clients receive messages via Server-Sent Events; suitable for remote deployment
  • WebSocket: Bidirectional; suitable for real-time push
Transport is pluggable; protocol semantics stay consistent.

Resources

Resources are context the model can read:

  • URI scheme: e.g., file:///path/to/doc, db://schema/table
  • List: List available resources
  • Read: Read content by URI; supports text, Base64, etc.
  • Subscribe: Some implementations support resource change notifications
Typical use: document libraries, configs, read-only DB views, API docs.

Tools

Tools are operations the model can invoke:

  • List: List tool names, descriptions, parameter schemas
  • Call: Execute with parameters and return results
  • Permissions: Server can enforce access control; client declares required capabilities
Typical use: search, computation, API calls, file writes, command execution.

Prompts

Prompts are reusable prompt templates provided by the server:

  • List: List prompt names and descriptions
  • Get: Get prompt content and parameters
  • Client can fill variables and send the prompt as a system or user message to the model
Typical use: domain expert prompts, task templates, multi-turn dialogue templates.

Architecture Benefits

  • Standardization: Implement once, reuse across clients (Claude Desktop, Cursor, custom apps)
  • Security: Server controls exposure; supports permissions and auditing
  • Composability: Multiple MCP servers can connect; model selects as needed

Summary

Understanding MCP's protocol, transport, Resources, Tools, and Prompts is the foundation for building extensible AI applications. MCP decouples "model" from "context and tools," providing a unified integration path for Skills, plugins, and Agents.

Flash Cards

Question

What is the core design goal of the MCP protocol?

Click to flip

Answer

To let AI models safely and consistently access external context (tools, resources, prompts), decoupling models from data sources and tools, and supporting interoperability across clients and servers.

Question

What is the difference between Resources and Tools in MCP?

Click to flip

Answer

Resources are read-only context (e.g., files, DB views) that models can read to improve understanding. Tools are executable operations (e.g., API calls, commands) that models can invoke to complete tasks.

Question

What transport options does MCP support?

Click to flip

Answer

stdio (local process), SSE over HTTP (remote service), WebSocket. stdio is suitable for local development; SSE/HTTP is suitable for remote deployment and cross-network calls.