Introduction
Introduction to MCP Framework for building Model Context Protocol servers
Introduction to MCP Framework
This framework makes it easy to create and manage MCP (modelcontextprotocol) servers that can be used with MCP Clients like the Claude Desktop app.
It is simple and intuitive to use.
MCP-Framework gives you architecture out of the box, with automatic directory-based discovery for tools, resources, and prompts. Use our powerful MCP abstractions to define tools, resources, or prompts in an elegant way. Our cli makes getting started with your own MCP server a breeze
Quick Setup
You can build a MCP server with mcp-framework in under 5 minutes! Follow the quickstart guide to get started.
Key Features
- Tool Support: Create custom tools with annotations, structured output schemas, and rich content types (text, images, audio, resource links)
- MCP Apps: Add interactive HTML UIs (dashboards, forms, charts) to your tools — renders inline in Claude, ChatGPT, VS Code (React support included)
- Resource Management: Handle external data sources with title, icons, size, and annotation metadata
- Prompt Templates: Define reusable prompt templates with display metadata
- Multiple Transports: STDIO, HTTP Stream (recommended), and SSE with security features (origin validation, localhost binding)
- Authentication: Built-in OAuth 2.1 (recommended), JWT, and API Key authentication
- Protocol Utilities: Progress tracking, cancellation, structured logging, and elicitation (request user input)
- Sampling: Request LLM completions from tools, with tool-use support for agentic workflows
- Roots Support: Query client filesystem boundaries for safe file operations
- Tasks (Experimental): Async tool execution with polling and deferred result retrieval
- Full TypeScript: Type-safe schemas with Zod, full autocompletion
- CLI Tool: Easy project scaffolding and component creation
- MCP 2025-11-25 Compliant: Up-to-date with the latest Model Context Protocol specification
How It Works
MCP Framework provides four main components:
1. Tools
Functions that AI models can invoke to:
- Fetch data from APIs and transform data
- Perform computations and interact with external services
- Return rich content: text, images, audio, resource links
- Report progress, check for cancellation, and send log messages
- Request user input via elicitation and query filesystem roots
2. Resources
Data sources that can be:
- Read by the AI model with rich metadata (title, icons, size, annotations)
- Subscribed to for real-time updates
- Used to provide context with audience and priority hints
3. Prompts
Template systems that:
- Define reusable conversation flows with display metadata
- Provide structured context with validated arguments
- Guide model interactions with icons and descriptions
4. Transports
Communication layers that:
- Handle client-server communication securely
- Support different use cases:
- STDIO: Perfect for CLI tools and local integrations
- HTTP Stream (Recommended): Modern transport with streaming, sessions, auth, and stream resumability
- SSE (Deprecated): Legacy transport, replaced by HTTP Stream
- Origin validation for DNS rebinding protection
- Localhost-only binding by default for security
The framework handles all communication between your server and AI models, following the Model Context Protocol specification.
When to Use MCP Framework
- Building custom tools for AI models
- Creating data integration services
- Developing specialized AI assistants
- Extending AI capabilities with external services
- Building enterprise AI solutions
- Creating web-based AI tools (using HTTP Stream transport)
- Developing secure AI services with OAuth 2.1 authentication
Ready to get started? Head to the Installation guide to begin building your first MCP server, learn more about our transport options, or see how mcp-framework compares to the official SDK in our mcp-framework vs TypeScript SDK comparison.