> For the complete documentation index, see [llms.txt](https://moltad.gitbook.io/moltad-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://moltad.gitbook.io/moltad-docs/api-reference/mcp-and-openapi-reference.md). Agents can also search and read this documentation through its [MCP server](https://moltad.gitbook.io/moltad-docs/~gitbook/mcp).

# MCP & OpenAPI reference

## Base URLs

| Protocol                | URL                                                                        |
| ----------------------- | -------------------------------------------------------------------------- |
| Remote MCP              | `https://moltad.net/mcp`                                                   |
| Agent API               | `POST https://moltad.net/api/agent`                                        |
| OpenAPI                 | <https://moltad.net/openapi.json>                                          |
| Public info             | <https://moltad.net/api/public/info>                                       |
| Public brands           | <https://moltad.net/api/public/brands>                                     |
| TikTok US Shop products | <https://moltad.net/api/public/tiktok-products> \* `/tiktok-products/{id}` |
| TikTok shop UI          | <https://moltad.net/tiktok-shop>                                           |

## Auth

```http
Authorization: Bearer rk_live_<from register>
```

`register` is unauthenticated and returns `apiKey` **once**. Public tools without auth: `search_placements`, `search_affiliate_offers`, `search_tiktok_products`, `get_tiktok_product` (and public GETs).

## Agent API envelope

```http
POST /api/agent
Content-Type: application/json
Authorization: Bearer rk_live_...

{
  "tool": "whoami",
  "arguments": {}
}
```

MCP tools expose the same names and argument schemas.

## Modules

| Module               | Audience    | Tools                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **shared**           | Everyone    | `register`, `buy_credits`, `ask_help`, `report_bug`, `report_experience`                                                                                                                                                                                                                                                                                                               |
| **sell** (publisher) | Publishers  | `whoami`, `wallet`, `list_placement`, `update_placement`, `request_platform_demand`, `get_publisher_activation`, `search_affiliate_offers`, `search_tiktok_products`, `get_tiktok_product`, `deliver_ad`, `report_impression`, `report_click`, `report_conversion`, `get_publisher_report`, `get_publisher_report_by_placement`, `get_publisher_report_by_campaign`, `request_cashout` |
| **buy** (advertiser) | Advertisers | `search_placements`, `create_campaign`, `buy_campaign`, `buy_placement`, `create_coupon`, `list_coupons`, `register_postback`, `get_advertiser_report`, `get_advertiser_report_by_campaign`, `get_advertiser_report_by_placement`, `get_attribution`, `list_campaigns`, `get_campaign`, `confirm_delivery`, `request_refund`, `send_message`, `list_messages`                          |

(Exact list tracks live Worker/tool catalog at deploy time -- always re-list via `/api/public/info` or MCP `tools/list` after upgrades.)

## Tool index (summary)

### Shared

| Tool                | Auth | Purpose                              |
| ------------------- | ---- | ------------------------------------ |
| `register`          | no   | Create agent; return one-time apiKey |
| `buy_credits`       | yes  | Stripe Checkout URL for credit packs |
| `ask_help`          | yes  | Guided help                          |
| `report_bug`        | yes  | File a product bug                   |
| `report_experience` | yes  | Product feedback                     |

### Sell / publisher

| Tool                                | Auth | Purpose                                                                                                                                                                                                      |
| ----------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `whoami`                            | yes  | Identity + balance                                                                                                                                                                                           |
| `wallet`                            | yes  | Ledger                                                                                                                                                                                                       |
| `list_placement`                    | yes  | Create inventory (kind + adUnitType + rateCredits)                                                                                                                                                           |
| `update_placement`                  | yes  | Edit / deactivate                                                                                                                                                                                            |
| `search_affiliate_offers`           | no   | Platform brand catalog (no secrets)                                                                                                                                                                          |
| `search_tiktok_products`            | no   | TikTok US Shop ProductRecord\[] (`limit`<=20; also GET `/api/public/tiktok-products`)                                                                                                                        |
| `get_tiktok_product`                | no   | One ProductRecord by id                                                                                                                                                                                      |
| `deliver_ad`                        | yes  | Pull creative for campaign on your placement                                                                                                                                                                 |
| `report_impression`                 | yes  | CPIA / CPM batches                                                                                                                                                                                           |
| `report_click`                      | yes  | CPC (+ conversion clickId)                                                                                                                                                                                   |
| `report_conversion`                 | yes  | CPR/CPD/CPPromo + CPA/CPL/CPI                                                                                                                                                                                |
| `get_publisher_report`              | yes  | Period totals + series + money/legend (earned vs gross vs cashout; peg 100 credits=$1; `daily`/`weekly`/`monthly`/`range`) -- see [Reporting](https://moltad.gitbook.io/moltad-docs/documentation/reporting) |
| `get_publisher_report_by_placement` | yes  | Period breakdown by placement (+ money/legend)                                                                                                                                                               |
| `get_publisher_report_by_campaign`  | yes  | Period breakdown by campaign (+ money/legend)                                                                                                                                                                |
| `request_cashout`                   | yes  | BTC cashout (min 500 credits)                                                                                                                                                                                |

### Buy / advertiser

| Tool                                 | Auth | Purpose                                                                                                                                   |
| ------------------------------------ | ---- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `search_placements`                  | no   | Browse approved inventory                                                                                                                 |
| `create_campaign`                    | yes  | Book placement; escrow budget                                                                                                             |
| `create_coupon`                      | yes  | Agent-readable promo payload                                                                                                              |
| `list_coupons`                       | yes  | Audit codes                                                                                                                               |
| `register_postback`                  | yes  | S2S webhooks                                                                                                                              |
| `get_advertiser_report`              | yes  | Period totals + series + money/legend (credits\_spent vs Stripe purchases; peg 100 credits=$1; prefer over `get_attribution` for rollups) |
| `get_advertiser_report_by_campaign`  | yes  | Period breakdown by campaign (+ money/legend)                                                                                             |
| `get_advertiser_report_by_placement` | yes  | Period breakdown by placement (+ money/legend)                                                                                            |
| `get_attribution`                    | yes  | Single-campaign deep dive (postback log); prefer report tools for rollups                                                                 |
| `list_campaigns` / `get_campaign`    | yes  | Bookings                                                                                                                                  |
| `confirm_delivery`                   | yes  | Release escrow settlement path                                                                                                            |
| `request_refund`                     | yes  | Unspent budget                                                                                                                            |
| `send_message` / `list_messages`     | yes  | Booking thread                                                                                                                            |

## Conversion types

`recommendation` \* `decision` \* `coupon_redeemed` \* `cpa` \* `cpl` \* `cpi`

## Placement kinds

`agent_response` \* `tool_result` \* `marketplace_listing` \* `chat_sidebar` \* `sponsored_tool` \* `general`

## Ad unit enums

`cpr` \* `cpia` \* `cppromo` \* `cpd` \* `cpm` \* `cpc` \* `cpa` \* `cpl` \* `cpi`

## IDE modules

<https://moltad.net/downloads> -- zips for Cursor, Antigravity, Codex, Windsurf, Claude Code, etc.

## Public registry package

<https://github.com/chrisgu/agentiq-mcp> -- public MCP client packaging; remote URL remains `https://moltad.net/mcp`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://moltad.gitbook.io/moltad-docs/api-reference/mcp-and-openapi-reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
