- Building an MCP server in TypeScript takes about 30 minutes and requires no prior protocol experience.
- An MCP server in TypeScript lets AI models like Claude query real data without manual copy-pasting.
- The Model Context Protocol standardises tool integration across Claude Desktop, Cursor, and other AI clients.
- Three core primitives — Resources, Tools, and Prompts — cover almost every integration use case you’ll encounter.
Why MCP Is the API Standard AI Development Has Been Missing
If you’ve spent any time building on top of AI models in the last two years, you’ve felt the friction. Every platform had its own way of doing things. OpenAI had function calling. Anthropic had tool use. Cursor had its own plugin format. You’d write an integration for one client and immediately face a rewrite for the next. That’s exactly the mess that the Model Context Protocol — MCP — was designed to clean up. And if you want to understand it hands-on, building an MCP server in TypeScript is the fastest path from theory to working code.
MCP is a wire-level standard that defines how AI models communicate with external tools and data sources. The model issues a structured request, your server handles it, and the result comes back in a format the model already understands. Write the server once, and any compliant client can call it — whether that’s Claude Desktop, Cursor, or something you build yourself. That’s a meaningful shift for developers who’ve been maintaining parallel integrations for years.
The Three Primitives Every MCP Developer Needs to Know
Before touching any code, it helps to understand what MCP actually gives you to work with. The protocol is built around three core abstractions.
- Resources are read-only data endpoints — think database rows, file contents, or API responses the model can fetch on demand.
- Tools are callable functions. The model reads the tool’s description and schema, decides when it’s relevant, and calls it with structured arguments.
- Prompts are reusable prompt templates that clients can surface to users directly. They follow the same pattern as tools and resources, but most servers won’t need them to start.
The distinction between Resources and Tools matters more than it might seem. Resources are pull-based — the model requests them when it decides it needs context. Tools are action-based — the model calls them to do something. Getting that mental model right early will save you from architectural headaches later.
Setting Up Your MCP Server in TypeScript
You’ll need Node 18 or higher. Beyond that, the dependency list is intentionally minimal. The official SDK lives at @modelcontextprotocol/sdk on npm — version 1.11.x as of mid-2026 — and Zod handles input schema validation. That’s it.
Start by scaffolding a new project and installing dependencies:
- Create a directory


