MCP Concepts
Every AI app re-invents tool connections. MCP — the Model Context Protocol — ends that: one open standard to plug models into tools and data. USB-C for AI.
▶ Watch this reelWhat you'll learn
- What & why
- Host, client, server
- Primitives: tools, resources, prompts
- Transports & vs function calling
Remember this
- MCP = open standard replacing N×M bespoke integrations; servers expose curated capabilities behind a trust boundary
- Three roles: host (initiates), client (per-server connection), server (owns capabilities, discovered at connect time)
- Primitives: tools (model-invoked actions), resources (app-curated data), prompts (user-selected templates); stdio for local, HTTP for shared
What & why
- N apps × M tools = N×M bespoke integrations. MCP = one open protocol (Anthropic, late 2024).
- Server = trust boundary: curated tools, credentials stay inside.
Roles
- Host: AI app, owns LLM + UX, initiates everything.
- Client: one per server, host-owned, carries the protocol.
- Server: owns capabilities; announced via discovery at connect.
Primitives
- Tools: model-invoked actions (schemas).
- Resources: app-curated data (URIs) — model doesn't pull directly.
- Prompts: user-selected templates.
Transports & comparison
- stdio (local subprocess) vs HTTP (remote/shared, needs auth).
- MCP ≠ function calling: protocol AROUND the calls (discovery, lifecycle, composition, ecosystem).
Code: Capability discovery: what a server announces
// What a server exposes at connect time (simplified):
{
"tools": [
{ "name": "search_tickets",
"description": "Search support tickets by keyword. Use for customer-history questions; NOT for live account data (use get_account).",
"inputSchema": { "type": "object",
"properties": { "query": {"type": "string"}, "limit": {"type": "integer", "default": 5} },
"required": ["query"] } }
],
"resources": [
{ "uri": "ticket://recent", "name": "Recent tickets",
"description": "Last 50 tickets as markdown" },
{ "uri": "kb://article/41", "name": "Refund policy" }
],
"prompts": [
{ "name": "ticket_summary",
"description": "Summarize a ticket thread with sentiment" }
]
}
// The host turns tools[] into the model's function-calling schema —
// AG-02's description discipline, now riding a standard wire format.