BOOTING NEURAL FEED…
NEWSBOX v0.2 · NEON SPONSOR ↗
← WSZYSTKIE NEWSY
Tech & Dev 75% CONFIDENCE Dev.to Top 15 czerwca 2026 01:13

The Model Context Protocol (MCP): what it is and how to build a server

AUTHOR · Tech_Nuggets

The Model Context Protocol (MCP): what it is and how to build a server Your team's LLM-powered application talks to a search index through one custom integration, a code repository through another, a Postgres database through a chain of LangChain tools, and a file system through raw Python I/O calls. Every new data source means writing a new integration. Every integration uses a different authentication model and returns data in a different shape. The LLM application is tightly coupled to every backend it touches, and swapping one out requires changing the application code directly. The Model

The Model Context Protocol (MCP): what it is and how to build a server Your team's LLM-powered application talks to a search index through one custom integration, a code repository through another, a Postgres database through a chain of LangChain tools, and a file system through raw Python I/O calls. Every new data source means writing a new integration. Every integration uses a different authentication model and returns data in a different shape. The LLM application is tightly coupled to every backend it touches, and swapping one out requires changing the application code directly. The Model Context Protocol (MCP) exists to replace this bespoke plumbing with a single, standardized interface. Think of it as a USB-C port for LLM applications: one connector shape, one protocol, and any compatible server can plug into any compatible client without custom wiring. Why a standard protocol matters LLM-powered tools have exploded in capability over the past two years, but the integration story has not kept up. Each AI application (IDE assistant, chat client, agent framework) historically built its own connectors for databases, APIs, document stores, and code repositories. There was no shared contract. If you wanted to use a specific code search tool with two different AI assistants, you needed two separate integrations. MCP borrows its design philosophy from the Language Server Protocol (LSP), which standardized how code editors talk to language analyzers. Before LSP, each editor had its own plugin for each language. After LSP, one language server worked with every editor. MCP aims to do the same for AI tools and the data sources they need. The protocol is an open standard, originally created at Anthropic and published under the MIT license. The specification reached stable at version 2025-11-25, and the Python SDK ( mcp on PyPI) is at 1.27.2 as of May 2026. A 2.0.0 alpha was published in June 2026 with an updated transport layer. How MCP works MCP uses JSON-RPC 2.0 as its message format. A client (the AI application) connects to a server (a service that provides context) over one of three transport types: stdio : the client spawns the server as a child process and communicates over stdin/stdout. Best for local, single-user setups. SSE (Server-Sent Events): the server runs as an HTTP endpoint, the client connects over HTTP. Works across machines. Streamable HTTP : a newer transport that allows bidirectional streaming over HTTP. Added in the 2025-11-25 spec. Here is the conceptual architecture: flowchart LR subgraph Client["Client (AI App)"] A["Host<br/>IDE / Chat / Agent"] B["MCP Client<br/>Protocol handler"] end subgraph Server["MCP Server"] C["MCP Server<br/>Protocol handler"] D["Resources<br/>context data"] E["Tools<br/>executable functions"] F["Prompts<br/>templated workflows"] end A <--> B B <-->|JSON-RPC 2.0<br/>stdio / SSE / HTTP| C C --> D C --> E C --> F Every MCP session begins with a capability negotiation handshake. The client announces what features it supports (sampling, roots, elicitation). The server announces what features it offers (resources, tools, prompts). Both sides agree on a feature set before any data exchange happens. Server primitives Servers offer three main categories of functionality: Resources expose data to the LLM. Think of them as GET endpoints in a REST API. A resource has a URI and returns content in a structured format. Example: file:///logs/2026-06-01.txt returns the content of that log file. Resources are how the LLM loads context. Tools are functions the LLM can invoke. Think of them as POST endpoints. A tool has a name, a description, and an input schema (JSON Schema). The LLM can call a tool to execute code, query a database, or trigger an external action. Unlike resources, tools are invoked on demand. Prompts are reusable templates for LLM interactions. A prompt defines a message template with parameter slots. The client can popu

CZYTAJ ŹRÓDŁOWY ARTYKUŁ → WIĘCEJ Z TECH & DEV