The TypeScript framework for building & shipping MCP servers
Trusted by builders at
The complete stack to ship an MCP server
Everything you need to set up fast, customize with ease, and plug directly into your apps.

File System Routing
Automatically register tools, prompts, and resources with zero configuration.

Integrations
Secure access with Better Auth's integration and monetize with Polar.

Middlewares
Add authentication, logging, or custom logic to intercept and process requests and responses.

Extensible Configuration
Customize every aspect of your MCP server with flexible configuration options.

Multiple Transport Support
Build and deploy servers with HTTP or STDIO transport protocols out of the box.

Plug & play to your apps
Initialize xmcp directly in your existing Next.js or Express projects with one command.
From zero to prod in seconds
Create a new xmcp app
? What is your project named? my-server ? Select a package manager: pnpm ? Select the transport you want to use: HTTP (runs on a server) ? Select components to initialize: ◉ Tools ◉ Prompts ◉ Resources ✔ Creating a new xmcp app in ... ✔ Your xmcp app is ready Next steps: cd my-server pnpm dev
Configure your environment
import { XmcpConfig } from "xmcp";
const config: XmcpConfig = {
http: {
port: 3000,
host: "0.0.0.0",
endpoint: "/mcp",
cors: {
origin: "*",
credentials: true,
},
},
};
export default config;Add tools, resources, and prompts
import { z } from "zod";
import { type InferSchema } from "xmcp";
export const schema = {
location: z.string().describe("City name"),
};
export const metadata = {
name: "get-weather",
description: "Get current weather for a location",
};
export default async function getWeather({
location
}: InferSchema<typeof schema>) {
// Your implementation here
return `Weather in ${location}: 72°F, Sunny`;
}Deploy your server
Vercel CLI 37.0.0 Inspect: https://vercel.com/... Production: https://my-server.vercel.app Deployment Summary: • Environment: Production • Region: iad1 • Build Time: 12s • Status: Ready Your MCP server is live!
From zero to prod in seconds
? What is your project named? my-server ? Select a package manager: pnpm ? Select the transport you want to use: HTTP (runs on a server) ? Select components to initialize: ◉ Tools ◉ Prompts ◉ Resources ✔ Creating a new xmcp app in ... ✔ Your xmcp app is ready Next steps: cd my-server pnpm dev
Guides & changelogs
Learn, build, and stay up to date with the latest guides, changelogs, and insights to make the most of your MCP server.

OpenAI Apps SDK Support
xmcp now supports building compatible UI resources and tools with the OpenAI Apps SDK, out of the box.

Integrating Polar with xmcp
Learn how to add paywalls and track tool usage with Polar.

xmcp v0.3.0
xmcp v0.3.0 covers all MCP server features - tools, prompts, and resources. Available now.