Model Context Protocol (MCP)
MCP gives an AI host one protocol for discovering and invoking tools, resources, and prompts. The 2026-07-28 revision makes that protocol stateless: capability and version context travels with every request, not in a connection-bound handshake. Distinguish an MCP host, client, server, transport, and server primitive. Build a JSON-RPC request with the metadata required by MCP 2026-07-28. Use server/discover to inspect versions, identity, and capabilities. Return typed and cache-aware results from tools, resources, and prompts. Explain how modern stateless MCP interoperates with handshake-era servers. Choose safe state, transport, and approval boundaries for a server. Your application needs a database query, a calendar operation, and a file reader. Without a shared protocol, every AI host needs custom discovery, invocation, errors, transport, and authorization glue for those same capabilities. MCP reduces that integration matrix. A server publishes a standard JSON-RPC surface. A compliant client can discover the surface, present it to a model or user, invoke it, and interpret the result without a server-specific adapter. The important boundary is easy to miss. MCP standardizes communication. It does not decide which tool the model should call, make untrusted content safe, or turn a stateless request into durable application state. Your host and server still own those decisions. MCP host, stateless request, and server primitives Tools are callable actions. Each tool has a name, description,…
Model Context Protocol (MCP): MCP gives an AI host one protocol for discovering and invoking tools, resources, and prompts. The 2026-07-28 revision makes that…
This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.
Browse the complete course catalog or open this lesson on GitHub.