Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

MCP vs API: What the Difference Means in Practice

· 7 min read · Home Tech

In this article
  1. What an API actually gives you
  2. What MCP adds on top of an API
  3. Where MCP fits and where it does not
  4. Cost and upkeep in plain terms
  5. Worked example: a support assistant that looks up orders
  6. How do you decide between MCP and an API for one task?
  7. What to check before you commit

Pick MCP if... you are building an assistant or agent that must discover and call many tools across different servers without writing custom glue for each one.

Pick an API if... you need one specific service's data or action, want the tightest control over the request, and are happy to code against that service's own contract.

An API is a fixed contract between your code and one service: you send a defined request to a defined endpoint and get a defined response. MCP (Model Context Protocol) is a standard way for an AI application to discover and use tools, data sources and prompts exposed by separate servers, so the model-facing side is negotiated at runtime rather than hard-coded per service.

AttributeAPIMCP
What it connectsYour code to one serviceAn AI host or client to many servers
ContractFixed by the provider: endpoints, parameters, authStandard message shape; each server publishes its own tools and resources
DiscoveryRead the docs, then code the callsClient asks the server what it offers at connect time
Who writes the integrationYou, per serviceUsually the server author, once, for any compatible client
AuthenticationWhatever the provider requires (keys, OAuth, tokens)Handled by the server or host; varies by server
Best fitDeterministic app logic, batch jobs, tight latency controlAssistants that need to choose tools at runtime
Failure surfaceYour request, the network, the provider's limitsClient, transport, server, and the underlying API the server wraps
DebuggingLogs of requests and responsesSame, plus the client-server handshake and tool list

What an API actually gives you

An API is a promise: this URL, this method, these fields in, that shape out. You read the documentation, obtain credentials, and write code that matches. Nothing is negotiated. If the provider adds a field, you ignore it; if it removes one, your code breaks and you fix it.

That rigidity is the point. A payment call must do exactly one thing every time. A nightly export must return the same columns. You can test an API call in isolation, replay it, and compare responses byte for byte. When something fails, the failure is usually one of three things: your request is malformed, the network dropped, or you hit a rate limit.

The cost is integration work. Ten services mean ten sets of credentials, ten response formats, ten sets of error codes. Each new service is a new small project, and the code that calls it lives in your application forever.

What MCP adds on top of an API

MCP does not replace the API underneath. A typical MCP server wraps one or more APIs, a database, or a local file tree, and exposes them as tools, resources and prompts. The client — an AI application or an agent framework — connects, asks what is available, and receives a list with names, descriptions and input schemas.

That list is the difference. With a plain API, the set of possible calls is known only to the developer who read the docs. With MCP, the set is announced at runtime, so a model can pick a tool it has never seen before, as long as the description is clear enough. Add a new server to the client's configuration and its tools appear; remove it and they vanish.

Three primitives cover most of it. Tools are actions the model can invoke, with typed inputs. Resources are readable data, addressed by URI, that the client can load into context. Prompts are reusable templates the server offers. The transport is usually local standard input/output for a server on the same machine, or a network transport for a remote one.

Where MCP fits and where it does not

MCP fits when the caller is a model that must decide what to do next. A support assistant that might need to look up an order, check a shipping status, or open a ticket is the canonical case: three servers, one client, no bespoke routing code.

MCP does not fit when the caller is deterministic code. If your job is to fetch a report every morning at 06:00 and write it to storage, an API call in a scheduled script is simpler, faster and easier to test. Adding a protocol layer between two pieces of code that already agree on a format buys nothing.

It also does not fit when you need guarantees the protocol cannot give. MCP standardises discovery and message shape, not semantics. A tool named search on one server and search on another can behave completely differently, and the client has no way to know except from the description.

Cost and upkeep in plain terms

An API integration costs developer hours up front and again at every breaking change. Credentials must be stored and rotated. Rate limits must be respected with retries and backoff. The ongoing burden is proportional to the number of services you call.

An MCP setup shifts some of that burden to the server author. The client side is written once against the protocol; each server carries its own connection logic. The new burden is operational: you now run or connect to servers, keep them updated, and review what tools they expose before granting them to a model. A server that can write files or send messages is a capability you are handing over, so the review is not optional.

Neither is free. The question is who pays and when: you pay per integration with APIs, and per server plus per review with MCP.

Worked example: a support assistant that looks up orders

Say an assistant must answer "where is order 4471?" by calling a shipping provider.

API route. Read the provider's docs. Find the endpoint, for example a GET on an orders path with the order identifier in the path. Store the API key in the host's secret store. Write a function that builds the request, sets the auth header, parses the JSON, handles a 404 for unknown orders and a 429 for rate limiting with exponential backoff, and returns a short status string. Register that function as a tool for the model. Roughly 60 to 120 lines depending on error handling.

MCP route. Configure the shipping provider's MCP server in the client, or run a small server of your own that wraps the same API. The client connects, lists tools, and finds one whose description covers order lookup with an order ID input. The model calls it with 4471. Your code is the configuration entry plus a permission decision about whether this server may be used. The wrapping work still exists if you write the server, but it is written once and any compatible client can use it.

The API route gives you exact control over retries and caching. The MCP route gives you the same underlying data with less client code and more moving parts.

How do you decide between MCP and an API for one task?

Work down this list and stop at the first line that matches.

  • The caller is code you wrote, with a fixed sequence of steps: use the API.
  • The caller is a model choosing among several tools it did not have at build time: use MCP.
  • You need byte-level control over headers, retries or caching: use the API directly, or wrap it in a server you control.
  • You are integrating the same capability into several different AI clients: use MCP so the work is done once.
  • The service has no MCP server and writing one is more work than the integration saves: use the API.
  • The task involves sensitive actions such as sending mail or deleting records: either way, require explicit confirmation before the call runs.

What to check before you commit

For an API, confirm the authentication method, the rate limits, the error format, and whether the provider versions its endpoints. Write down what a 4xx and a 5xx mean for your retry logic, because retrying a malformed request forever is a common way to get blocked.

For MCP, confirm what the server exposes before you connect it: read the tool list and descriptions, check whether it can write as well as read, and decide which tools the client may call without asking. Test the connection in isolation first. Menu labels and configuration file locations differ between clients and versions, so check the client's own settings for the server entry rather than assuming a path.

In both cases, log every call with its inputs and outputs. When an answer looks wrong, the log tells you whether the model chose the wrong tool, the tool returned bad data, or the underlying API failed — and those three need different fixes.