SynfraCore
Synfracore
Start Learning
Navigation

Academies

Platform

RoadmapsLabsCertificationsInterviewPYQsAI AssistantCareer
Start Learning Free Learning Roadmaps

Model Context Protocol (MCP) — Overview

What it is, why it matters, architecture and key concepts

📄
Last updated Nov 2026
Expert Content

Model Context Protocol (MCP)

One protocol for connecting an LLM application to tools and data, instead of a bespoke integration per pair

Category: LLM Application Development

On this page: the problem it solves, the core modules, one worked runbook example, then interview prep.

Helpful first: a rough sense of what an LLM agent is and what "tool use" means (the AI Agents track covers that). Protocol-design experience isn't assumed.


Why MCP?

Before a shared protocol, connecting an LLM application to an external system — a database, a file store, a ticketing system — meant writing a custom integration for that specific pairing. An application that wanted to reach five different tools wrote five different integrations; a tool that wanted to be reachable from five different LLM applications had to support five different integration styles. That's an M×N problem: the integration work scales with the product of applications and tools, not the sum.

The Model Context Protocol defines one way for an LLM application to discover and call tools, read resources, and use prompts exposed by any compliant server — regardless of which model or application framework is on one side, or which underlying system is on the other. A server written once, following the protocol, becomes usable by any MCP-compliant application without either side needing to know anything specific about the other.

Analogy — MCP plays the role USB played for peripherals. Before USB, a keyboard, a printer, and a scanner each needed their own specific port and driver on a specific computer — swap computers and nothing connects without adapters and new drivers. USB defined one physical and logical interface any device and any computer could agree on, so a device built once works on any USB-compliant computer, no matter who made either side. MCP does the same for LLM applications and tools — build a server once, and any compliant application can use it.

The Three Roles: Host, Client, Server

MCP's own terminology for these roles is precise and worth using exactly as the spec defines — verify current role names and responsibilities against the official MCP specification, since this is an actively developed protocol.

•Host — the application the user actually interacts with (a chat application, an IDE with an AI assistant built in). The host manages one or more client connections.
•Client — the component inside the host that maintains a connection to one specific MCP server, handling the protocol-level back and forth.
•Server — the program exposing tools, resources, or prompts over MCP. A server might wrap a database, a filesystem, a SaaS API, or any other system worth making available to an LLM application.
Host
The application the user sees
Client
One per connected server
Server
Exposes tools, resources, prompts

A single host commonly runs several clients at once, each talking to a different server — a filesystem server, a ticketing-system server, a search server — giving the LLM application access to all of them through the same consistent protocol, rather than one integration style per system.


Learning Modules

Module 01 — Tools, Resources, and Prompts

The three things a server can expose

Topics covered:

•Tools — callable functions the model can invoke, with a described input schema — 🟢 Beginner
•Resources — readable data a host can pull in as context, without the model calling anything — 🟡 Intermediate
•Prompts — reusable, parameterized prompt templates a server can offer — 🟡 Intermediate

A tool is something the model actively decides to call, with arguments, expecting a result back — closer to a function call. A resource is more like a file the host can read and hand to the model as context, without the model having to ask for it through a tool call. Conflating the two leads to a design where everything is modeled as a tool even when a plain resource would be simpler and cheaper to use.

Module 02 — Discovery and the Capability Negotiation

How a client learns what a server can actually do

Topics covered:

•Initialization handshake — client and server agree on protocol version and capabilities — 🟡 Intermediate
•Listing tools/resources/prompts dynamically — 🟡 Intermediate
•Why a client should never assume a capability exists without checking — 🔴 Advanced

A client doesn't hard-code what a server offers; it asks, as the first step of the connection, and the server responds with exactly what it currently supports. This matters in practice because a server's capabilities can change between versions, or even at runtime — a client that assumes a capability without checking the negotiated result can fail confusingly against a server that simply doesn't offer it.

Module 03 — Permissions and the Trust Boundary

Why "the model can call a tool" is a security decision, not just a feature

Topics covered:

•Every tool call is a capability granted to the model, deliberately or by oversight — 🔴 Advanced
•Scoping a server to the narrowest set of tools a given task needs — 🔴 Advanced
•Human-in-the-loop confirmation for consequential tool calls — 🔴 Advanced

Connecting a host to a server that can delete files, send emails, or move money hands the model real-world capability, not just information. The protocol doesn't decide this for you — it's the host and server operator's responsibility to scope what's exposed, and to require explicit confirmation before a tool call with real consequences actually executes.

Narrow scope
A server exposes only the specific tools a task genuinely needs, not a whole system's API surface
Human confirmation
A consequential call (delete, send, pay) pauses for explicit approval before it executes

Production Example

bash
# Production Runbook — "the agent just called a tool it shouldn't have had access to"

# Step 1: Identify exactly which server exposed that tool
# Log every tool call with which MCP server it came through -- without
# this, tracing "which connection made this possible" after the fact is guesswork

# Step 2: Check whether the tool's scope matches the task it was connected for
# A server originally wired up for "read-only ticket lookup" that also
# exposes a delete-ticket tool is over-scoped for that use case specifically

# Step 3: Reduce scope to exactly what the task needs
# Prefer connecting to a server instance/config that only exposes the
# narrower tool set, rather than relying on the model to simply choose
# not to call a tool it technically has access to

# Step 4: Add confirmation for any remaining consequential tool
# A tool with real side effects (delete, send, pay) should require an
# explicit human approval step before executing, regardless of how
# confident the model's reasoning looked in the transcript

# Step 5: Review which servers are connected by default across the fleet
# A server connected for one legitimate use case elsewhere can quietly
# become every host's default -- audit this on a schedule, not just once

Interview Prep

Lead with the problem, then your fix, then what changed — one minute a question is a good pace.

A Few Questions to Expect

Q1. Why would a server offer a reusable prompt template instead of leaving each caller to write its own prompt?

A: Problem: letting every caller write its own version of "summarize this ticket" produces inconsistent results and duplicated effort across every application that connects to the server. Solution: a server-provided prompt template is written and tuned once, with parameters filled in per call, so every connected host gets the same well-tested wording rather than reinventing it. Result: quality stays consistent across callers, and a later improvement to the template benefits every connected application at once, not just whichever one happened to write the best version.


Q2. What goes wrong when one server exposes far more tools than a given task actually needs?

A: Problem: a maximal server covering everything a backend system can do hands a connected model a correspondingly large surface of things it's technically able to call, whether or not the task in front of it needs most of them. Solution: splitting into several narrowly-scoped servers, each covering one real use case, means what's exposed to any given connection is small enough to actually reason about. Result: an audit of "what could this model have done" stays a short, answerable list instead of a sprawling one.


Q3. A server requests sampling — asking the connected client to run a model completion for it. Why might a host say no?

A: Problem: a server generating model calls through the host's own connection is still spending that host's real resources and model access, on a request the host didn't directly initiate. Solution: sampling is explicitly opt-in from the host's side — a host can decline it outright, or gate it behind its own approval and rate-limiting logic, rather than letting any connected server trigger model calls freely. Result: the host keeps control over its own resource and cost exposure, instead of inheriting an open-ended liability from every server it happens to be connected to.


More scenarios live in the Interview Q&A tab; the Cheatsheets tab has the role and message-flow reference in one place.

Share:
Join our Community
Daily tips, job alerts, interview help — join engineers learning together
→
Up Next
🔤
Model Context Protocol (MCP) — Fundamentals
Core concepts and commands — hands-on from the start
Also Worth Exploring
← Back to all Model Context Protocol (MCP) modules
Prerequisites →