---
title: "v0"
description: "Add Unitpost to v0 as a custom MCP server so it can set up email while it builds your app."
url: https://www.unitpost.com/docs/ai/v0
section: MCP
updated: 2026-11-02
---
# v0

## Connection settings

- **Server URL**: https://mcp.unitpost.com/mcp
- **Transport**: Streamable HTTP
- **Auth (recommended)**: OAuth 2.1 — add the URL, approve in the browser (scopes match API capabilities; tokens refresh automatically)
- **Auth (legacy)**: Authorization: Bearer pk_live_YOUR_KEY (workspace API key from Settings → API keys; for clients that can only paste a key)
- **Tools**: one per API operation (email_send, email_campaigns_send, …) (the default set)
- **Toolsets (optional)**: https://mcp.unitpost.com/mcp?toolsets=default,campaigns (or the X-MCP-Toolsets header; add ?readonly=1 for read-only tools)

## v0

> Add Unitpost to v0 as a custom MCP server so it can set up email while it builds your app.

v0 uses the server while it builds: it can check your sending domain, draft templates and send a test. The app it generates sends through the Unitpost SDK with an API key, because v0's MCP tools aren't available to generated code.

### 1. Add the server

In a v0 chat, open the + menu in the prompt form → MCPs → add a custom server with the URL below, and choose OAuth for authentication. No key to copy. Your client opens Unitpost in the browser — pick a workspace, approve the scopes, and you're connected. Tokens refresh automatically.

```text
https://mcp.unitpost.com/mcp
```

### 2. Verify

Ask v0 to list your Unitpost sending domains. It should call `email_domains_list`; v0 asks before running a tool unless your chat's permission mode allows it.

### 3. Send from the app v0 builds

Create an API key in Unitpost (Settings → API keys, scoped to `emails:send`), add it to the v0 project as the environment variable `UNITPOST_API_KEY`, and ask v0 to send email with the `unitpost` npm package.

```ts
import { Unitpost } from "unitpost";

const unitpost = new Unitpost(); // reads process.env.UNITPOST_API_KEY

await unitpost.email.send({
  from: "hello@yourdomain.com",
  to: "you@example.com",
  subject: "Hello from v0",
  html: "<p>It works.</p>",
});
```

> The from address needs a verified domain. Keep the key in environment variables, never in the code v0 writes.

## Related

- [Connect any MCP client to Unitpost](https://www.unitpost.com/docs/ai/custom): Connect any streamable HTTP MCP client or your own agent to Unitpost: OAuth discovered from the 401, or a Bearer API key, plus optional toolsets.
- [Use the Unitpost MCP server with an API key](https://www.unitpost.com/docs/ai/headless): No browser? Use the Unitpost MCP server with an API key from CI, SSH, containers or clients that can only paste a header. Configs for each client.
- [Send email from a Vercel AI SDK agent](https://www.unitpost.com/docs/ai/vercel-ai-sdk): Send email from a Vercel AI SDK agent: connect createMCPClient to Unitpost or add one typed send tool, with an allowlist, approvals and idempotency keys.
