How to Build an MCP Server in 2026: 5 Patterns I Actually Shipped
Every way to build an MCP. Which MCP pattern fits your project, how to build it step by step, what works and what breaks. Every command verified from 6 real MCPs I shipped.
MCP servers give Claude real capabilities: file access, database queries, API calls, and tools you built yourself. But “how to build an MCP server” doesn’t have one answer. There are two transports (stdio and HTTP), and five ways to ship them: local script, npm package, .mcpb installer, HTTP with Bearer token, and HTTP with OAuth. This article maps every pattern with verified build steps.

Anthropic released MCP — Model Context Protocol — in November 2024. By spring 2025, OpenAI, Microsoft, and Google had all adopted it. It became the industry standard for how AI connects to external tools
Before MCP, AI answered from memory. After MCP, it could connect to your files, your Google Drive, your Slack, your Notion, your calendar, anywhere your data actually lives.
Claude moved fast. Native integrations appeared directly in the app.

You’ve probably installed an MCP server by now. Maybe you followed a tutorial. Maybe you copied a JSON block from a post you bookmarked and pasted it into Claude or Cursor. It connected. Immediately, Claude could talk to your data you never thought to wire up yourself.
I got obsessed with MCPs the week they came out. I’ve tried dozens, kept a handful in my daily workflow, and built several of my own once I hit the limits of what was already out there.
A typical workflow I do after publishing an article involves a custom MCP I’ve built available to premium members, and it looks like this:
After using MCPs intensively day-to-day, I found the term “MCP server” still gets confusing.
Some run locally. Some live behind a URL. Some are easy to share as an npm package. Some need a one-click installer. Some need OAuth and browser sign-in.
Tutorials for one pattern do not translate cleanly to the others, and most do not tell you which kind you’re actually using and building in the first place.
I’ve built the Substack newsletter MCP, the Substack notes MCP, the Substack article MCP, the Gmail MCP, the crossposting MCP, the Build to Launch premium MCP for my paid subscribers. And a handful working locally that I never publicly shared. None of them were the same kind of server, because none of them had the same requirements.
After enough builds, the map became clear. This article is that map.
What’s inside:
MCP Server Types: Stdio vs HTTP — what the two types across five patterns look like in practice, with examples you’ve already seen:
How Stdio MCP Servers Work — local script, npm package, or .mcpb installer
How HTTP MCP Servers Work — Bearer token or OAuth, connected via URL
How to Build a Stdio MCP Server — the full stdio build in 8 verified steps, then three ways to ship it:
Run it locally — point Claude at
dist/index.js, no publishing neededPublish to npm — users install with
npx, two live packages you can try nowBuild a .mcpb installer — one-click install for non-technical users
How to Build an HTTP MCP Server — same HTTP transport, two auth layers:
Bearer token auth — Next.js route with API key auth, deploy to Vercel
OAuth PKCE — browser sign-in, Cloudflare Worker build, three live OAuth MCPs you can connect now
When to Upgrade Your MCP — how the Substack newsletter MCP went from raw Python script to npm package to full OAuth, and what that path tells you about when to upgrade
How to Choose Between Stdio and HTTP MCP Servers — a decision tree: which transport, then which sub-pattern
MCP Server Standards Changing in 2026 — four spec changes worth watching before your next build
Stdio starter, Next.js HTTP starter, and Cloudflare OAuth starter templates in the Build to Launch resource library
🎁 Three starter templates are in the Build to Launch resource library. Access them at the end of the article.
This article continues for members
Join Build to Launch to read the full article, access all cohort content, and connect with other AI builders.