# Vercel (/docs/deployment/vercel)

First, bootstrap a new project with `npx create-xmcp-app@latest`.

The build step requires the `@xmcp-dev/compiler` development dependency. Keep
Vercel's default behavior of installing development dependencies during the
build; the generated `dist` server is self-contained at runtime.

Then, [connect your Git repository](https://vercel.com/new) or [use Vercel CLI](https://vercel.com/docs/cli):

```bash
vc deploy
```

No configuration is needed: when Vercel builds your project, `xmcp build` detects the environment and emits the Vercel output automatically. Your server runs as a [Vercel Function](https://vercel.com/docs/functions) with [Fluid compute](https://vercel.com/docs/fluid-compute) by default, available at `https://<your-project>.vercel.app` on your configured endpoint, `/mcp` by default.

The deployment serves your tools over the HTTP transport, so your project needs it enabled in `xmcp.config.ts`. The build emits a request handler for the platform to invoke rather than a server that listens on a port of its own, so a Vercel build produces `dist/vercel.js` where a standalone build produces `dist/http.js`. You can also produce the same output outside of Vercel's build environment with `xmcp build --vercel`.

## Get started with Vercel CLI

You can initialize a new xmcp app with Vercel CLI with the following command:

```bash
vc init xmcp
```

This will clone the [xmcp example repository](https://github.com/vercel/vercel/tree/main/examples/xmcp) in a directory called `xmcp`.

You can also run your project locally with [`vc dev`](https://vercel.com/docs/cli/dev), in addition to the project's own `dev` script.

Learn more about deploying xmcp to Vercel in the [Vercel documentation](https://vercel.com/docs/frameworks/backend/xmcp).
