# MCP vs API: When an Agent Needs an MCP Server

> Canonical: https://skillalmanac.com/learn/mcp-vs-api | Updated: 2026-11-23 | Index status: not offered to search engines

Compare MCP with a direct API call for AI agents: the tradeoffs, a decision rule, and when a reusable skill fits better than either.

## Facts

- 2026-11-21: MCP is an open standard for connecting AI applications to external data sources, tools and workflows (https://modelcontextprotocol.io/docs/getting-started/intro)
- 2026-11-21: MCP servers expose tools, resources and prompts, and clients discover them with tools/list and run tools with tools/call (https://modelcontextprotocol.io/docs/2026-07-28/learn/architecture.md)
- 2026-11-21: MCP has two transports: stdio for local servers and Streamable HTTP for remote servers (https://modelcontextprotocol.io/docs/2026-07-28/learn/architecture.md)
- 2026-11-21: For stdio servers, MCP's docs say to log to stderr, because stdout carries protocol messages (https://modelcontextprotocol.io/docs/2026-07-28/learn/architecture.md)
- 2026-11-21: An Agent Skill is a directory whose SKILL.md needs a name (max 64 characters) and a description (max 1,024 characters) (https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview)
- 2026-11-21: Skills in the Claude API run in a container with no network access (https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview)

A plain API call is enough when your code knows the one endpoint it needs, controls every parameter, and only one program ever makes the call. Use MCP when an agent should discover a set of actions at runtime, and the same server should work in several MCP clients without custom glue code for each one.

## What each one is

An MCP host, such as Claude Code, starts one MCP client per server. The client talks to the server with JSON-RPC 2.0 messages. The server publishes its tools with names, descriptions and JSON Schema inputs, and the model picks among them. A direct API call is different: your code builds the request, and the model sees only what you put into its prompt or tool definitions. The main difference is who discovers the capability and who maintains the integration, not the wire format.

## Comparison

| Feature | MCP server | Direct API call |
| --- | --- | --- |
| Capability discovery | Client lists tools with `tools/list` at runtime | Your code hard-codes the endpoint |
| Input contract | JSON Schema per tool, defined by the server | Whatever the API documents, mapped by your code |
| Transport | stdio (local) or Streamable HTTP (remote) | HTTP or whatever the service uses |
| Reuse across clients | Any MCP-compatible host can load the same server | Each client needs its own integration |
| Change signals | Optional `listChanged` notifications, sent without a delivery promise | Poll the endpoint yourself |
| Setup cost | A server process or service to run and maintain | Write one request function |

Check the current protocol version at modelcontextprotocol.io before you build, since the spec revises over time.

## Decision rule

- Choose a direct API call when there is one endpoint, fixed parameters, one caller, and no need for the model to choose among actions. A nightly script that reads one report is an example.
- Choose MCP when several hosts (an editor, a desktop app, a chat client) should use the same capabilities, or when the model should pick among several operations. A server exposing `list_deployments` and `get_deploy_log` with typed inputs, used from both an IDE and a chat app, fits this case.
- Choose a skill when the need is know-how, such as a checklist or a set of conventions, rather than a live connection to a system.

## Pitfalls

1. **Wrapping one endpoint in MCP.** You add a server to run and secure, with no discovery benefit. Notice it when the server exposes one tool that one caller uses. Fix it by calling the API directly.
2. **Printing logs to stdout in a stdio server.** Stdout carries protocol messages, so stray text breaks the connection. Notice it as a client that connects and then fails on the first call. Fix it by writing logs to stderr.
3. **Relying on notifications for freshness.** The architecture docs say change notifications arrive without a delivery promise, so a missed one leaves stale data. Fix it by re-running `tools/list` on a timer, honoring the `ttlMs` value the server returns.
4. **Exposing a remote server without auth.** Streamable HTTP supports bearer tokens, API keys and custom headers, and MCP recommends OAuth. Test with a request that has no token and confirm it is rejected.
5. **Vague tool names and descriptions.** The model chooses tools from these fields alone. Notice it when the agent calls the wrong tool. Fix it with specific names such as `calculator_arithmetic` and descriptions that say when to use the tool.

## When to use a skill instead

A skill fits when the work is procedure, such as a team's rules for deciding between MCP and a direct API for a new integration. Skills load on demand from a SKILL.md file, and only the name and description stay in context until one is triggered. Know-how packaged as a skill opens no connection to anything, and in the Claude API skills execute in a container with no network access. If you have decided to build an MCP server, [mcp-server-builder](/skills/skill-almanac/mcp-server-builder) covers the server design, including tool design, schemas, transport choice and auth. The current catalogue has no skill for auditing live webhook delivery, so use the webhook provider's own delivery log and retry documentation when the integration relies on incoming events rather than agent-initiated requests.

## FAQ

**Is an MCP server just an API wrapper?**
In shape, often yes: it exposes existing operations as tools. The difference is that the server describes each tool with a schema, and any MCP client can list and call those tools the same way.

**Can a skill replace an MCP server?**
No. A skill gives the model instructions and optional scripts, while an MCP server connects the agent to a live system. Use a skill for how to work, and MCP for reaching the system.

**Does MCP mean my agent needs a server running all the time?**
Not always. Local servers using stdio run as a process started by the host, while remote servers use Streamable HTTP and must stay reachable.

## Related skills

- [mcp-server-builder](https://skillalmanac.com/skills/skill-almanac/mcp-server-builder.md): Platform Score 56/100 (provisional)

## Related guides

- [What Is an MCP Server? Tools, Resources and Prompts](https://skillalmanac.com/learn/what-is-an-mcp-server.md)
- [What Does MCP Stand For? Model Context Protocol Explained](https://skillalmanac.com/learn/what-does-mcp-stand-for.md)
- [Debug an MCP Server with MCP Inspector](https://skillalmanac.com/learn/debug-an-mcp-server-with-inspector.md)
- [MCP Server Examples: Learning From a Reference Server](https://skillalmanac.com/learn/mcp-server-examples.md)
- [AI Hallucination: What to Check in Agent Output](https://skillalmanac.com/learn/ai-hallucination-what-to-check.md)
- [What Is an LLM? The Facts Agent Users Need](https://skillalmanac.com/learn/what-is-an-llm-for-agent-users.md)

## Sources

- https://modelcontextprotocol.io/docs/getting-started/intro
- https://modelcontextprotocol.io/docs/2026-07-28/learn/architecture.md
- https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview

Platform Scores report our assessment under a published method. They are not a safety guarantee.
