AI assistants no longer just answer questions; they read our files, query our databases, check our calendars, and write and run code. But to reach those systems, an assistant had to be integrated with each one separately. The Model Context Protocol (MCP) was created to replace that sprawl with a single standard. In this post I explain what MCP is, how it works, what it makes easier and how to add it to a Laravel application.
What Is MCP?
In the official words, MCP is an open-source standard for connecting AI applications to external systems. The documentation’s analogy fits well: MCP is like a USB-C port for AI applications. Just as USB-C lets very different devices plug into a computer with one kind of connector, MCP connects AI applications to data sources, tools and workflows through one protocol.
Anthropic announced MCP as an open standard on 25 November 2024. The announcement sums up the problem well: every new data source needed its own custom implementation, which made truly connected systems hard to scale. On 9 December 2025 MCP was donated to the Agentic AI Foundation (AAIF), a fund under the Linux Foundation co-founded by Anthropic, Block and OpenAI, so it now grows under an independent foundation rather than a single company.
Today widely used AI products such as Claude, ChatGPT, Gemini, Microsoft Copilot, Visual Studio Code and Cursor support MCP. The donation announcement mentions more than 10,000 active public MCP servers at the time.
What Problem Does It Solve?
Before MCP, every AI application had to write a separate integration for every system it wanted to reach. Connecting five assistants to ten systems meant fifty integrations, each written and maintained differently.
MCP changes the equation: a system is written once as an MCP server and every assistant that speaks MCP can use it. The assistant side learns one protocol and can connect to any system that speaks it. In the words of the official site: build once, integrate everywhere.
How Does It Work?
MCP has three roles:
Host: the AI application the user works in, such as Claude Desktop, ChatGPT or VS Code. It manages one or more MCP clients.
Client: a component inside the host that keeps the connection to a single MCP server. The host opens one client per server.
Server: the program that gives the assistant context and capabilities: a database, a file system, a web application’s API.
The parties talk in JSON-RPC 2.0 messages. Two transports are defined: stdio over standard input and output for processes on the same machine, and Streamable HTTP, which uses HTTP POST with optional Server-Sent Events, for remote servers. Calling a tool looks roughly like this:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_weather",
"arguments": { "location": "Bursa" }
}
}The current specification is 2026-07-28. This revision made the protocol stateless: sessions and the initial handshake are gone, and every request carries its own version and capability information. That makes MCP servers as easy to scale horizontally as ordinary web applications.
Core Concepts
An MCP server offers the assistant three kinds of things:
1. Tools
Functions the assistant can call to get something done: search for a record, send an e-mail, produce a report. Every tool has a name, a description and a JSON schema for its inputs; the model decides which tool to call and when by reading those descriptions.
2. Resources
Data that gives the assistant context: the contents of a file, a database record, a document. Unlike tools, they offer information to read rather than an action to perform.
3. Prompts
Reusable templates that structure the interaction with the language model, for example turning a frequent task such as “review this contract under these headings” into a single command.
On the client side there is Elicitation: the server can ask the user for more information to carry on, such as a missing date or a confirmation. The Sampling and Roots features of earlier revisions are being deprecated as of 2026-07-28.
What Does It Make Easier?
For developers
Write a system once as an MCP server and use it in every client, from Claude and ChatGPT to Cursor and VS Code.
No need to learn and maintain each assistant’s own plug-in format.
Open your application’s business logic (authorization, validation, logging) to AI without rewriting it.
For companies
You expose your own data on your own terms: the assistant reaches only the tools and data the server allows.
Remote servers use OAuth 2.1 for authorization; users connect with their own accounts and see only what they are allowed to see.
Switching model providers does not mean throwing away your integrations; the standard stays the same.
For users
The assistant can look directly at the systems your work lives in, without copy and paste.
A lawyer, for example, can ask their AI to “find recent Court of Cassation decisions on this issue”; the assistant searches the case-law archive over MCP and answers with its sources.
Writing an MCP Server with Laravel
The Laravel team’s official laravel/mcp package turns a Laravel application into an MCP server with a few commands:
composer require laravel/mcp
php artisan vendor:publish --tag=ai-routes
php artisan make:mcp-server WeatherServer
php artisan make:mcp-tool CurrentWeatherToolA tool consists of a description, an input schema and a handle() method that serves the request. The example from the Laravel documentation:
<?php
namespace App\Mcp\Tools;
use Illuminate\Contracts\JsonSchema\JsonSchema;
use Laravel\Mcp\Request;
use Laravel\Mcp\Response;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Tool;
#[Description('Fetches the current weather forecast for a specified location.')]
class CurrentWeatherTool extends Tool
{
/**
* Handle the tool request.
*/
public function handle(Request $request): Response
{
$location = $request->get('location');
// Get weather...
return Response::text('The weather is...');
}
/**
* Get the tool's input schema.
*
* @return array<string, \Illuminate\JsonSchema\Types\Type>
*/
public function schema(JsonSchema $schema): array
{
return [
'location' => $schema->string()
->description('The location to get the weather for.')
->required(),
];
}
}Add the tool to the server’s $tools array and register the server in routes/ai.php:
use App\Mcp\Servers\WeatherServer;
use Laravel\Mcp\Facades\Mcp;
// Over HTTP, for remote AI clients
Mcp::web('/mcp/weather', WeatherServer::class);
// For clients on the same machine (stdio)
Mcp::local('weather', WeatherServer::class);A server registered with Mcp::web is exposed to remote clients over HTTP; Mcp::local runs as an Artisan command for clients on the same machine. The package supports OAuth 2.1 and Sanctum for authentication, and the MCP Inspector for testing.
Security: What to Watch Out For
Least privilege: put only the tools you need on the server, and ask for separate confirmation for irreversible actions such as deleting or paying.
Authorization: the specification makes it optional, but treat it as mandatory on a server open to the internet. Set per-user permissions and usage limits.
Untrusted content: data returned by tools (a web page, an e-mail) can contain text the model might mistake for instructions. Design for that data to be treated as data, not instructions.
Connect servers you trust: every MCP server adds a new capability and a new door into your assistant; do not connect servers whose source you do not know.
Conclusion
MCP has become the common language that turns AI assistants from closed chat boxes into tools that work with real systems. I use it heavily in the products I build: in Hukas Emsal, lawyers connect their own AI, whether Claude, ChatGPT or Gemini, to millions of decisions from the Court of Cassation to the Constitutional Court over MCP; in rdev, coding agents set up sites, databases and services themselves through MCP tools. If you are thinking of opening your own application to AI, MCP is today the most solid and most widely supported way to do it.
Sources: MCP documentation, MCP specification (2026-07-28), Anthropic announcement, AAIF announcement, Laravel MCP documentation.