The TypeScript framework for building & shipping MCP servers

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: 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

xmcp.config.ts
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

src/tools/get-weather.ts
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

$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!