v0

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.

    TypeScript
    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.

No browser on this machine? For headless setups, CI, SSH, or clients that can only paste a key, use the API-key setup instead.

Search docs and guides

Search the docs and product guides.