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

# Schemas and SDKs

> AdCP JSON schemas and SDKs for JavaScript and Python. Download schemas from GitHub or fetch at runtime. Includes setup for AI coding agents using Cursor, Windsurf, and Claude.

Get started integrating with AdCP using our schemas and official SDKs.

## Schema Access

AdCP schemas are available from two sources:

| Source  | URL                                                                | Best For                          |
| ------- | ------------------------------------------------------------------ | --------------------------------- |
| Website | `https://adcontextprotocol.org/schemas/v2/`                        | Runtime fetching, version aliases |
| GitHub  | `https://github.com/adcontextprotocol/adcp/tree/main/dist/schemas` | Offline access, CI/CD pipelines   |

Both sources contain identical schemas. The GitHub repository includes all released versions with bundled schemas committed directly to the codebase.

### Common Schemas

| Schema          | URL                                                            |
| --------------- | -------------------------------------------------------------- |
| Product         | `https://adcontextprotocol.org/schemas/v2/core/product.json`   |
| Media Buy       | `https://adcontextprotocol.org/schemas/v2/core/media-buy.json` |
| Creative Format | `https://adcontextprotocol.org/schemas/v3/core/format.json`    |
| Schema Registry | `https://adcontextprotocol.org/schemas/v3/index.json`          |

### For AI Coding Agents

<Tip>
  Point your AI coding agent to **[https://docs.adcontextprotocol.org/mcp](https://docs.adcontextprotocol.org/mcp)** for MCP integration documentation.
</Tip>

## Client SDKs

AdCP provides official SDKs for JavaScript/TypeScript and Python. These work for both client and server implementations.

### JavaScript / TypeScript

[![npm version](https://img.shields.io/npm/v/@adcp/client)](https://www.npmjs.com/package/@adcp/client)

```bash theme={null}
npm install @adcp/client
```

```javascript theme={null}
import { ADCPClient } from '@adcp/client';

const client = new ADCPClient({
  agentUrl: 'https://sales.example.com'
});

const products = await client.getProducts({
  brief: 'Video campaign for pet owners'
});
```

**Resources:**

* [NPM Package](https://www.npmjs.com/package/@adcp/client)
* [GitHub Repository](https://github.com/adcontextprotocol/adcp-client)
* [Quickstart Guide](/dist/docs/3.0.0-rc.2/quickstart)

**Package exports:**

* `@adcp/client` — Main API
* `@adcp/client/testing` — Testing utilities (includes `testAgent`)
* `@adcp/client/advanced` — Advanced API features
* `@adcp/client/types` — TypeScript type definitions

### Python

[![PyPI version](https://img.shields.io/pypi/v/adcp)](https://pypi.org/project/adcp/)

```bash theme={null}
pip install adcp
```

```python theme={null}
from adcp import ADCPClient

client = ADCPClient(agent_url='https://sales.example.com')

products = client.get_products(
    brief='Video campaign for pet owners'
)
```

**Resources:**

* [PyPI Package](https://pypi.org/project/adcp/)
* [GitHub Repository](https://github.com/adcontextprotocol/adcp-python)
* [Quickstart Guide](/dist/docs/3.0.0-rc.2/quickstart)

## CLI Tools

Both SDKs include command-line tools for testing and development.

### JavaScript CLI

```bash theme={null}
npx @adcp/client --help
npx @adcp/client get-products --agent https://sales.example.com --brief "CTV campaign"
```

### Python CLI

```bash theme={null}
uvx adcp --help
uvx adcp get-products --agent https://sales.example.com --brief "CTV campaign"
```

## Schema Versioning

AdCP uses semantic versioning. Choose the right path for your use case:

| Path          | Example           | Best For                                |
| ------------- | ----------------- | --------------------------------------- |
| Exact version | `/schemas/2.5.3/` | Production, SDK generation              |
| Major version | `/schemas/v2/`    | Development, documentation              |
| Minor version | `/schemas/v2.5/`  | Stable development (patch updates only) |

### Production (Recommended)

Pin to an exact version for stability:

```javascript theme={null}
const SCHEMA_VERSION = '2.5.3';
const schema = await fetch(
  `https://adcontextprotocol.org/schemas/${SCHEMA_VERSION}/core/product.json`
);
```

### Development

Use the major version alias to stay current with backward-compatible updates:

```javascript theme={null}
const schema = await fetch(
  'https://adcontextprotocol.org/schemas/v2/core/product.json'
);
```

### SDK Type Generation

```bash theme={null}
# TypeScript
npx json-schema-to-typescript \
  https://adcontextprotocol.org/schemas/2.5.3/core/product.json \
  --output types/product.d.ts

# Python
datamodel-codegen \
  --url https://adcontextprotocol.org/schemas/2.5.3/core/product.json \
  --output models/product.py
```

## Bundled Schemas

For tools that don't support `$ref` resolution, use bundled schemas with all references resolved inline. Bundled schemas are available from both the website and GitHub:

### Website Access

```
https://adcontextprotocol.org/schemas/2.5.3/bundled/media-buy/create-media-buy-request.json
```

### GitHub Access

Bundled schemas are committed to the repository at `dist/schemas/{VERSION}/bundled/`:

```bash theme={null}
# Clone and access locally
git clone https://github.com/adcontextprotocol/adcp.git
ls adcp/dist/schemas/2.5.3/bundled/media-buy/

# Or fetch directly via GitHub raw
curl https://raw.githubusercontent.com/adcontextprotocol/adcp/main/dist/schemas/2.5.3/bundled/media-buy/get-products-request.json
```

### Directory Structure

```
dist/schemas/{VERSION}/
├── bundled/                      # Fully dereferenced schemas
│   ├── media-buy/                # Media buying tasks
│   ├── creative/                 # Creative tasks
│   ├── signals/                  # Signal protocol tasks
│   ├── property/                 # Property/governance tasks
│   ├── content-standards/        # Content standards tasks
│   ├── sponsored-intelligence/   # Sponsored intelligence tasks
│   ├── protocol/                 # Protocol tasks
│   └── core/                     # Core task schemas
├── core/                         # Modular schemas with $ref
├── media-buy/
└── index.json                    # Schema registry
```

### Bundled Schema Categories

All request/response task schemas are bundled:

| Category                          | Tasks                                                                                                                                                                                                     |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `bundled/media-buy/`              | get-products, create-media-buy, update-media-buy, list-creative-formats, sync-creatives, build-creative, list-creatives, get-media-buy-delivery, list-authorized-properties, provide-performance-feedback |
| `bundled/creative/`               | list-creative-formats, preview-creative                                                                                                                                                                   |
| `bundled/signals/`                | get-signals, activate-signal                                                                                                                                                                              |
| `bundled/property/`               | create-property-list, get-property-list, list-property-lists, update-property-list, delete-property-list, validate-property-delivery                                                                      |
| `bundled/content-standards/`      | create-content-standards, get-content-standards, list-content-standards, update-content-standards, calibrate-content, validate-content-delivery, get-media-buy-artifacts                                  |
| `bundled/sponsored-intelligence/` | si-get-offering, si-initiate-session, si-send-message, si-terminate-session                                                                                                                               |
| `bundled/protocol/`               | get-adcp-capabilities                                                                                                                                                                                     |
| `bundled/core/`                   | tasks-get, tasks-list                                                                                                                                                                                     |

See the [schema registry](https://adcontextprotocol.org/schemas/v2/index.json) for all available schemas.

## Version Discovery

```bash theme={null}
# Get current version
curl https://adcontextprotocol.org/schemas/v2/index.json | jq '.adcp_version'
```

Check [Release Notes](/dist/docs/3.0.0-rc.2/reference/release-notes) for version history and migration guides.

## Registry API

The AgenticAdvertising.org registry provides a public REST API for brand resolution, property resolution, agent discovery, and authorization validation. No authentication required.

<Card title="Registry API Reference" icon="server" href="/dist/docs/3.0.0-rc.2/registry/index">
  Resolve brands, discover agents, and validate authorization via REST.
</Card>
