Michael Tromba
Michael Tromba

XMCP vs MCP-Framework vs Official SDK: Which TypeScript MCP Package Should You Use?

I had an idea for an MCP server to improve my Cursor agent's performance and needed to figure out how to build it. After having ChatGPT do some deep research, I landed on three main options: XMCP, MCP-Framework, or the official MCP SDK. Here's what I learned.

TL;DR

  • Choose the Official SDK if you want maximum flexibility, prefer a library over a framework, or need to build a client (not just a server).
  • Choose MCP-Framework if you need built-in authentication or prefer a more structured, enterprise-ready approach.
  • Choose XMCP if you want the fastest setup and best developer experience, especially for web apps or serverless deployments.

All three are free, MIT-licensed, and actively maintained. The difference is how much structure and convenience you want.

I went with the official @modelcontextprotocol/sdk—it has the most stars and downloads. More importantly, it's a library, not a framework. It doesn't prescribe a project structure, so I can organize my code however I want and just use the pieces I need.


What is MCP?

The Model Context Protocol (MCP) is an open standard for connecting AI assistants (like Claude) to external tools and data. When you build an MCP server, you're creating a bridge that lets AI safely call your APIs, query your databases, or interact with your systems.

All three packages we're comparing implement this same protocol—they just offer different levels of abstraction.


The Three Options

Official MCP SDK (@modelcontextprotocol/sdk)

The reference implementation. A library, not a framework—you get primitives and full control, but you write more code yourself.

MCP-Framework

A batteries-included framework with built-in authentication (OAuth2, JWT, API keys) and strict schema validation. More opinionated, but ensures your tools are well-documented.

XMCP

A developer-experience-focused framework by Basement Studio. File-based routing, hot reload, and one-command project setup. Think of it like Next.js for MCP servers.


How They Compare

Ease of Setup

Package Getting Started
Official SDK Use the template or wire it up yourself. You manually register tools and handle project structure.
MCP-Framework Install globally, run mcp create my-server. Use mcp add tool to scaffold new tools. Requires Zod for schemas.
XMCP One command (npx create-xmcp-app) scaffolds a project with file-based routing. Drop a file in /tools, it's automatically registered. Hot reload included.

Winner: XMCP for pure speed. MCP-Framework is close. The SDK requires more manual work.

Key Features

Feature Official SDK MCP-Framework XMCP
Auto-discovers tools
Hot reload
Built-in auth (OAuth, JWT) ✅ Native Via plugin
Schema validation Manual Strict (Zod) Basic
Next.js/Express adapters
Serverless-ready (Vercel) Possible Possible
Can build MCP clients

Community & Support

The official SDK has the largest community (11k+ stars) because it's the foundation everything else is built on. It also has multi-language support (Python, Java, C#, Go, etc.).

MCP-Framework has a smaller but focused community. The maintainer is active in MCP discussions, and the docs are solid.

XMCP has an active Discord, frequent releases, and good documentation at xmcp.dev. It's popular with startups and indie developers.

All three are actively maintained with recent releases.

Escape Hatches

  • XMCP/MCP-Framework: Both use the official SDK internally, so you can drop down to SDK-level code if you hit a wall.
  • Official SDK: You're already at the lowest level—full control, but you solve problems yourself.

Decision Guide

Choose the Official SDK if:

  • You need maximum flexibility or have custom requirements
  • You prefer a library over a framework—no prescribed structure
  • You're building an MCP client (not just a server)
  • You prefer minimal dependencies and want to understand MCP deeply
  • You're integrating MCP into an existing complex codebase

Choose MCP-Framework if:

  • You need built-in OAuth2/JWT authentication
  • You're building something for enterprise or production where security is critical
  • You prefer strict validation and enforced documentation for your tools
  • You want a standalone microservice rather than embedding into another app
  • You're building many tools and want consistent structure

Choose XMCP if:

  • You're a web developer who likes convention-over-configuration (Next.js, Nuxt style)
  • You want the fastest path to a working server
  • You're deploying to Vercel or similar serverless platforms
  • You're building a prototype or MVP
  • You want to embed MCP into an existing Express/Next.js app

Bottom Line

You can't go wrong with any of these—they're all solid, free, and actively maintained. The "best" choice depends on your priorities:

  • Flexibility & Control → Official SDK
  • Security & Structure → MCP-Framework
  • Speed & DX → XMCP

I went with the official SDK because I wanted a library, not a framework. It's the most popular option by far and it lets me structure my project however I want. If you prefer more hand-holding and faster scaffolding, MCP-Framework or XMCP will get you there quicker.


Last updated: December 2025. All packages are actively maintained—check their GitHub repos for the latest releases.