What Is MCP? The Model Context Protocol, Explained

What Is MCP? The Model Context Protocol, Explained

Published
AuthorDevansh

The Model Context Protocol, MCP, is an open standard that lets AI applications plug into outside tools and data through one interface instead of a custom integration per tool. Anthropic open-sourced it on 25 November 2024, and it is now hosted under the Linux Foundation's Agentic AI Foundation. The official docs call it a USB-C port for AI applications: one standard plug, many devices. Instead of every AI client shipping its own GitHub integration, its own database integration, and its own file-system integration, each system exposes one MCP server, and every MCP-capable client speaks to it the same way. This post explains the three roles, the three things a server can offer, the two transports, and the July 2026 spec change that makes most older guides wrong in one specific way.

If AI agents themselves are new to you, read our n8n AI agent guide first: an agent is a model with tools and a loop, and MCP is the standard way of giving it those tools. If you want the model itself on your own hardware, our Ollama guide covers that. This post is about the protocol between them.

Three roles: host, client, server

MCP has three participants, and most confusion clears up once you separate them. The host is the AI application the user sees: Claude Desktop, ChatGPT, VS Code, Cursor. It owns the model, the conversation, and the user's consent. The client is a component inside the host that holds one connection to one server. The server is the program that provides context and actions: a GitHub server, a database server, a file-system server. The flow is short. The host starts or connects to a server, the client asks what it offers, the host puts those tool descriptions in front of the model, and when the model decides to use one, the client sends a tools/call request and passes the result back into the conversation. The model never talks to the server directly. The protocol itself is two layers: a data layer of JSON-RPC 2.0 messages, and a transport layer that carries them, either stdio for a local server running as a subprocess, or Streamable HTTP for a remote server, where each request is an HTTP POST answered with JSON or a short-lived Server-Sent Events stream.

What a server can offer: tools, resources, prompts

Everything an MCP server offers falls into three primitives, and they differ in who decides to use them. Tools are executable functions the model can invoke to do something: run a query, list files, create an issue. Resources are data the model can read: a file, a database row, a dashboard. Prompts are ready-made templates the user can pick. The official reference servers show the range: Everything, Fetch, Filesystem, Git, Memory, Sequential Thinking, and Time. The spec takes its inspiration from the Language Server Protocol, which did the same for code editors: before LSP, every editor needed its own plugin for every language, and after it, one server per language worked everywhere. MCP does the same for AI: a team writes one MCP server for its database, ticketing system, or cloud API, and any MCP-capable assistant can use it. There is no model inside the protocol, and MCP says nothing about which LLM you use or how it reasons.

The 2026-07-28 spec: stateless, and three features deprecated

The current specification, version 2026-07-28, changed how MCP works under the hood, and this is the part old guides get wrong. Up to the 2025-11-25 version, the client and server opened a session with an initialize handshake, negotiated capabilities once, and over HTTP passed an Mcp-Session-Id header around. Since 2026-07-28 the protocol is stateless: no opening handshake, no session ID, and every request carries the client's protocol version and capabilities. The same revision deprecated three older client features: sampling, where a server borrows the host's model for a completion; roots, where the app tells a server which folders to focus on; and logging. They still work and stay supported for at least twelve months, but new servers should call LLM APIs directly and log to stderr or OpenTelemetry. If a guide teaches the handshake or a session header as current, it was written against the old spec: the concepts still hold, but the wire format has moved on. Check the version date on any MCP guide before you follow its commands.

Security: the part to get right before you connect anything

A tool the model can call is an action the model can take, so an MCP server deserves the same care as any API. The spec sets three security requirements for HTTP servers: validate the Origin header to stop DNS rebinding attacks, bind a local server to localhost only rather than every interface, and authenticate connections. Beyond that, the real risk is the content the server returns: a tool description or a document can carry instructions that try to steer the model, so treat server content as untrusted data, not as commands, and keep destructive tools behind a human approval step. The OWASP MCP Top 10, still in beta, collects the main risks in one list and is the right first read before you expose a server beyond your own machine. Start with local stdio servers, add one remote server at a time, and audit what each tool is allowed to do. If you want MCP servers wired into your own stack, with the auth, the approvals, and the logging in place, book a free infra audit with DevOpsBY. We run the infrastructure behind AI automation for startups and creators, and a protocol is only as safe as the server behind it.

Disclaimer: This post is educational only, not financial advice. Figures are as reported by the sources on 2026-11-12 and may change - always confirm version numbers, requirements, and dates in the official docs before acting on them.

Related Articles

DevOps & Infrastructure Services

Need hands-on help? We build and manage the infrastructure behind the concepts covered in this article.

DevOpsBy Assistant

How can we help?

Select a topic to get started: