- OAuth 2.1 (recommended for interactive MCP clients like Claude and ChatGPT)
- API keys (recommended for your own agents and scripts)
OAuth 2.1
MCP-aware clients walk the flow automatically the first time they connect tohttps://app.adstellar.ai/api/mcp:
- The server answers
401with aWWW-Authenticateheader pointing at the discovery metadata (/.well-known/oauth-protected-resource). - The client registers itself via Dynamic Client Registration (RFC 7591) at
/api/oauth/register. - You’re redirected to the AdStellar consent screen: pick the team and the scopes to grant.
- The client exchanges the resulting code for an access + refresh token pair (PKCE, S256-only) at
/api/oauth/token.
API keys
For unattended agents, create a team-scoped key (ast_live_...) in Settings → Developers or via the management API (owner/admin):
Scopes
Tools you don’t have the scope for are hidden from
tools/list and rejected with a clear error.
Use the credential
Rate limits
120 requests per minute per credential, per endpoint.429 responses include a Retry-After header.
Security notes
- Keys and tokens are never logged; only hashes are stored.
- Generation tools deduct credits from your team’s balance exactly as if you’d run them in the app.
create_launch_draftnever publishes ads — launching real campaigns (spend) stays a human action in the dashboard.- Revoke API keys anytime (
DELETE /api/settings/api-keys/<id>?teamId=...); OAuth grants expire with their refresh tokens.