v0.3.2
Latest Version

The TypeScript framework for building & shipping MCP servers

Trusted by builders at

Features

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

File System Routing

Automatically register tools, prompts, and resources with zero configuration.

Integrations

Integrations

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

Middlewares

Middlewares

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

Extensible Configuration

Extensible Configuration

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

Multiple Transport Support

Multiple Transport Support

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

Plug & play to your apps

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

$npx create-xmcp-app@latest
? What is your project named? my-server
? Select a package manager: npm
? Select the transport you want to use: HTTP (runs on a server)
? Select components to initialize:
  ◉ Tools
  ◉ Prompts
  ◉ Resources

✓ Installing dependencies...
✓ Setting up project structure...

Success! Created my-server

Inside that directory, you can run:
  npm run dev    Start development server
  npm run build  Build for production

Configure your environment

xmcp.config.ts
import { defineConfig } from "xmcp";

export default defineConfig({
  name: "my-server",
  version: "1.0.0",
  transport: "http",
  server: {
    port: 3000,
  },
  // Configure your tools, resources, and prompts
});

Add tools, resources, and prompts

src/tools/weather.ts
import { tool } from "xmcp";
import { z } from "zod";

export const getWeather = tool({
  name: "get-weather",
  description: "Get current weather for a location",
  parameters: z.object({
    location: z.string().describe("City name"),
  }),
  execute: async ({ location }) => {
    // Your implementation here
    return `Weather in ${location}: 72°F, Sunny`;
  },
});

Deploy your server

$vc deploy
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!
Blog

Guides & changelogs

Learn, build, and stay up to date with the latest guides, changelogs, and insights to make the most of your MCP server.

One framework to rule them all