Creativity · MCP — pattern

MCP vs OpenAPI Tool Calling

MCP and OpenAPI-based tool calling both let an LLM invoke external capabilities, but they solve different problems. OpenAPI describes static REST endpoints; MCP describes live sessions between a client and a server, adds prompts and resources alongside tools, and standardizes how a model can list what is available right now. This page compares the two models so you pick the right fit.

MCP facts

Kind
pattern
Ecosystem
anthropic-mcp
Transports
stdio, sse, http

Capabilities

  • Comparison axis: discovery — OpenAPI spec is static, MCP list_tools is dynamic per session
  • Comparison axis: context — MCP carries prompts and resources, not just RPC calls
  • Comparison axis: transport — OpenAPI is HTTP-only, MCP supports stdio/SSE/HTTP/WebSocket

Frequently asked questions

Can I generate MCP tools from an OpenAPI spec?

Yes. Several community generators read an OpenAPI document and produce an MCP server that exposes each operation as a tool. This is a common bridge pattern for existing REST APIs.

Does MCP replace OpenAPI?

No. OpenAPI stays useful for human-readable API contracts, code-gen, and client SDKs. MCP sits on top as the agent-facing interface — often wrapping an OpenAPI-described backend.

Which is better for AI agents?

MCP's per-session discovery and prompt support are purpose-built for agents, so most new agent tooling adopts MCP. OpenAPI remains better when you need a language-agnostic API contract consumable by humans and bots alike.

What about function calling in the OpenAI spec?

Function calling is a message format for model-to-app calls; it complements both OpenAPI and MCP. MCP includes a protocol for discovery and transport that raw function calling does not specify.

Sources

  1. Model Context Protocol — accessed 2026-04-20
  2. OpenAPI Initiative — accessed 2026-04-20
  3. MCP spec overview — accessed 2026-04-20