MCP · Lesson 79 of 120
Protocol Versions
Discover and negotiate.
MCP changes over time, and each revision is named by its date. When a client connects, both sides agree on a version they both support. That way, old clients and new servers can still work together.

- Dated versions
- Agree on one
- Old and new mix
Which version
The SDK lists every version it supports. After connecting, the client knows the agreed version, and the server's name. Run it. Five supported versions, and the newest one was chosen.
versions.pypython
import asyncio
from mcp import Client
from mcp_types.version import SUPPORTED_PROTOCOL_VERSIONS
from northwind import mcp
print("SDK supports:", list(SUPPORTED_PROTOCOL_VERSIONS))
async def main():
async with Client(mcp) as client:
print("agreed:", client.protocol_version)
print("server:", client.server_info.name)
asyncio.run(main())Output
SDK supports: ['2024-11-05', '2025-03-26', '2025-06-18', '2025-11-25', '2026-07-28'] agreed: 2026-07-28 server: northwind
Also uses northwind.py
from mcp.server.mcpserver import MCPServer
from mcp.server.mcpserver.exceptions import ToolError
mcp = MCPServer("northwind")
ORDERS = {1042: "shipped", 1043: "packing", 1044: "delivered"}
@mcp.tool()
def order_status(order_id: int) -> str:
"""Look up the status of a Northwind order by its number."""
if order_id not in ORDERS:
raise ToolError(f"Order {order_id} not found")
return ORDERS[order_id]
@mcp.tool()
def delivery_cost(order_total: float) -> str:
"""UK delivery cost for an order total in pounds."""
return "free" if order_total >= 50 else "£4.99"
@mcp.resource("policy://returns")
def returns_policy() -> str:
"""Northwind's returns policy."""
return "You can return any unused item within 30 days of delivery."
@mcp.prompt()
def support_reply(question: str) -> str:
"""Draft a polite reply to a customer."""
return f"Write a short, polite reply to this Northwind customer: {question}"
if __name__ == "__main__":
mcp.run()Good to know
The newest revision lets clients discover a server's details in one request, before any work. Older clients still use a handshake, and the SDK handles both. You rarely set versions yourself.
| key | value |
|---|---|
| Names | dates |
| Newest | discover first |
| Older | handshake |
| You | rarely choose |
Summary
Both sides agree on a protocol version, and the SDK handles it for you. Next, capabilities.
Key takeaways- Dated versions
- protocol_version
- SDK handles it
Next up: Capabilities — what each side supports