Skip to main content

What is MCP?

The Model Context Protocol (MCP) is an open standard for connecting AI models to external data and capabilities. It defines how AI hosts like ChatGPT and Claude communicate with servers that expose tools and resources.
sunpeak 0.20.x uses core MCP 2025-11-25, so the lifecycle examples on this page show that revision. The current core specification is 2026-07-28, which uses self-contained requests instead of the handshake and protocol session shown below. See MCP 2026-07-28 for MCP Apps.

Architecture

  • Host — An AI application (ChatGPT, Claude) that initiates connections to servers. Each host runs one or more clients.
  • Client — A protocol client within the host that maintains a 1:1 connection to a server. Handles capability negotiation, request routing, and session management.
  • Server — A program that exposes tools, resources, and other capabilities over MCP. Servers decide how to handle state and may keep per-session data when the transport and application need it.

Transports

MCP defines two standard transports:
  • stdio — Communication over standard input/output. Used for local servers running as subprocesses.
  • Streamable HTTP — Communication over HTTP with server-sent events. Used for remote servers accessible over the network.

sunpeak 0.20.x Connection Lifecycle

  1. The client sends initialize with its capabilities and preferred protocol version.
  2. The server responds with its own capabilities and the negotiated protocol version. The response can also include an optional instructions string the host may surface to the model (e.g., as part of the system prompt) to describe cross-tool relationships and constraints.
  3. The client sends notifications/initialized to confirm the session is ready.
  4. Requests flow in both directions for the duration of the session.

Core MCP 2026-07-28 Lifecycle

The current core revision has no initialize handshake or Mcp-Session-Id. Each request includes its protocol version, client identity, and client capabilities. Servers implement server/discover for optional up-front capability discovery, and clients can retry with a supported version when needed. This change does not remove the MCP Apps View’s separate ui/initialize handshake. Read MCP 2026-07-28 for MCP Apps before updating a server or SDK.

What Can Servers Expose?

MCP defines three types of capabilities that servers can expose:
  • Tools — Functions the model can call. Used for actions like fetching data, running computations, or modifying state.
  • Resources — Data the model can read. Identified by URIs with MIME types. Used for structured data, files, and (in MCP Apps) interactive HTML UIs.
  • Prompts — Reusable prompt templates. Not currently used by MCP Apps.

Learn More

Model Context Protocol

Full MCP specification and documentation.

MCP Apps Introduction

How MCP Apps extends MCP with interactive UIs.

MCP OAuth Authorization

Protect HTTP MCP servers without exposing access tokens to App Views.