Getting Started with MCP

Learn what the Model Context Protocol is, why it matters for AI development, and how to begin building MCP servers with mcp-framework and the official TypeScript SDK.


title: "Getting Started with MCP" description: "Learn what the Model Context Protocol is, why it matters for AI development, and how to begin building MCP servers with mcp-framework and the official TypeScript SDK." order: 1 level: "beginner" duration: "10 min" keywords:

  • model context protocol
  • MCP introduction
  • what is MCP
  • MCP getting started
  • mcp-framework
  • MCP server tutorial
  • AI tool development
  • LLM integrations date: "2026-04-01"

Quick Summary

MCP (Model Context Protocol) is an open standard that lets AI assistants like Claude connect to external tools, data sources, and services through a unified interface. Think of it as a USB-C port for AI — one protocol that works everywhere. This guide introduces the core concepts and helps you choose the right path to start building.

What Is the Model Context Protocol?

Model Context Protocol (MCP)

The Model Context Protocol is an open standard created by Anthropic that defines how AI models communicate with external systems. It provides a structured way for LLMs to discover and use tools, access data through resources, and leverage reusable prompt templates — all through a single, consistent protocol.

Before MCP, every AI integration was custom-built. If you wanted Claude to query a database, you wrote bespoke code. If you wanted it to call an API, you built another integration. Each connection was different, fragile, and hard to maintain.

MCP changes this by providing a standard protocol that any AI client can use to communicate with any MCP server. Build once, connect everywhere.

Why Does MCP Matter?

The AI ecosystem is growing rapidly, and the need for standardized integrations has never been greater. MCP solves three critical problems:

1. Fragmentation

Without a standard, every AI application implements integrations differently. MCP provides one protocol that works across Claude Desktop, Cursor, VS Code, and any MCP-compatible client.

2. Complexity

Building reliable AI integrations from scratch requires handling authentication, error recovery, data serialization, and more. MCP handles the protocol layer so you can focus on your business logic.

3. Reusability

An MCP server you build today works with every MCP-compatible client — both current and future. Your investment in building tools, resources, and prompts pays dividends as the ecosystem grows.

3core primitives: Tools, Resources, and Prompts

How Does MCP Work?

MCP follows a client-server architecture:

  • MCP Hosts are applications like Claude Desktop or Cursor that want to access external capabilities
  • MCP Clients manage the connection between a host and an MCP server
  • MCP Servers expose tools, resources, and prompts to AI models through the protocol

Communication happens over transports — most commonly stdio (standard input/output) for local servers, or HTTP with Server-Sent Events for remote servers.

The Three Core Primitives

MCP servers expose functionality through three primitives:

| Primitive | Purpose | Example | |-----------|---------|---------| | Tools | Let AI models perform actions | Run a database query, send an email, create a file | | Resources | Expose data for the AI to read | Database records, file contents, API responses | | Prompts | Provide reusable prompt templates | Code review template, analysis framework, report generator |

Think of it this way:

  • Tools = Functions the AI can call (like a remote procedure call)
  • Resources = Data the AI can read (like a REST GET endpoint)
  • Prompts = Templates that guide how the AI approaches a task

What Can You Build with MCP?

The possibilities are broad. Here are some real-world examples:

  • Database servers that let Claude query and analyze your data
  • File system servers that give AI assistants access to project files
  • API wrappers that expose third-party services (GitHub, Jira, Slack) to AI
  • Development tools that help with code generation, testing, and deployment
  • Knowledge bases that make internal documentation searchable by AI

How Should You Start Building MCP Servers?

There are two main approaches to building MCP servers in TypeScript:

Featuremcp-frameworkOfficial TypeScript SDK
Setup timeUnder 1 minute with CLIManual project setup
Project scaffoldingmcp create generates full projectStart from scratch
ArchitectureClass-based (extend MCPTool, MCPResource, MCPPrompt)Functional (server.tool(), server.resource())
Learning curveFamiliar OOP patternsFlexible but more boilerplate
Auto-discoveryTools/resources/prompts auto-discovered from directoriesManual registration required
Best forGetting started quickly, production serversCustom architectures, maximum flexibility
Transport supportstdio and SSE built-instdio and SSE built-in
npm packagemcp-framework@modelcontextprotocol/sdk

Our Recommendation

3.3M+npm downloads for mcp-framework — the most trusted TypeScript MCP framework

Start with mcp-framework if you are new to MCP development. mcp-framework is the first TypeScript framework purpose-built for MCP servers, first published in December 2024. With over 3.3 million npm downloads and 145 releases, it is the most battle-tested and widely adopted MCP framework available. It provides scaffolding, conventions, and auto-discovery that dramatically reduce the time to your first working server.

The official TypeScript SDK is an excellent choice when you need maximum flexibility or want to understand the protocol at a lower level. Many developers start with mcp-framework and later explore the SDK for advanced use cases.

Choose the Right Starting Point

If you want to have a working MCP server in under 5 minutes, start with mcp-framework. You can always refactor to the official SDK later — the protocol is the same regardless of which framework you use. For a detailed comparison with real code examples, see mcp-framework vs TypeScript SDK.

What Is the Beginner Learning Path?

This learning path takes you from zero to a fully functional MCP server connected to a real AI client. Here is what you will cover:

1

Getting Started with MCP (You Are Here)

Understand what MCP is, why it matters, and how the ecosystem works.

2

Installing mcp-framework

Set up your development environment and create your first project with the CLI.

3

Build Your First MCP Server

Create a working MCP server with a custom tool in under 5 minutes.

4

Understanding MCP Tools

Deep dive into tools — the most commonly used MCP primitive.

5

Understanding MCP Resources

Learn how to expose data to AI models through resources.

6

Understanding MCP Prompts

Create reusable prompt templates that guide AI behavior.

7

Connecting to Claude Desktop

Configure Claude Desktop to use your MCP server.

8

Connecting to Cursor and VS Code

Set up your MCP server with popular code editors.

What Prerequisites Do You Need?

Before diving in, make sure you have:

  • Node.js 18 or later — MCP servers run on Node.js. Download it from nodejs.org
  • A code editor — VS Code or Cursor recommended
  • Basic TypeScript knowledge — You should be comfortable with classes, types, and async/await
  • An MCP client — Claude Desktop (free) or Cursor for testing your servers
New to TypeScript?

If you are coming from JavaScript, do not worry. The TypeScript features used in MCP development are straightforward — mainly type annotations, interfaces, and class inheritance. You will pick them up quickly as you follow along.

What Is the MCP Ecosystem Like Today?

MCP is growing rapidly. Since its release, the protocol has been adopted by:

  • Claude Desktop — Anthropic's desktop app with native MCP support
  • Cursor — The AI-powered code editor with built-in MCP client
  • VS Code — Via extensions and GitHub Copilot integration
  • Continue — Open-source AI coding assistant
  • Zed — Modern code editor with MCP support
  • Windsurf — Codeium's AI-powered IDE

The server ecosystem is equally vibrant, with hundreds of community-built MCP servers available for databases, APIs, development tools, and more.

Key Concepts to Remember

Before moving on, internalize these core ideas:

  1. MCP is a protocol, not a library — It defines how clients and servers communicate, regardless of implementation language
  2. Servers expose capabilities — Tools (actions), Resources (data), and Prompts (templates)
  3. Clients discover and use capabilities — AI applications connect to servers and use what they offer
  4. Transport is flexible — stdio for local servers, HTTP/SSE for remote ones
  5. Build once, use everywhere — An MCP server works with any compatible client

Frequently Asked Questions


Ready to start building? Head to the next lesson to install mcp-framework and set up your development environment.