The Model Context Protocol (MCP), developed by Anthropic in 2024, introduces a different integration model than traditional APIs. APIs rely on fixed endpoints that developers code against using documentation or an OpenAPI spec. MCP, by contrast, is a client-server protocol where an AI agent opens an MCP server and asks it to list available tools. The server describes each tool in a schema the model can read, so the agent learns the interface at runtime. This dynamic discovery contrasts with the static nature of APIs. The source notes that without a common protocol, connecting M models to N services requires up to M × N pieces of custom code. With MCP, each service relies on one protocol, reducing that to M + N implementations, which can significantly cut duplicated integration code.
When deciding between MCP and APIs, the source suggests using APIs for straightforward, deterministic calls. For example, a nightly sync that pulls yesterday's orders into a warehouse has one correct sequence and known endpoints. A direct API call runs in milliseconds, costs nothing in tokens, and logs details on failure. MCP makes sense when the call sequence can't be predicted. A support agent handling a customer complaint might need to call the order record, shipping status, or refund endpoint depending on what the customer says. Hardcoding that tree means maintaining every branch forever, but an MCP server lets the agent respond dynamically.
Production systems often use MCP on top of APIs. The source points out that almost any HTTP MCP server has an API underneath: MCP standardizes how the agent makes a request, while the API does the actual work and enforces rate limits. This layering can make AI agents more reliable by restricting them to specific tools and actions. A refund workflow illustrates this: the system validates the order with a fixed API call, lets the agent decide whether a refund applies, then commits to the decision through a second fixed call. In n8n, an agent can call any REST endpoint with the HTTP Request node, consume an external MCP server through the MCP Client Tool node, and expose workflows to external MCP clients with the MCP Server Trigger node. Users can also connect sub-workflows as tools, wrapping several pre-defined steps inside a single MCP tool.
