25/10/2026 00:03am

What Is MCP in AI? Model Context Protocol Explained
#What is MCP
#Model Context Protocol
#MCP Server
#MCP AI
#MCP vs API
#Claude MCP
Ever wondered why a friend's Claude can read files on their laptop and open issues on GitHub, while yours can only chat? The short answer is usually that your friend connected an MCP server. And that answer always triggers three more questions: what is MCP, do you need to code to use it, and is it safe?
This article answers all three. Today Superdev Academy walks through how MCP works from what you actually see on screen, separates the moving parts so the jargon stops being confusing, and is honest about what to watch out for before you install anything.
What happens when Claude "sees" the files on your computer
Picture this. You open the Claude Desktop app and type, "Take a look at my Downloads folder and tell me which files are work-related." With nothing connected, Claude can only tell you it has no way to see your machine. The language model runs on Anthropic's servers, not on your computer.
Now install the Filesystem Server and ask again. This time Claude sees that it has "tools" available for reading files, searching them and moving them around. When it decides to use one, the app pops up a permission prompt first. You approve, the app reads the folder, and the result goes back to Claude so it can write you an answer.
This exact scenario comes from the official MCP guide to connecting local servers, which states that every file operation needs your explicit approval before it runs. The thing that makes the whole exchange possible is a shared agreement called the Model Context Protocol, or MCP.
Why MCP is called the USB-C port for AI
The official Model Context Protocol site explains it with one analogy: think of MCP like a USB-C port for AI applications. Just as USB-C gives electronic devices a standard way to connect, MCP gives AI applications a standard way to connect to external systems.
Remember when every phone brand had its own charger, and anyone with a few devices carried a tangle of cables? AI integrations looked a lot like that before MCP. When Anthropic announced MCP on November 25, 2024, it described the problem plainly: every new data source needed its own custom implementation, which made truly connected systems hard to scale.
Anthropic released three things that day: the open-source Specification (the written rules of the protocol) with SDKs, support for local MCP servers in the Claude Desktop apps, and an open-source set of pre-built MCP servers for Google Drive, Slack, GitHub, Git, Postgres and Puppeteer.
Put simply: build a server once, and any AI app that speaks MCP can plug into it. No rebuilding the same integration for every vendor.
MCP is no longer a Claude-only thing. The official site lists support from AI assistants such as Claude and ChatGPT, and from coding tools such as Visual Studio Code and Cursor. The latest Specification we could verify at the time of writing is version 2026-07-28 (MCP names its versions by date).
Host, Client, Server: three roles worth telling apart
MCP's vocabulary sounds like networking jargon, but one picture covers it. A connection runs from the Host, through a Client, to a Server.
Host: the AI app you actually have open, such as Claude Desktop, Claude Code or Visual Studio Code. It talks to the model and manages every connection.
Client: a component inside the Host that holds the connection to exactly one Server. Connect three Servers and the Host creates three Clients, one each.
Server: the program that exposes capabilities for the AI to use, such as a Filesystem Server that reads files or a GitHub Server that manages repositories.
Servers come in two kinds. A local server runs on your own machine and talks to the Host over stdio (standard input/output), like the Filesystem Server above. A remote server runs on the internet and talks over Streamable HTTP. MCP's architecture docs use Sentry as the example of a company hosting an MCP server on its own platform.
Why bother with the distinction? Because "client" and "server" show up in every setup guide and every error message. If you remember that the Host is the app you see and the Server is the thing you installed, you will know which side a problem lives on.
The 3 things a Server can offer: Tools, Resources, Prompts
MCP calls what a Server exposes its primitives, and defines three core types.
Tools: functions the AI can invoke to do something, such as writing a file, calling an API or querying a database. This is the part that lets AI act instead of only answer.
Resources: data the Server hands the AI as context, such as file contents or a database schema.
Prompts: reusable templates that shape how you work with the model, such as a starter instruction with examples.
The architecture docs give a tidy example: a Server for a database might expose Tools for querying it, a Resource containing its schema, and a Prompt with examples of how to use those tools. The Host asks every connected Server for its list of Tools and merges them into one registry the model can pick from mid-conversation.
What the setup actually looks like: one config file
In Claude Desktop, local servers are configured in a file called claude_desktop_config.json. On macOS it lives in ~/Library/Application Support/Claude/, and on Windows in %APPDATA%\Claude\. Here is a trimmed version of the example from the official guide, just to show the shape:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop"
]
}
}
}Reading it line by line: filesystem is a name you choose, command and args are what Claude Desktop runs to start the Server, and the final path is the folder the Server is allowed to touch. Save the file, restart the app, and the Server appears in your list of connectors.
Many Servers also need an API key, for example one that pulls data from an outside service. The official guide puts those values in an env block in the same file. If you are not sure how to keep keys like that from leaking, read our guide to keeping API keys safe in .env.
How MCP differs from an API and from function calling
These three terms get mixed up constantly, but they sit at different layers.
An API is the doorway a service opens so other programs can use it; GitHub, for example, has an API for creating issues. If the term is new to you, start with our beginner's guide to APIs. MCP does not replace APIs. Many MCP servers simply wrap an existing API so that any MCP-capable AI app can discover and call it, without anyone writing a separate integration for each app.
Function calling is a model's ability to say "I want to call this function with these arguments," while the developer writes those functions inside their own program, as we showed in Golang The Series EP.172: Function Calling. Tools built that way only exist inside the app you wrote.
MCP moves one layer up. It standardises how a Server announces which Tools it has, so any Host can ask for the list and call them. In practice the Host still uses the model's tool-calling mechanism underneath; the difference is that the tools now live in a Server you can reuse across apps.
A Server that can act for you can also make mistakes for you
This is the most important section in the article, so please don't skip it. The MCP Specification says outright that tools represent arbitrary code execution and must be treated with appropriate caution, and that hosts must get explicit user consent before invoking any tool. The official guide to local servers adds that a Server runs with your user account's permissions, so it can do anything to your files that you could do yourself.
There are two risks to understand. The first is the Server itself. MCP's Security Best Practices page describes attackers hiding a malicious command inside a server's startup configuration, or shipping a malicious payload inside the server package. Paste that config into your file and the command runs on your machine.
The second is prompt injection. OpenAI's MCP documentation explains that attackers can plant instructions in content a model will read, such as a web page, to trick it into leaking data or making write actions you never intended, and it stresses that trusting a server's developer does not make you safe from this. OpenAI also recommends connecting only to servers you know and trust, and preferring official servers hosted by the service provider over third-party ones.
For a beginner, the practical guardrails come down to four habits:
Install Servers only from official sources, such as the MCP project's own repository or the company that owns the service.
Read the
commandandargslines before you save. If you seesudoorrm -rf, stop.Grant the narrowest access possible, for example one project folder for the Filesystem Server rather than your whole home directory.
Read each permission prompt before you click. Don't approve everything in one go.
If Claude Code is your main tool, we cover its own safety questions separately in our Claude, Claude Code and Claude Cowork deep dive.
Do you need to know how to code to use MCP?
To use it, no. Connecting a ready-made Server means editing a config file and approving prompts in the app. Building your own Server is developer work, and there are SDKs in several languages to start from.
One piece of advice: don't connect ten Servers on day one. Start with the one that solves a real task for you, get comfortable, then add more. And if what you actually want is for Claude to follow the same procedure every time, the answer may be Skills rather than MCP; we compare them in When to use Prompts vs. Skills. For how to work alongside an agent that has tools like these without letting it overreach, read How to Work with an AI Coding Agent: A Junior Developer's Guide.
Summary: what is MCP, and how far should you go with it?
MCP, the Model Context Protocol, is an open standard Anthropic released as open source in late 2024 so AI apps can connect to files, databases and outside services in one consistent way. The structure has just three roles, Host, Client and Server, and a Server can offer the AI three kinds of things: Tools, Resources and Prompts. That is why the USB-C comparison fits so well: build once, plug into many apps.
But a port that accepts anything will also accept something harmful. If you want to try it today, start with the Filesystem Server alone, give it one folder, read every permission prompt, and watch what the AI does with your files. That hands-on hour will teach you more about MCP than reading the definition ten times.
Follow more articles and tips for people starting out as programmers on our channels.
Facebook: Superdev Academy Thailand (https://www.facebook.com/superdev.academy.th)
YouTube: Superdev Academy Channel (https://www.youtube.com/@SuperdevAcademy)
Instagram: @superdevacademy (https://www.instagram.com/superdevacademy/)
TikTok: @superdevacademy (https://www.tiktok.com/@superdevacademy?lang=th-TH)
FAQ: Frequently Asked Questions about This Article
A collection of questions and answers to help you better understand the content of this article.