SynfraCore
Synfracore
Start Learning
Navigation

Academies

Platform

RoadmapsLabsCertificationsInterviewPYQsAI AssistantCareer
Start Learning Free Learning Roadmaps

Model Context Protocol (MCP) — Fundamentals

Core concepts and commands — hands-on from the start

📄
Last updated Nov 2026
Expert Content

Model Context Protocol — Fundamentals

The three building blocks, concretely

A tool is defined with a name, a description (which the model reads to decide when to use it), and an input schema describing its expected arguments. Calling it returns a result the model can read and act on.

text
tool: "search_tickets"
description: "Search the support ticket system by keyword and status"
input schema: { query: string, status?: "open" | "closed" }

A resource is identified by a URI and has a content type — a specific file, a database record, a configuration value. The host can read a resource and include its content as context, without the model ever "calling" anything.

text
resource uri: "tickets://12345"
content: the full text/data of ticket #12345

A prompt is a reusable, parameterized template a server offers — "summarize this ticket in plain language," filled in with specific arguments at request time, so the same well-tested prompt gets reused consistently instead of every caller writing a slightly different version from scratch.

Why servers are typically scoped narrow, not wide

A server could technically expose every operation a system supports — but a server wrapping a ticketing system that exposes create, update, delete, and bulk-export operations hands a connected model far more capability than a task that only needed to look up ticket status. Narrower servers, each scoped to a specific use case, are easier to reason about and far easier to audit than one maximal server exposing everything a backend system can do.

One maximal server
Exposes everything a backend can do. Hard to audit what a connected model actually has access to
Several narrow servers
Each scoped to one use case. What's exposed to a given task is immediately clear from which server it's connected to

The initialization handshake, at a high level

Before any tool call or resource read happens, a client and server go through an initialization step: the client states what protocol version and features it supports, the server responds with its own supported version and the capabilities (tools, resources, prompts) it currently offers. Only after this exchange does the client know what it's actually allowed to ask for.

Protocol version numbers and the exact handshake message shapes are defined by the MCP specification and change as the protocol evolves — verify these against the current spec rather than an earlier version's documentation.

Transport: how the bytes actually move

MCP defines the message protocol (what gets said), separately from the transport (how it physically travels between host and server) — commonly a local process communicating over standard input/output for a server running on the same machine, or an HTTP-based transport for a server reachable over a network. A server implementation generally supports one or more of these without changing what tools/resources/prompts it exposes — the transport is a plumbing detail, not something that changes the protocol-level conversation itself.

A worked example: one tool call, start to finish

text
1. Client asks server: what tools do you have? (discovery)
2. Server responds: "search_tickets", "get_ticket", ... (with schemas)
3. Model decides to call "search_tickets" with { query: "login failure" }
4. Client sends that call to the server
5. Server executes the real lookup against the ticketing system
6. Server returns matching tickets as the tool's result
7. Client hands that result back to the model as context
8. Model continues reasoning with the new information

Try it: Sketch the same eight-step sequence for a tool you can imagine wanting an AI assistant to use in your own work — maybe looking up a customer record, or checking a deployment's status. Write out what the tool's input schema would need to contain for the model to call it correctly, and think about whether that tool should have any side effects at all, or stay strictly read-only.

Share:
Join our Community
Daily tips, job alerts, interview help — join engineers learning together
→
Up Next
⚡
Model Context Protocol (MCP) — Intermediate
Real-world patterns, best practices, and deeper topics
Also Worth Exploring
← Back to all Model Context Protocol (MCP) modules
← InstallationIntermediate →