Last updated:
Suppose you want your AI assistant to read your code repository's bug reports, query a test database and check your calendar. Until recently, each of those connections had to be built separately for each assistant.
MCP (Model Context Protocol) is an open protocol for connecting tools and data sources to AI assistants. We introduced it in one paragraph in what is an AI agent. Here we look more closely at what it's made of, what it carries, and what to think about before connecting any server.
What problem does MCP solve?#
The problem of repeated integrations: instead of every assistant having separate code for every service, both sides are built once against a shared contract.
With 5 assistants and 20 services, you'd need a hundred separate integrations without a shared contract. With MCP, each service builds one "MCP server" and each assistant implements one "MCP client," so multiplication becomes addition. Anthropic introduced the protocol and released it openly, and assistants and tools from many companies now support it.
What roles do the host, client and server play?#
The host is the application you work in, the client is a connection inside the host, and the server exposes a service's capabilities.
- Host: a desktop assistant, a code editor or a coding agent in the terminal. The language model and the user interface live here.
- Client: a part inside the host that maintains the connection to one server; one client per server.
- Server: a program that exposes the capabilities of a service or data source in MCP's language. Messages between client and server are exchanged in JSON-RPC format.
The key point of this diagram: the model doesn't talk to the server directly. The model says "call this tool with this input," the host decides whether to run it, and this is where the user confirmation prompt sits.
Local or remote server?#
| Local server | Remote server | |
|---|---|---|
| Where it runs | On your computer, as a separate program | On the service provider's server or your own |
| Communication | The program's standard input and output | Over HTTP |
| Access | Your user account's permissions | Whatever you allowed at sign-in |
| Good for | Files, command-line tools, a local database | Online services such as calendars and project management |
Remote servers usually connect through a sign-in and authorization step. The exact way to add a server differs from one host to another; see that app's guide.
What does an MCP server offer?#
Three kinds of capability: tools, resources and prompts. They differ in who decides to use them:
| Type | Who decides | Example |
|---|---|---|
| Tools | The model, mid-task | Creating a bug report, running a query, searching files |
| Resources | The host application or the user | The contents of a file, the structure of database tables |
| Prompts | The user, from a list | A ready-made template like "review this change" |
Tools are the most used part. Each tool has a name, a description and an input schema in JSON Schema format, and the server lists them to the client like this:
{
"name": "search_orders",
"description": "Search orders by order number. Read-only.",
"inputSchema": {
"type": "object",
"properties": {
"order_id": { "type": "integer", "description": "The order number" }
},
"required": ["order_id"]
}
}The model reads this description and uses it to decide when and how to call the tool. An accurate description makes the tool work better; a malicious one can mislead the model.
What is MCP useful for in practice?#
Any task where the assistant needs to see outside data or do something in another system. A few examples for developers and site owners:
- Code repository and bug reports: the agent reads the report, finds the relevant code and proposes a change.
- Test database: viewing table structures and asking questions of the data, with a read-only user.
- Documentation: access to a library's current docs instead of relying on the model's memory.
- Browser: opening the page under development and reading console errors.
- Everyday work: calendars, notes, document folders and project management tools.
If a service you use every day has an API, there's a good chance an MCP server has been written for it. Check whether it's official or unofficial.
Building a custom server#
If you have an internal system, such as your own order dashboard, building an MCP server for it isn't a big job, and official SDKs are available for several languages. Keep tools small and specific ("order status" is better than "run any query"), write limitations into the description, and validate input and permissions in the server itself. Agents are good helpers for writing such a server; the safe way to work with them is in coding agents.
What should you check before connecting an MCP server?#
Where the server comes from, what access it has, and not trusting the content it returns. An MCP server is code that runs with your permissions or connects to your accounts; it deserves the same care as installing a WordPress plugin:
- Source: the service provider's official server, or code you have read yourself.
- Least privilege: the token you give the server should have only the access it needs; for a database, a read-only user.
- Don't turn off confirmation, especially for tools that write, send or delete.
- Don't trust returned content: an email, web page or tool description may contain hidden instructions. This is prompt injection, delivered through a tool.
- Few, necessary servers: each tool definition takes up part of the context window, and many similar tools confuse the model's choices.
- Pin the version: install the server from a known source at a known version so changes don't arrive unnoticed.
Where this is heading#
The clear direction is that MCP has become the common way to connect assistants to services, and more services are publishing their own official servers, especially remote servers with standard sign-in. The protocol itself is still evolving and its specification gets updated.
To prepare:
- If you have an internal system, build a clean, documented API for it; adding an MCP server on top later is easy.
- Read technical details from the protocol's official documentation, not from old summaries.
- Keep a list of connected servers and each one's access, and review it from time to time.
Summary#
- MCP is an open protocol for connecting tools and data to AI assistants.
- The host is your app, the client is the connection inside it, and the server exposes a service's capabilities.
- A server offers three things: tools, resources and prompts.
- The model has no direct access to the server; the host is the intermediary, and your confirmation happens there.
- Use only trusted servers, with least privilege, and don't trust returned content.