Guide · fundamentals

What is MCP (Model Context Protocol)?

MCP, the Model Context Protocol, is an open standard that lets an AI application call external tools and read external data through one common interface. Anthropic published it in November 2024. It is not a framework, not a hosting product and not tied to one vendor — it is an agreement about how a client asks “what can you do?” and how a server answers, so a capability written once is reachable from every client that speaks the protocol.

By the imagemcpserver.com teamPublished Updated 9 min read

MCP in 30 seconds

  • What it isAn open standard for connecting AI applications to external tools and data.
  • Who made itAnthropic, released as an open specification in November 2024.
  • How it talksJSON-RPC 2.0, over stdio for local servers or HTTP for remote ones.
  • What a server offersTools, resources and prompts — each described by a machine-readable schema.
  • Why it existsTo replace one-off, per-client integrations with a single contract both sides implement.

Why a protocol was needed

Before a standard existed, connecting a model to an external capability meant writing an integration for one specific pairing. Every assistant had its own plugin format; every tool provider re-implemented the same integration once per assistant. Ten tools and five clients is fifty integrations, and every one of them rots independently.

MCP replaces that grid with two sides of one contract. A server describes what it offers in a machine-readable form. A client reads that description and can immediately use it. Ten tools and five clients becomes fifteen implementations, not fifty — and any new client gets every existing server for free.

Before

N × M

One integration per tool, per client.

With a protocol

N + M

Each side implements the contract once.

MCP is often described as a USB-C port for AI applications, and the analogy holds as far as it goes: one shape of connector, many devices behind it. The part the analogy misses is that a USB-C cable does not explain itself. An MCP server does. It hands the client a full description of every capability it has — names, arguments, types, what is required — so the model on the other end is choosing from a menu rather than guessing at a socket.

MCP architecture: host, client, server, transport

Four moving parts, and usually only one of them is yours to think about. The distinction people miss most often is between the host and the client: the host is the application, and it opens one client per server it connects to.

MCP host

The AI application itself — Claude Desktop, Cursor, VS Code, ChatGPT, or your own program built on an SDK. It holds the conversation, decides which servers to connect to, and enforces whatever approval rules the user has set.

MCP client

The connector inside the host that manages one session. Each client has a one-to-one relationship with a single server: it negotiates capabilities on connect, keeps the session alive, and translates between the host and the wire format. A host running six servers is running six clients.

MCP server

A process or an HTTP endpoint that exposes capabilities. It does not know or care which client is calling; it answers the protocol. An image server, a database server, a ticketing server — all the same shape from the outside.

Transport

How the two talk. Either stdio, where the host spawns the server as a local subprocess and pipes JSON-RPC over standard input and output, or HTTP for a remote endpoint. The capability surface is identical either way; only deployment and auth differ.

Local or remote?

A stdio server runs on the user’s machine, so it can touch the filesystem — and every user has to install and update it. A remote HTTP server is one URL and an API key: nothing to install, and a fix you ship reaches everyone at once. Anything that talks to a hosted API, image generation included, belongs remote. See the endpoint and auth header.

Tools, resources and prompts

A server can expose three kinds of thing. In practice most servers, this one included, are mostly about the first.

PrimitiveWhat it isExample here
ToolsActions the model can invoke, each with a JSON schema for its arguments.generate_image, remove_background
ResourcesData the client can read into the model’s context.A generated image the client attaches
PromptsReusable templates a client can surface to the user.A pre-written asset-pipeline instruction

💡 Why the schema matters more than it sounds

Because the tool arrives with a full JSON schema, the model knows which fields exist, which are required, and what the allowed values are — before it calls anything. That is the difference between an agent that gets an aspect ratio right first time and one that guesses and retries. Half of “the agent is unreliable” is really “the tool description was vague.”

How MCP works, step by step

Underneath, MCP is JSON-RPC 2.0. A session runs the same four beats every time, whether the server is a local subprocess or an endpoint on the other side of the internet.

  1. 1Connect and negotiateThe host starts a client, which opens a session and exchanges capabilities with the server: protocol version, which primitives each side supports, what it will and will not do.
  2. 2DiscoverThe client calls tools/list. The server returns every tool with its name, description and JSON schema. The host passes that list to the model as callable tools.
  3. 3DecideThe model reads the schemas and chooses — including choosing not to call anything. This is the step that separates MCP from an API: nobody hard-coded the sequence.
  4. 4Call and returnThe client sends tools/call with the arguments the model chose. The server does the work and returns a result, which goes back into the conversation for the model to act on.

Step four on the wire looks like this. You will rarely write it by hand — your client does — but seeing it demystifies the whole thing.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "generate_image",
    "arguments": {
      "prompt": "a paper boat on still water",
      "aspectRatio": "16:9"
    }
  }
}

That is the entire mechanism. Everything else — capability negotiation, notifications, streaming, progress reporting — is machinery around this one idea.

MCP vs API vs RAG

These get compared as if you had to pick one. You do not — they sit at different layers, and a serious agent usually runs all three.

 Who decidesBest at
REST APIYour code, at build timeFixed pipelines, cron jobs, anything where the sequence is already known
MCPThe model, at run timeOpen-ended tasks where the right tool depends on what the user asked for
RAGYour retriever, before the model runsGrounding an answer in a body of text the model must always see

MCP is not a replacement for your API. Almost every MCP server is a thin protocol layer in front of an ordinary HTTP service — this one included. The same eight image operations are REST endpoints and MCP tools, on purpose, so an agent and a batch job can both do the work without either being forced through the wrong door. If you are weighing the two for a specific integration, the full MCP vs REST comparison goes through the trade-offs case by case.

And MCP is not a replacement for RAG either. RAG puts context in before the model runs; MCP lets the model reach for something during the run. A retrieval step can itself be exposed as an MCP tool, at which point the model decides whether the lookup is worth doing at all — which is usually cheaper than retrieving on every turn.

What MCP actually buys you

Write once, run in every client

A server you ship works in Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, Cline and ChatGPT without a per-client build. The integration cost stops scaling with the number of clients you want to support.

Fewer wrong calls

Schemas are machine-readable, so the model sees required fields and allowed values instead of inferring them from prose. Fewer malformed arguments means fewer retries, and retries are what quietly burn a budget.

Change the tools without shipping the client

Add a tool, rename an argument, deprecate an operation — clients pick it up on the next tools/list. Nobody has to update an app to get the new capability.

Composable steps

Because each operation is its own tool, the model can chain them: generate, cut out the background, upscale, compress. You did not have to anticipate that sequence and build an endpoint for it.

Security and trust

Connecting a server means letting a model take actions on your behalf, so it is worth being deliberate about which ones you install. Three things are worth checking before you paste a config.

  • Tool descriptions are input to the model. A malicious server can write instructions into a tool description and try to steer the agent. Install servers from sources you would trust with a dependency in your package manager, and no further.
  • Scope the credential, not the account. Give the server its own API key with only the permissions it needs, and keep that key in an environment variable rather than committed config. If it leaks, you revoke one key.
  • Keep a human on destructive actions. Most hosts can require approval per tool call. Leave that on for anything that writes, deletes, spends or sends. Read-only and generative tools are the safe ones to let run unattended.

When MCP is worth it

Use MCP when…

  • The model decides what to call and when.
  • You want the same capability in several clients.
  • The tool list should change without redeploying the client.
  • You want schemas the model can read rather than prose it must interpret.

Skip it when…

  • Your own code decides the sequence.
  • It is one call in one service.
  • You need behaviour a protocol layer would only get in the way of.
  • A plain POST does the job in three lines.

The fastest way to understand the protocol is to watch a client use one. Connecting an image server takes a single config entry, and the model has eight new tools the moment it restarts — setup guides for every major MCP client are a click away.

Frequently asked questions about MCP

What is the Model Context Protocol in one sentence?

MCP is an open standard that lets an AI application discover and call capabilities offered by an external server, so any compliant client can use any compliant server without either side writing code specifically for the other.

Who created MCP and when?

Anthropic introduced the Model Context Protocol in November 2024 and published it as an open specification. It is not a proprietary product — the spec, the SDKs and a large share of the server ecosystem are open source, and clients from several vendors implement it.

How is MCP different from an API?

An API is the capability itself; MCP is a standard way to describe and offer that capability to a model. With a REST API, your code reads the docs and decides what to call. With MCP, the server ships machine-readable schemas, the client hands them to the model, and the model chooses. Most MCP servers are a thin protocol layer sitting in front of an ordinary API — including this one.

What is MCP vs RAG?

They solve different problems and compose well. RAG retrieves passages and stuffs them into the prompt before the model runs. MCP lets the model decide, mid-task, to call something — including a retrieval tool. Use RAG when the context is always needed; use MCP when the model should choose whether and when to fetch.

Does ChatGPT use MCP?

Yes. OpenAI supports MCP through custom connectors in ChatGPT and through the Agents SDK and Responses API, so a remote MCP server can be reached from OpenAI models as well as from Claude, Cursor, Windsurf, Cline and VS Code.

What is the difference between a tool and a resource?

A tool is an action the model can invoke, with a JSON schema for its arguments — generating an image, sending a message, running a query. A resource is data the client can read into context, like a file or a record. Prompts are reusable templates a client can surface to the user.

Do I need to run a server locally?

Not necessarily. An MCP server can run as a local process the client spawns and talks to over stdio, or as a remote HTTP endpoint the client connects to over the network. Remote is far easier to operate and update; local is worth it when the server genuinely needs access to your machine.

When should I not use MCP?

When there is no model in the loop. If your own code is deciding what to call and when, a plain HTTP request is simpler and has fewer moving parts. MCP earns its keep when the model itself needs to discover and choose the capability.

Sources