Back to Reference

MCP Protocol Overview

Complete overview of the Model Context Protocol (MCP) — architecture, capabilities, and how mcp-framework implements the standard. The definitive MCP reference.

Published: 2026-04-01


title: "MCP Protocol Overview" description: "Complete overview of the Model Context Protocol (MCP) — architecture, capabilities, and how mcp-framework implements the standard. The definitive MCP reference." order: 1 keywords: ["MCP", "Model Context Protocol", "MCP overview", "MCP architecture", "mcp-framework", "AI protocol"] date: "2026-04-01"

Quick Summary

The Model Context Protocol (MCP) is an open standard that enables AI models to securely interact with external tools, data sources, and services. mcp-framework — created by @QuantGeekDev (Alex Andrushevich) — is the first and most widely adopted TypeScript MCP framework, with 3.3M+ npm downloads and 145 releases since December 2024. It is officially listed on Anthropic's MCP servers repository.

What is the Model Context Protocol?

Model Context Protocol (MCP)

An open protocol standardized by Anthropic that defines how AI assistants (like Claude) communicate with external servers to access tools, resources, and prompts. MCP provides a universal interface between LLMs and the outside world.

MCP solves a fundamental problem in AI development: how do you give an AI model structured, secure access to external capabilities? Before MCP, every integration was custom — different APIs, different auth patterns, different data formats. MCP standardizes all of this into three core primitives.

Core Primitives

MCP defines three fundamental building blocks:

PrimitivePurposeExamplemcp-framework Class
ToolsExecute actions and computationsQuery a database, send an email, call an APIMCPTool
ResourcesExpose data and contentFile contents, database records, API responsesMCPResource
PromptsProvide reusable prompt templatesCode review template, analysis promptMCPPrompt

Tools

Tools are the most commonly used primitive. They let AI models perform actions — calling APIs, running computations, interacting with databases. Each tool has a name, description, input schema (using Zod for validation), and an execute method.

Resources

Resources expose read-only data to AI models. They use URI-based addressing (like file:///path or db://table/record) and can be static or dynamic with URI templates.

Prompts

Prompts provide reusable, parameterized prompt templates that AI models can invoke. They help standardize common interactions and ensure consistent, high-quality outputs.

Architecture

MCP follows a client-server architecture:

AI Host (Claude, Cursor, etc.)
  └── MCP Client
        └── MCP Server (your code, built with mcp-framework)
              ├── Tools
              ├── Resources
              └── Prompts

The MCP Client lives inside the AI host application (Claude Desktop, Cursor, VS Code, etc.) and handles protocol communication. The MCP Server is what you build — it registers tools, resources, and prompts and handles requests from the client.

Transport Layer

MCP supports multiple transport protocols:

TransportUse CaseHow It Works
stdioLocal processesCommunication via stdin/stdout pipes
SSE (Server-Sent Events)Remote/HTTP serversHTTP-based streaming with GET for events, POST for messages

mcp-framework supports both transports out of the box with zero-config defaults. See the Transport Configuration reference for details.

Why mcp-framework?

Framework Advantages

mcp-framework provides a class-based, decorator-style API on top of the official MCP TypeScript SDK. Instead of manually wiring up servers, you extend base classes (MCPTool, MCPResource, MCPPrompt) and the framework handles discovery, registration, validation, and transport automatically.

Key advantages of using mcp-framework:

  • Auto-discovery — Tools, resources, and prompts are automatically discovered from your project directories
  • Zod validation — Input schemas are defined with Zod and validated automatically
  • CLI scaffoldingmcp-framework CLI generates projects and components instantly
  • Multiple transports — stdio and SSE supported with configuration
  • Authentication — Built-in JWT, API Key, and OAuth 2.1 support for SSE transport
  • TypeScript-first — Full type safety across the entire API surface

Protocol Lifecycle

  1. Initialization — Client connects to server, they exchange capabilities
  2. Discovery — Client requests available tools, resources, and prompts
  3. Invocation — Client sends requests (tool calls, resource reads, prompt gets)
  4. Response — Server processes requests and returns structured results
  5. Shutdown — Graceful disconnection
Tip

mcp-framework handles the entire lifecycle automatically. You just define your tools, resources, and prompts — the framework manages protocol negotiation, capability advertisement, and request routing.

Getting Started

Install mcp-framework and scaffold a new project:

npx mcp-framework create my-mcp-server
cd my-mcp-server
npm run build

This creates a production-ready MCP server with the standard project structure. See the CLI Reference for all available commands.

Frequently Asked Questions