MCP server, defined
An MCP server is a small program that exposes a set of tools(callable functions) and resources (read-only context) over the Model Context Protocol — an open specification, originally published by Anthropic, that any AI client can speak. Claude, Cursor, ChatGPT, and custom widgets all use the same wire format, so one MCP server works with every client without bespoke glue.
The mental model: REST is for code that already knows your schema. MCP is for an LLM that will discover your tools at runtime, read their descriptions, and pick the right one for the user's request.
Anatomy of an MCP server
- Tools — named actions with JSON-schema inputs (
create_issue,send_email). - Resources — read-only blobs the LLM can fetch by URI (a doc page, a row, a file).
- Prompts — optional reusable prompt templates the host can offer the user.
- Transport — stdio for local clients, HTTP+SSE or Streamable HTTP for remote.
Why MCP matters
Before MCP, every AI integration was bespoke: OpenAI function calling looked one way, Anthropic tool use another, every IDE had its own plugin shape. MCP collapses that to one protocol. Write the server once; every model and every client gets it for free. For the full breakdown of where the two layers actually differ, see MCP vs function calling.
For the strategic version of that argument — why this is worth doing before a competitor ships it, not after — see Why MCP matters.
The 2026 default
A minimal example
A simplest MCP server exposes one tool. In TypeScript with the official SDK:
server.tool("get_weather", {
description: "Get current weather for a city",
inputSchema: z.object({ city: z.string() }),
handler: async ({ city }) => fetchWeather(city),
});That tool is now callable by Claude, Cursor, ChatGPT, or any custom widget — no per-client adapter code.
Three on-ramps to your first server
- Convert an OpenAPI spec — fastest if you already have a REST API.
- Wrap existing endpoints — best when you want control over which tools the LLM sees.
- Use a hosted server — Linear, GitHub, Postgres, Slack already have production MCP servers you can connect to.
See Convert your REST API for the OpenAPI flow.
Production checklist
- Auth: short-lived JWTs or OAuth per end-user. Never share a long-lived key across users.
- Scopes: each tool checks the caller's permissions, same as your REST API would.
- Audit: log every tool call with request ID, user ID, inputs (redacted), outcome.
- Quotas: a gateway in front for per-user rate limits and cost caps.
- Observability: latency and error rate per tool, not just per server.
When you don't need an MCP server
If your AI feature is a pure summarization or classification job with no external action, you don't need MCP — a direct model call is fine. The moment the LLM needs to do something on behalf of a user (create a record, search a database, send a message), MCP is the right shape.
FAQ
- What is an MCP server in one sentence?
- An MCP server is a small program that exposes a set of tools (functions an LLM can call) and resources (read-only context the LLM can fetch) over the Model Context Protocol so that any MCP-aware AI client — Claude, Cursor, ChatGPT, your own widget — can use them without bespoke glue code.
- How is an MCP server different from a REST API?
- A REST API is for humans and code that already know the schema. An MCP server is a thin wrapper that advertises tools with names, descriptions, and JSON schemas so an LLM can discover and call them at runtime without per-model integration work.
- Do I need to write an MCP server from scratch?
- No. You can convert an existing OpenAPI spec into an MCP server, host an open-source one (GitHub, Linear, Slack, Postgres all have community servers), or wrap your existing REST endpoints. Command+K does the conversion in minutes.
- What does MCP stand for?
- Model Context Protocol — an open specification originally published by Anthropic in late 2024 and now supported by every major LLM client. It standardizes how AI clients discover and invoke tools, fetch resources, and stream results.
- Is MCP secure for production?
- MCP itself is a transport spec; security is your responsibility. The production pattern is OAuth or short-lived JWTs per end-user, scoped tool permissions, audit logs on every tool call, and a gateway in front for quotas and rate limits.