What Is MCP (Model Context Protocol)?
MCP is an open protocol that lets AI apps connect to tools and data through servers. Learn how it works, with an example and safety tips.
Short answer: MCP, the Model Context Protocol, is an open protocol introduced by Anthropic in November 2024. It gives AI applications one standard way to connect to external tools and data sources. An MCP server is a small program that exposes those tools or data in that standard form, so any MCP-aware AI app can use it.
The Problem MCP Solves
An AI model on its own can only produce text. To be useful it often needs to read your files, query a database, or call a service. Before a standard existed, every AI application had to write its own custom integration for every tool. That meant lots of duplicated work, and a tool built for one app did not work in another.
MCP is often compared to a USB-C port for AI apps. Instead of a different cable for every device, you have one connector that fits everything. Build a tool once as an MCP server, and any app that supports MCP can plug into it.
The Three Parts: Host, Client, Server
Host: the AI application you use, such as a chat assistant or a code editor.
Client: the part inside the host that keeps a connection to one MCP server.
Server: a program that exposes capabilities, such as access to files, a database or a web service.
This is a client-server model. The host can connect to several servers at once, for example one for files and one for a database.
What a Server Can Expose
Tools: actions the model can ask to run, such as "search files" or "run a query".
Resources: data the model can read, such as a file's contents or a database record.
Prompts: ready-made prompt templates a user can pick for common tasks.
An Example Flow
Imagine an assistant connected to a "files" MCP server, and you ask: "Summarise the notes in my project folder."
The assistant's client asks the server which tools it offers, and gets back something like `list_files` and `read_file`.
The model decides it needs those tools and asks the host to call `list_files`.
The host sends the request to the server. The server returns the file names.
The model asks for `read_file` on the relevant notes, receives the text, and writes your summary.
The same pattern works with a database server: the tool might be "run a read-only query", and the result comes back as data the model can explain. If you want to see how an agent decides to call tools, read AI agent vs AI chatbot.
Security Cautions
MCP gives a model real reach into your systems, so treat it carefully.
Install only servers you trust. A server is code that runs with the access you give it.
Give minimum permissions. Prefer read-only access, and limit a files server to the folders it needs.
Watch for prompt injection. Text returned by a tool, such as a web page or a document, can contain hidden instructions aimed at the model. Treat tool output as untrusted data.
Keep a human in the loop for actions that change or delete things.
The course chapter on MCP security and interoperability goes deeper, and MCP architecture and a local server shows how to build one.
Common Mistakes
Thinking MCP is a model or a product. It is a protocol, a set of agreed rules.
Connecting many servers with broad permissions "just to try". Start small.
Trusting tool output as if it were instructions from you.
Interview tip: explain MCP in one sentence plus one example: "A standard way for AI apps to talk to tools and data, like a files server that lets an assistant read your notes."
Key Takeaway
MCP is a shared standard that lets AI apps connect to tools and data through servers, instead of custom code for each pair. It is powerful, so use trusted servers and minimal permissions.
Ready to start? It covers MCP architecture, building a local server, and securing it. Begin with the free course AI Engineering with LLMs: Advanced.
Comments
Sign in to join the discussion.

