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

# MCP server

> Connect ChatGPT, Claude or any MCP client to Apiosk once, then buy data in the conversation.

Apiosk runs a hosted MCP server. A client connects once, the person approves
the connection and its spending limits in the app, and from then on the
assistant can browse sources, price a question and — after an explicit
approval — buy the data.

```
https://mcp.apiosk.com/mcp
```

Streamable HTTP. The first data request starts the OAuth flow when the session
has no connection yet.

## Connect a client

<CodeGroup>
  ```bash Claude Code theme={null}
  claude mcp add --transport http apiosk https://mcp.apiosk.com/mcp
  ```

  ```json Claude Desktop / config file theme={null}
  {
    "mcpServers": {
      "apiosk": {
        "url": "https://mcp.apiosk.com/mcp"
      }
    }
  }
  ```

  ```bash Local stdio theme={null}
  npx -y @apiosk/mcp
  # or
  uvx apiosk-mcp
  ```
</CodeGroup>

In ChatGPT, add `https://mcp.apiosk.com/mcp` as a connector. The first paid
action sends the person through OAuth to approve the connection.

## The tools

Four tools are visible to the assistant. Only one of them spends money, and
only after the person has approved a plan.

| Tool              | What it does                                                                                                 | Spends                 |
| ----------------- | ------------------------------------------------------------------------------------------------------------ | ---------------------- |
| `apiosk_sources`  | Browse published sources by name, category, sector, tag or capability                                        | no                     |
| `apiosk_discover` | Turn a question into one priced plan, or ask for the missing detail                                          | no                     |
| `apiosk_execute`  | Continue a task through a returned `next_action`: run a step, supply input, choose an entity, poll or cancel | yes, on approved steps |
| `apiosk_status`   | Read a saved task: results, actual charges, current status                                                   | no                     |

The interactive card adds an approval tool of its own, used when the person
clicks Approve on the plan; an assistant never calls it by itself.

<Note>
  Browsing and planning are free. A price is always shown before anything is
  bought, and the amount approved is a ceiling — the run is charged what the
  sources actually cost.
</Note>

## What the person controls

The connection carries the limits the person set when approving it: a
per-request ceiling and a daily ceiling. They are enforced on every call, not
just on the first one, and the person can change or revoke the connection at
any time under **Integrations** in the app.

## When something goes wrong

| The assistant sees         | What it means                                    | What to do                                        |
| -------------------------- | ------------------------------------------------ | ------------------------------------------------- |
| `payment_required`         | The balance cannot cover the call                | Top up in the app, then ask again                 |
| `not_authorised`           | The connection expired or was revoked            | Reconnect from the app                            |
| A plan instead of a result | The question needs approval, or a missing detail | Approve in the card, or answer the question asked |

## MCP or the API?

| You are                                  | Use                                                     |
| ---------------------------------------- | ------------------------------------------------------- |
| A person working in ChatGPT or Claude    | The MCP server                                          |
| A server or an agent runtime you operate | The [API](/api/authentication) with an organisation key |

Both reach the same catalogue, the same prices and the same ledger.
