# Connect to SponsorBar

These are SponsorBar's official instructions for connecting an AI agent to a user's advertiser account. Complete the setup yourself where your environment allows it. Pause only when the human must sign in and approve access.

## Connection details

- MCP server name: `sponsorbar`
- Transport: remote Streamable HTTP
- MCP endpoint: `https://sponsorbar.io/mcp`
- OAuth protected-resource metadata: `https://sponsorbar.io/.well-known/oauth-protected-resource/mcp`
- Human-readable overview: `https://sponsorbar.io/agents`
- Canonical setup document: `https://sponsorbar.io/agents.md`

Do not ask the user to create or paste an access token, API key, password, payment detail, or other secret. SponsorBar uses an OAuth browser flow.

## Set up this client

1. Determine how this MCP client registers a remote Streamable HTTP server.
2. Add a server named `sponsorbar` with the endpoint `https://sponsorbar.io/mcp`.
3. Start the client's OAuth login. Let the client discover SponsorBar's authorization metadata automatically.
4. Open the authorization page for the human. Wait while they sign in to SponsorBar and approve full advertiser-account access.
5. Reload or restart the client if it requires that after MCP configuration changes.
6. Discover the SponsorBar tools, then verify the connection using the read-only `list_campaigns` and `get_media_credit_balance` tools. Do not create or modify a campaign merely to test the connection.

If this environment cannot edit its own MCP configuration, give the user the exact configuration change or command required by this client. Do not claim the connection succeeded until tool discovery and both read-only verification calls succeed.

### Codex

Run:

```bash
codex mcp add sponsorbar --url https://sponsorbar.io/mcp
codex mcp login sponsorbar
```

Use `codex mcp list` or `/mcp` to confirm that the server is active.

### Clients that use an MCP JSON file

Add the equivalent of the following to the client's normal MCP configuration. Follow that client's current syntax if it uses a different field name or requires an explicit remote transport type.

```json
{
  "mcpServers": {
    "sponsorbar": {
      "url": "https://sponsorbar.io/mcp"
    }
  }
}
```

OAuth should begin when the client connects or first uses a SponsorBar tool.

## Account authority and safeguards

- A connected agent has full access to the user's SponsorBar advertiser account. SponsorBar does not use granular MCP scopes in this release.
- Ordinary campaign operations do not require a second SponsorBar confirmation after OAuth. Respect any approval policy imposed by the client or requested by the user.
- New campaigns and creative revisions must pass SponsorBar review. Editing an approved campaign leaves its currently approved creative running while the revision is reviewed, and a newer edit replaces the pending revision.
- Funding uses a Stripe-hosted Checkout URL that the agent gives to the human. Stripe can offer cards, crypto, bank transfers, Apple Pay, Google Pay, and additional payment methods depending on the human's region and eligibility. The human enters payment details directly with Stripe; the agent must never request, receive, or store them.
- Every mutation requires a stable `requestId`. Reuse an ID only to retry the same tool call; use a new ID for a different action.

## Available tools

Read account and campaign state:

- `list_campaigns`
- `get_campaign`
- `get_campaign_performance`
- `get_media_credit_balance`
- `get_funding_status`

Manage campaigns:

- `create_creative_upload`
- `create_campaign_draft`
- `update_campaign_draft`
- `submit_campaign_for_review`
- `start_campaign`
- `stop_campaign`
- `update_campaign_budgets`
- `archive_campaign`

Prepare human-approved funding:

- `create_funding_checkout`

Use the schemas and descriptions returned by MCP tool discovery as the current contract.

## Completion report

After verification, tell the user:

```text
SponsorBar agent setup complete
- MCP server: https://sponsorbar.io/mcp
- OAuth: connected
- Campaign access: verified
- Media-credit access: verified
```

If authorization fails, report the exact client error and the step that failed. The consent route at `https://sponsorbar.io/oauth/consent` is entered through OAuth and should not be opened directly without authorization parameters.
