An MCP server is a program that exposes a tool or data source to AI assistants through the Model Context Protocol, an open standard Anthropic introduced in 2024. The AI app (the host) runs a client per server, asks each server what tools and data it offers, and calls them when the model needs them. Use MCP when an assistant or agent should decide what to look up; use a plain API call when the steps are fixed.
What is an MCP server? It is a small program that exposes one system, such as a database, a code repository or a SaaS app, to AI assistants through the Model Context Protocol (MCP), so any compatible assistant can discover its tools and use them without a custom integration. MCP itself is the open standard that defines how the assistant and the server talk: Anthropic introduced it in November 2024 as "a new standard for connecting AI assistants to the systems where data lives."
Checked October 2026 against Anthropic's MCP announcement, the 2026-07-28 specification changelog, the architecture overview, Anthropic's Agentic AI Foundation post and the Claude Code MCP docs.
This page is the hub for everything MCP on iimagined.ai: the definition, one example traced end to end, the MCP vs API decision, and links to the hands-on guides for Claude Code, agents and building your own. It sits inside our wider coverage of AI agent automation, where MCP is the plumbing most agents now use.
MCP meaning: the one-paragraph version
Before MCP, every AI app that wanted to read your Postgres database or open a GitHub issue needed its own integration for each service. MCP turns that into a shared plug. A service gets one MCP server; every app that speaks MCP can use it. Anthropic launched it with ready-made servers for Google Drive, Slack, GitHub, Git, Postgres and Puppeteer. In December 2025 Anthropic donated the protocol to the Agentic AI Foundation, a directed fund under the Linux Foundation co-founded with Block and OpenAI, so it is now vendor-neutral.
What is an MCP server, and who are the host and client?
The specification names three roles. People mix them up constantly, so here they are in the order a request travels:
- 01Host
The AI app you use: Claude Code, an IDE, a desktop assistant or your own agent. It holds the model and asks for your consent.
- 02Client
A connector the host creates for each server. One client talks to exactly one server.
- 03Server
The program that exposes a system. It can be a local process or a remote web service.
- 04Your system
The database, repo, inbox or API the server wraps, using credentials you gave it.
Source: modelcontextprotocol.io architecture overview, checked October 2026
A server offers three kinds of things. Tools are actions the model can call, such as "run this SQL query" or "create an issue." Resources are data the app can read as context, addressed by URI, such as a file or a record. Prompts are reusable templates the server ships, such as "summarise this pull request." Messages are JSON-RPC, carried over stdio for local servers or Streamable HTTP for remote ones.
One change matters if you read older tutorials: the 2026-07-28 revision of the spec made the protocol stateless. The old initialize handshake and session header are gone; each request carries its protocol version and capabilities, and servers answer a server/discover call. It also deprecated roots, sampling and logging, and the old HTTP+SSE transport. Current SDKs still accept older clients, so existing servers keep working.
MCP explained with one running example
Say you run a small SaaS and keep signups in Postgres. You use Claude Code as your assistant and have connected a Postgres MCP server with a read-only database user. You type: "How many trial accounts signed up last week but never created a project?" Here is what happens, step by step.
- 1The host lists available tools
Claude Code's client asks the Postgres server what it offers (tools/list) and gets back a query tool with a description and input schema.
- 2The model picks a tool
It reads your question and the tool description, then drafts a SQL query as the tool's input.
- 3You approve the call
The host shows the tool call. You can allow it once, always, or decline.
- 4The server runs it
The server executes the query with the read-only user and returns rows as the tool result (tools/call).
- 5The model answers
It reads the rows and replies in plain language, and can call the tool again to refine the count.
Nothing in that flow is specific to Postgres or to Claude Code. Swap in a GitHub server and the same steps open issues; swap the host for another MCP client and the same Postgres server works there too. That reuse is the whole point.
MCP vs API: which one do you need?
MCP does not replace APIs. Most servers are thin wrappers around an API you could call yourself. The question is who decides when to call it: your code, or the model.
| Direct API call | MCP server | |
|---|---|---|
| Who it is for | Developers calling one service from their own code | AI apps that need to use many services the same way |
| Discovery | Read the docs, write the calls by hand | The client asks the server what tools it has (tools/list) |
| Integration work | One integration per app per service | One server per service, reused by every MCP client |
| Who decides to call it | Your code, at a line you wrote | The model, based on the tool description, with your approval |
| Best when | Fixed, predictable steps in a pipeline | A conversation or agent decides what to look up or do next |
- The steps never change (a nightly sync, a webhook)
- You need exact control over every request
- Only one app will ever use it
- Cost per run must be predictable
- An assistant or agent chooses what to look up
- Several AI tools need the same system
- You want a person to approve each action
- The vendor already ships an official server
In automation work the two often sit side by side. An n8n workflow with an AI step calls fixed APIs on a schedule, while the same team uses MCP inside their coding assistant for questions nobody scripted in advance.
Using MCP servers in Claude Code and IDEs
Claude Code is the quickest place to try MCP. A remote server is added with claude mcp add --transport http <name> <url>; a local one with claude mcp add <name> -- <command>. Scope decides who sees it: local (default, you in this project), project (written to a shared .mcp.json file in the repo) or user (you, in every project). Run /mcp inside a session to check status and sign in. Claude Code asks for approval before it uses project-scoped servers from a .mcp.json file. Checked October 2026 in the Claude Code MCP docs.
- Install Claude Code step by step before you add any server.
- Claude Code in VS Code covers the editor side, where MCP tools show up in the same session.
- The Claude coding guide puts MCP next to the other ways to give Claude context.
MCP in agents and automations
Agents are where MCP pays off most, because an agent decides its next step at run time and needs a uniform way to reach many systems. For the bigger picture of when an agent beats a fixed workflow, read our AI agent automation guide. If you orchestrate several agents, agent-to-agent workflows in n8n shows how they hand work to each other. And if you build apps by prompting rather than typing code, the vibe coding guide covers where MCP fits in that loop.
Building and selling AI tools is what our AI SaaS Builder program teaches end to end, including wiring a model to real data the way MCP does.
Building your own MCP server
Build one when the system you need has no official server, or when you want to expose only a few safe actions instead of a whole API. Official SDKs exist for TypeScript, Python, Go and C#, among others. The work is mostly design, not code:
- List the three to five actions the assistant actually needs, not the whole API
- Write each tool description for the model: what it does, when to use it, what it returns
- Define strict input schemas so bad arguments fail early
- Use a scoped, revocable token; never your admin key
- Return compact results; every row you send costs tokens
- Log every tool call so you can audit what the model did
If you have not called a model API before, start with our first Claude API app tutorial; a server is the same skill pointed the other way.
Start here: a path through MCP
- Step 1Install Claude Code
Get a working MCP host on your machine.
- Step 2Add one official remote server
Pick a vendor-run server for a tool you already use, with a read-only token.
- Step 3Ask questions you could not script
Use it for a week and note which actions you actually approve.
- Step 4Wrap one internal system
Build a small server that exposes only those actions.
MCP: frequently asked questions
What is an MCP server in simple terms?
An MCP server is a small program that exposes a system, such as a database, a file store or a SaaS app, to AI assistants through the Model Context Protocol. It lists the actions (tools) and data (resources) it offers, and any MCP-compatible app can discover and use them without a custom integration. It can run on your machine or as a remote web service.
What does MCP stand for in AI?
MCP stands for Model Context Protocol. Anthropic introduced it in November 2024 as an open standard for connecting AI assistants to the systems where data lives, and donated it to the Agentic AI Foundation under the Linux Foundation in December 2025. The name describes the job: a shared protocol for giving a model the context and actions it needs.
What is the difference between MCP and an API?
An API is the interface a single service exposes, with its own endpoints, auth and documentation. MCP is a standard layer an AI app uses to talk to many services the same way. Most MCP servers wrap an existing API: the server calls the API, and the AI client sees uniform, self-describing tools. You still need the API underneath; MCP removes the per-app integration work.
Is MCP only for Claude?
No. Anthropic created MCP, but it is an open standard now governed under the Linux Foundation, with official SDKs in several languages. Many coding assistants, IDEs and agent frameworks act as MCP clients, and anyone can publish a server. One server you build or install works with every client that supports the protocol, which is the main reason to use it.
Are MCP servers safe to install?
Treat an MCP server like any software you give access to your accounts. It runs with whatever credentials you hand it, and a server that fetches outside content can carry prompt injection into your session. Anthropic's Claude Code docs say to verify you trust each server before connecting it. Prefer official servers from the vendor, give read-only tokens where possible, and review tool calls before approving them.
Do I need to code to use MCP?
Not to use one. In Claude Code, adding a remote server is one command, and many desktop apps add servers through a settings screen. Building your own server takes some programming, usually TypeScript or Python with an official SDK, but a basic server that wraps one API is a small project once you know which actions the assistant should be allowed to take.
Connect AI to real systems and ship it as a product.
All Access includes the AI SaaS Builder program alongside the other three programs, live coaching and the private community, in one subscription.
Building with MCP? Compare notes
Join the free Discord to share servers that work, setups that break and what other builders are connecting.