By · Founder, Stacktree · Last updated
blog · MCP

MCP servers explained for developers (2026).

The Model Context Protocol is the standard way AI assistants call tools as of 2026. Every major assistant adopted it. Here is what MCP actually is, what it isn't, and how to build a server in 50 lines.

Get started free

What is an MCP server in plain terms?

An MCP server is a small program that exposes a set of tool calls (and optionally resources and prompts) over a standard protocol — the Model Context Protocol. AI assistants speak that protocol the same way browsers speak HTTP, which means any MCP-compatible client (Claude Code, Cursor, Codex, Claude.ai, Continue, Cline) can call any MCP-compatible server. You write the server once; every assistant gets the tools.

The shape of MCP

MCP has three concepts:

  • Tools. Functions the assistant can call. Each has a name, a JSON-Schema input, and a structured output. This is the most-used MCP feature in 2026.
  • Resources. Read-only data the assistant can request by URI: files, database rows, config. The client pulls them; the server serves them.
  • Prompts. Server-defined prompt templates the assistant can use directly. Less common in practice; mostly used by domain-specific helpers.

For a deeper breakdown of which primitive to reach for, see resources vs tools vs prompts.

Transports

Two transports, picked by the client:

  • stdio: the client spawns the server as a child process and communicates over stdin/stdout. Used by CLI assistants (Claude Code, Codex, Cursor). Auth comes from the parent process.
  • Streamable HTTP: the client POSTs to the server over HTTPS and reads responses as Server-Sent Events. Used by hosted assistants (Claude.ai, ChatGPT custom connectors). Auth is OAuth 2.1 with Dynamic Client Registration (RFC 7591).

Why every assistant adopted it

Pre-MCP, each AI assistant had its own tool-call shape: OpenAI's function calling, Anthropic's tool_use, Google's function-declarations, etc. Tool authors had to ship N integrations to reach N assistants, and rewrite each when the host changed its calling convention. MCP collapses that into one tool surface that every assistant agrees to read.

The adoption curve in 2025–2026 was steep because the alternative was unsustainable. Anthropic open-sourced the spec, OpenAI integrated it into Codex CLI, Cursor adopted it natively, Microsoft added it to GitHub Copilot, and the community shipped ~500 servers in the first year.

A minimal MCP server in 50 lines

// server.ts: TypeScript SDK
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({
  name: "my-server",
  version: "1.0.0",
});

server.tool(
  "say_hello",
  "Greet someone by name",
  { name: z.string() },
  async ({ name }) => ({
    content: [{ type: "text", text: "Hello, " + name + "!" }],
  }),
);

await server.connect(new StdioServerTransport());

Ship it on npm; users add it to their assistant of choice via one line of config.

Where MCP is in 2026

  • Server registry. modelcontextprotocol/servers on GitHub catalogues the official + community list.
  • Spec maturity. The protocol has settled and breaking changes are rare, though the 2026-07 release candidate is the largest revision yet: a stateless core, response caching, and a formal deprecation policy. Recent additions include authorization (OAuth 2.1) and elicitation, where a server can prompt the user mid-call.
  • Discovery. Most clients now have a UI for browsing and installing MCP servers, including OAuth-protected hosted ones.
  • Production usage. Real teams ship internal MCP servers for their custom systems, which is where the protocol stops being a curiosity and starts being infrastructure.

Where Stacktree fits

stacktree-mcp is the MCP server behind Stacktree. The easiest way to wire it into any coding agent is npx stacktree-install. Pick Claude Code, Cursor, Codex, OpenCode or Amp during the prompts and you get seven tool calls in that agent: publish HTML, replace HTML in place, gate by password or email domain, set expiry, list, delete. The protocol is the whole story: there's no separate API to learn, no separate auth model, no separate transport. If your assistant speaks MCP, it speaks Stacktree.

FAQ

Frequent questions

What is the Model Context Protocol? +
MCP is an open protocol that lets AI assistants and IDE agents call external tools, fetch resources, and read prompts in a standard way. Originally introduced by Anthropic in late 2024, it has since been adopted by every major AI assistant — Claude, ChatGPT custom GPTs, Codex CLI, Cursor, Continue, Cline.
How does MCP compare to OpenAI function calling? +
Function calling is a per-call shape inside one provider's API. MCP is a transport-and-protocol layer that decouples the tool from the assistant — the same MCP server runs against any compliant client. Function calling can live inside MCP's tool surface but the reverse isn't true.
What transports does MCP use? +
Two: stdio (for local CLIs spawning the server as a child process) and streamable HTTP with SSE (for hosted clients like Claude.ai). Authentication is OAuth 2.1 with Dynamic Client Registration on the HTTP path; stdio relies on the parent process.
Do I need to build an MCP server to use existing ones? +
No. There are now hundreds of public MCP servers — for filesystem access, GitHub, databases, Slack, web search, code execution, and yes, publishing HTML (Stacktree). You install them in your client of choice and the tools appear automatically.
How do I build my own MCP server? +
The official SDKs (TypeScript and Python) take ~50 lines for a minimal server. You declare your tools with JSON Schema input/output types, implement a handler per tool, and wire stdio or HTTP transport. The spec at modelcontextprotocol.io has a working quickstart.
Keep reading

Related guides

References

Sources and further reading

Try a real MCP server.

Install Stacktree in Claude Code, Codex, or Cursor. See the protocol in action.

Sign up free →