---
title: "Programmatic SEO API for AI agents | Cuppa AI"
url: https://cuppa.ai/use-cases/programmatic-seo-api-for-ai-agents
description: "Generate local service pages or programmatic pages from a CSV and a template, with SERP research per page."
updated: 2026-11-18
mcp_server: @cuppa-ai/mcp-server@0.2.0
cli: @cuppa-ai/cli@0.1.8
---
# Programmatic SEO API for AI agents | Cuppa AI

Generate local service pages or programmatic pages from a CSV and a template, with SERP research per page.

Prompt: "Use Cuppa to create "roof repair in <city>" pages for these 20 cities."

## How to do it

- MCP tools: `create_page`, `get_page_status`, `create_serp_cluster_bulk`, `generate_from_serp_clusters`
- CLI: `cuppa seo local --service "roof repair" --locations cities.txt --research-serps`
- REST: POST /v1/pages, POST /v1/research/serp-cluster-bulk

1. **Prepare.** List the locations or rows.
2. **Generate.** Run cuppa seo local or call create_page per row.

Output: Unique pages per location or row, ready to publish.

## Keys and cost

- Provider keys: A text model.
- Cost: Plan fee plus your own tokens per page; bulk speed is 1x, 3x or 5x by plan.
- API, CLI and MCP access is included on every plan, including Solo. Plans from $99/month billed annually.

## FAQ

**Are pages unique?**

Each page can be researched against its own SERP before writing.

## Connect an agent



Claude Code:

```bash
claude mcp add cuppa -e CUPPA_API_KEY=cpa-your-key -- npx -y @cuppa-ai/mcp-server
```

Codex:

```bash
codex mcp add cuppa --env CUPPA_API_KEY=cpa-your-key -- npx -y @cuppa-ai/mcp-server
```

Cursor, Claude Desktop, Windsurf (mcp.json):

```json
{
  "mcpServers": {
    "cuppa": {
      "command": "npx",
      "args": [
        "-y",
        "@cuppa-ai/mcp-server"
      ],
      "env": {
        "CUPPA_API_KEY": "cpa-your-key"
      }
    }
  }
}
```

CLI:

```bash
npm i -g @cuppa-ai/cli
cuppa auth login --key cpa-your-key
cuppa auth status
```

REST:

```bash
curl -s https://api.cuppa.ai/v1/sites \
  -H "X-API-KEY: cpa-your-key"
```

Verify: `cuppa auth status` prints your team and key status. In MCP, ask the agent to call `list_sites`; it should return your brands.

---

Index of every Markdown page: https://cuppa.ai/llms.txt · Setup: https://cuppa.ai/developers.md · Pricing: https://cuppa.ai/pricing.md
