MCP guides
Last updated: September 2026
The Model Context Protocol (MCP) is the open standard AI applications use to discover and call tools, and these guides explain it from the point of view of someone who already runs an API. They cover what the protocol is, how it relates to the API and OpenAPI document you already have, how to turn that document into an MCP server, and how to run and secure that server once people depend on it.
How to use these guides
If MCP is new to you, read the first four guides in order. They build a mental model: what MCP is, where it sits next to your API, how it differs from the function calling you may already use with a model provider, and when an agent should use an MCP server rather than your SDK. Everything after that assumes this model.
If you already know the protocol and want to ship, jump to the second group. Those guides are practical and include working code tested against the current specification revision, 2026-07-28, which made MCP stateless and changed how servers are written. Older tutorials that open a GET /sse stream or depend on a session ID describe the 2024 and 2025 revisions; the concepts carry over, but the wire details do not.
The third group is about using a server once it exists: connecting it to a client, getting the configuration right, and testing it. The last group covers running a server in production: hosting it remotely, deciding who may connect, securing it, and learning from servers other teams have built.
A note on perspective. Scalar hosts MCP servers generated from OpenAPI documents, so we have opinions, and we say so where they matter. The guides still explain every approach, including writing your own server with the official SDK and generating code with other tools, and they point out when those are the better choice.
Understand MCP
- What is MCP? Hosts, clients, and servers; tools, resources, and prompts; stdio vs Streamable HTTP; and what changed in the 2026-07-28 revision.
- MCP vs API Why MCP is a layer on top of your API rather than a replacement, with the same task done both ways.
- MCP vs function calling How a model provider's tool calling relates to MCP, and when you need each.
- MCP vs SDK Who decides what gets called, and when an agent is better served by your SDK or by an MCP server.
Build an MCP server from your API
- REST API to MCP server An architecture guide for API providers: which endpoints to expose, how to describe them as tools, and what the server in front of your API must handle.
- Generate an MCP server from OpenAPI Hand-written with the official SDK, generated code, or hosted: a fair comparison, a tested TypeScript server, and the tool-design decisions that matter.
- OpenAPI to MCP server: how the mapping works Operation by operation and field by field, including
$ref, recursive schemas,oneOf, file uploads, and security schemes. - MCP API documentation Documenting an MCP server for people and models, and publishing your API docs in forms agents can read.
Connect, configure, and test
- Connect an MCP server to Claude Adding local and remote servers to Claude Code, Claude Desktop, and claude.ai.
- MCP server configuration The client config files across major clients, scopes, and the small differences that break copied snippets.
- How to test MCP servers Protocol checks with the Inspector, unit tests for each tool, CI, and evals with a real model.
Run it in production
- Remote MCP servers Serving MCP over Streamable HTTP, hosting options, and the trade-offs against local stdio servers.
- MCP OAuth How authorization works for remote servers, and how to keep upstream API credentials away from the model.
- MCP server security Threats and controls for production servers: authentication, least privilege, untrusted input, rate limits, and audit trails.
- MCP server examples Real servers, what they expose, and the design patterns worth copying.
Try it with your own API
The fastest way to see how your API looks to a model is to convert your OpenAPI document with the OpenAPI to MCP tool. When you want a server other people can use, Scalar's hosted MCP servers read the document directly, let you choose which operations agents may search or execute, and handle authentication, with OAuth for people outside your team.
Related
- Learn: What is OpenAPI? · OpenAPI security schemes
- Docs: MCP servers in Scalar
- Product: Scalar MCP & Agent — hosted MCP servers from your OpenAPI document.