Vercel & Astro
Use Cuppa as your content source and run a fast static Astro site. Publish an article or page in Cuppa and your site rebuilds with it. No CMS to maintain, no copy-pasting.
What You Can Do
- Deploy a new Astro site from Cuppa in one click (Deploy to Vercel)
- Publish articles and landing pages straight to that site
- Unpublish and the content comes off on the next build
- See what’s live with the Live badge in the send menu
- Drive it all from code with the API, MCP, or CLI
How It Works
Cuppa has two connections that work together:
| Connection | Level | What it does |
|---|---|---|
| Vercel | Team | Connects your Vercel account, links each brand to a Vercel project, triggers deploys |
| Astro | Brand | Issues a read-only site token your Astro site uses to pull published content |
At build time, your Astro site reads published articles and pages for its brand from Cuppa. Publishing in Cuppa triggers a new Vercel build.
Setup
Step 1: Connect Vercel
- In Vercel, create an access token (Account Settings → Tokens)
- In Cuppa, go to Team Settings → Integrations
- Click Connect on Vercel and paste the token
Step 2: Link your brand to a Vercel project
- Open the brand’s integrations (Site Settings → Integrations)
- On Vercel, pick the project for this brand
Step 3: Connect Astro
- On Astro, click Connect
- Copy the
CPA_SITE_token right away. It is shown once
Step 4: Deploy
- New site: click Deploy to Vercel. Cuppa starts from an Astro template that already reads your Cuppa content
- Existing Astro site: add the Cuppa content loader to your site’s content collections
Step 5: Check the build variables
In your Vercel project, confirm these environment variables are set:
| Variable | Value |
|---|---|
CUPPA_SITE_ID | Shown in the Astro dialog |
CUPPA_SITE_TOKEN | The CPA_SITE_ token you copied |
CUPPA_API_URL | https://app.cuppa.ai |
What Triggers a Rebuild
- Publishing or unpublishing an article in the app or through the API
- Publishing or unpublishing a page through the API, MCP, or CLI
Deploys are coalesced, so publishing several articles in a row starts one build, not one per article.
The send menu shows a Live badge once Cuppa records the publish.
Security
- The site token is read-only and only returns published content for its linked brand
- Exposed? Rotate it from the Astro integration dialog, then update
CUPPA_SITE_TOKENin Vercel
API, MCP & CLI
| Task | REST API | MCP | CLI |
|---|---|---|---|
| Connect, link, unlink, deploy, check deploy, disconnect Vercel | GET / POST /v1/integrations/vercel | connect_vercel, list_vercel_projects, link_vercel_project, unlink_vercel_project, get_vercel_deploy_status, disconnect_vercel | cuppa vercel connect, projects, link, unlink, deploy, status, disconnect |
| Connect, rotate, disconnect Astro | GET / POST /v1/integrations/astro | connect_astro, rotate_astro_token, disconnect_astro | cuppa vercel astro connect, rotate, disconnect |
| Publish or unpublish a page | POST /v1/pages/{id}/publish | publish_page | Not in the CLI yet |
See the REST API, MCP Server, and CLI docs for authentication.
Troubleshooting
Site builds but shows no content
- Check
CUPPA_SITE_ID,CUPPA_SITE_TOKEN, andCUPPA_API_URLin Vercel - Make sure the articles are published in Cuppa. Drafts are never returned
- The token only reads content for the brand it was issued to
Publishing doesn’t start a build
- Confirm the brand is linked to a Vercel project
- Check that the Vercel connection is still active in Team Settings → Integrations
Token lost or leaked
Rotate it in the Astro dialog and update CUPPA_SITE_TOKEN in Vercel. The old token stops working.
FAQ
Do I need a separate CMS? No. Cuppa is the content source.
Which plans include it? All plans.
Can I link more than one brand? Yes. Link each brand to its own Vercel project and connect Astro per brand.
Does unpublishing remove the page from my site? Yes, on the next build, which Cuppa triggers for you.