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

# Sella quickstart: connect your agent and make a paid call

> Connect your agent to Sella over MCP, authenticate with an email OTP, get a non-custodial wallet, and make your first paid MCP call in five minutes.

By the end of this page your agent will be connected to Sella, authenticated, and ready to discover, preview, and buy from the catalogue — all over MCP. You'll only need to run through this setup once; after that your agent operates autonomously.

<Note>
  Every example uses the base URL `https://sellag.vercel.app`. If you're on a custom domain, substitute it everywhere — it's the only value that changes.
</Note>

## Before you start

You need an MCP-capable agent to follow along. Claude Desktop, Cursor, Cline, a Gemini or OpenAI agent with an MCP bridge, and anything built on the [MCP SDK](https://modelcontextprotocol.io) all work. If it speaks MCP over HTTP, it works with Sella.

## Step 1: Add the MCP server

Point your client at the Sella MCP endpoint. Pick the transport your client supports:

<Tabs>
  <Tab title="HTTP (works everywhere)">
    The direct HTTP transport works with any MCP client today. You can connect **without a key** to run the auth tools, then add your key once you have one.

    ```json claude_desktop_config.json theme={null}
    {
      "mcpServers": {
        "sella": {
          "type": "http",
          "url": "https://sellag.vercel.app/api/mcp",
          "headers": {
            "Authorization": "Bearer sk_live_your_key_here"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="npx client (Preview)">
    <Info>
      The `@sella/mcp-client` package is rolling out. Until it's published, use the HTTP transport above.
    </Info>

    A thin wrapper that handles auth and wallet loading for you:

    ```json claude_desktop_config.json theme={null}
    {
      "mcpServers": {
        "sella": {
          "command": "npx",
          "args": ["-y", "@sella/mcp-client"],
          "env": {
            "SELLA_API_KEY": "sk_live_your_key_here",
            "SELLA_WALLET_CONFIG": "/Users/you/.sella-wallet.json"
          }
        }
      }
    }
    ```
  </Tab>
</Tabs>

See [Connect your agent](/consumers/connect) for step-by-step instructions for Claude Desktop, Cursor, and custom HTTP clients.

## Step 2: Authenticate and get a wallet

Sella authenticates agents with a one-time email code, then returns an API key and a set of non-custodial wallets. Your agent handles this itself using two built-in tools — no dashboard required.

<Steps>
  <Step title="Start auth">
    Call `sella_auth_start` with the operator's email. Sella sends a 6-digit code that expires in 10 minutes.

    ```json theme={null}
    { "name": "sella_auth_start", "arguments": { "email": "you@example.com" } }
    ```
  </Step>

  <Step title="Complete auth">
    Read the code from your inbox and pass it to `sella_auth_complete`:

    ```json theme={null}
    { "name": "sella_auth_complete", "arguments": { "email": "you@example.com", "otp_code": "123456" } }
    ```

    The response contains your `apiKey` (`sk_live_…`), your `agentId`, and — on first login — a `walletConfig` object with private keys.
  </Step>

  <Step title="Save the wallet">
    <Warning>
      Private keys are shown **exactly once**. Save `walletConfig` to `~/.sella-wallet.json` immediately, then add `apiKey` to your MCP config before doing anything else.
    </Warning>
  </Step>
</Steps>

Prefer to click a button? Sign in at [sellag.vercel.app](https://sellag.vercel.app), complete onboarding, and copy a key from **Dashboard → Keys**. Full detail: [Authentication & wallets](/consumers/authentication).

## Step 3: Discover something to buy

With the server connected and your key in place, list the catalogue:

<CodeGroup>
  ```json MCP tool call theme={null}
  { "name": "list_datasets", "arguments": { "query": "financial sentiment", "limit": 5 } }
  ```

  ```bash REST (read-only) theme={null}
  curl "https://sellag.vercel.app/api/datasets?search=financial&limit=5"
  ```
</CodeGroup>

Each result includes a dataset ID, title, pricing tier, and quality signals. Note the `dataset_id` of anything that looks useful — you'll need it in the next two steps.

## Step 4: Try before you buy

Inspect any dataset in a closed trial — schema coverage, sample rows, and quality signals — at no cost, before committing to a purchase:

```json theme={null}
{ "name": "try_dataset", "arguments": { "dataset_id": "<id>", "required_fields": ["text", "label"] } }
```

The response tells you whether the dataset covers your required fields and shows you representative sample rows so you know exactly what you're buying.

## Step 5: Make your first paid call

Ask for the full dataset. Paid tiers respond with a `402` challenge containing payment requirements; your agent signs it and retries. The [x402](/reference/x402) protocol handles this automatically once your wallet is loaded.

```json theme={null}
{ "name": "get_dataset", "arguments": { "dataset_id": "<id>" } }
```

A free dataset returns content immediately. A paid one returns a `402` challenge first, then the full content once payment settles — in seconds, in USDC.

## Fund your wallet

Paid calls need a balance. Fund from the dashboard or send USDC directly to your agent's wallet address returned in `walletConfig`. If a call fails with `WALLET_UNFUNDED`, top up and retry.

## Next steps

<CardGroup cols={2}>
  <Card title="Connect your agent" icon="link" href="/consumers/connect">
    Claude Desktop, Cursor, and custom clients — step by step.
  </Card>

  <Card title="Authentication & wallets" icon="key" href="/consumers/authentication">
    How auth, keys, and multi-chain wallets work in detail.
  </Card>

  <Card title="Discover" icon="search" href="/consumers/discover">
    Master `list_datasets`, `search_datasets`, and the API market.
  </Card>

  <Card title="Purchase & payments" icon="coins" href="/consumers/purchase">
    The full x402 flow, end to end.
  </Card>
</CardGroup>
