> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appstatic.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Give any agent the ability to generate ads and ship them to Meta.

appstatic exposes a remote MCP server over Streamable HTTP:

```
https://www.appstatic.io/mcp
```

Authenticate with your API key as a bearer token.

## Claude Desktop, Cursor, and others

```json theme={null}
{
  "mcpServers": {
    "appstatic": {
      "url": "https://www.appstatic.io/mcp",
      "headers": { "Authorization": "Bearer as_live_…" }
    }
  }
}
```

For clients that only speak stdio:

```json theme={null}
{
  "mcpServers": {
    "appstatic": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://www.appstatic.io/mcp", "--header", "Authorization: Bearer as_live_…"]
    }
  }
}
```

## Tools

| Tool             | What it does                                                   |
| ---------------- | -------------------------------------------------------------- |
| `get_account`    | Plan, brand, Meta connection, next batch date                  |
| `get_brand`      | The brand profile and the truthful-claims whitelist            |
| `list_batches`   | All batches, newest first                                      |
| `get_batch`      | A batch with its audited ads and copy variants                 |
| `generate_batch` | Generate up to 30 audited ads now (`count`, optional `market`) |
| `upload_to_meta` | Create a batch in your Meta ad account as paused drafts        |

## Example

> "Generate 10 ads for my app and upload them to Meta."

The agent calls `generate_batch` with `count: 10`, waits for the audited result, then calls `upload_to_meta` with the returned batch id. You review the paused campaign in Ads Manager and switch it on.
