What is MCP?
Introduction
Project introduction
What is MCP?
An AI application may need access to tools, files, documentation, or business data. Without a shared protocol, every integration needs its own request format, discovery logic, validation rules, and response handling.
MCP stands for Model Context Protocol. It defines how an AI client can discover capabilities exposed by a server and request them through structured messages. The server can expose executable tools and readable resources without giving the model direct access to application code or storage.
What do the client and server each control?
The client manages the conversation with the model and decides when an MCP capability should be requested. It first discovers what the server offers, then sends a method and parameters using a JSON-RPC message.
The server owns the capability definitions and the application logic behind them. It validates the request envelope and arguments, dispatches only registered operations, and copies the request id into either a successful result or a structured error response.
One MCP request
JSON-RPC 2.0Request
Response
Discoverable
schemas
Validated
arguments
Correlated
request ids
The MCP request lifecycle
01
Discover capabilities
The client asks which tools and resources exist, then reads their descriptions and schemas.
02
Send a structured request
The client selects a method, supplies parameters, and attaches an id inside a JSON-RPC request.
03
Validate and respond
The server checks the request, runs the selected capability, and returns a result or protocol error.
Start with the request envelope
The first coding problem constructs the JSON-RPC message used to request an MCP operation.