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

# API & MCP

> Two ways to use DataFramer outside the UI: the Python SDK and MCP (Model Context Protocol).

## Getting access

1. Register at [app.dataframer.ai](https://app.dataframer.ai)
2. Request access to Dataframer at [info@dataframer.ai](mailto:info@dataframer.ai)
3. Get your API key from the dashboard (Settings → API Keys)
4. Set the environment variable:

```bash theme={null}
export DATAFRAMER_API_KEY="your-api-key"
```

## Python SDK

Install the SDK:

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

Quick taste:

```python theme={null}
from dataframer import Dataframer

client = Dataframer()  # uses DATAFRAMER_API_KEY env var

spec = client.dataframer.specs.create(
    name="Customer Support Tickets",
    generation_objectives="Generate realistic customer support tickets...",
)
# ... poll for completion, start a run, download results
```

See the [Basic Use of Python SDK](/tutorials/basic-python-workflow) tutorial for a complete, runnable example.

## MCP

MCP lets AI assistants (Claude Code, Cursor, etc.) interact with DataFramer directly.

### Claude Code

```bash theme={null}
claude mcp add --transport http \
  --header "Authorization: Bearer $DATAFRAMER_API_KEY" \
  --scope user dataframer https://df-api.dataframer.ai/mcp
```

Unlike the raw API, MCP also provides your AI assistant with detailed instructions on how to use DataFramer effectively — so it can guide you through the entire workflow conversationally.

## Next steps

<CardGroup cols={3}>
  <Card title="Core Concepts" icon="book" href="/concepts">
    Understand how DataFramer works
  </Card>

  <Card title="Basic Use of Python SDK" icon="play" href="/tutorials/basic-python-workflow">
    Complete runnable example
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference">
    Full endpoint documentation
  </Card>
</CardGroup>
