5-minute quickstart
Let your AI request keys, install the SDK, set up ads.txt and run the checks.
1. Create an account
Go to sign in with your Aotter account. On first sign-in your Trek organisation is created and you land on "Get started" in the dashboard.
2. Add Trek to your AI tool
Claude Code
Run this in your project folder, then type /mcp in the chat to sign in.
claude mcp add --transport http trek https://trek-staging.aotter.workers.dev/mcpCursor
Add this file (or Settings → MCP → Add), then click Login. .cursor/mcp.json
{
"mcpServers": {
"trek": {
"url": "https://trek-staging.aotter.workers.dev/mcp"
}
}
}Codex
Add to your config, then run codex mcp login trek. ~/.codex/config.toml
[mcp_servers.trek]
url = "https://trek-staging.aotter.workers.dev/mcp"VS Code / Copilot
Add this file and enable it in Copilot Chat agent mode. .vscode/mcp.json
{
"servers": {
"trek": {
"type": "http",
"url": "https://trek-staging.aotter.workers.dev/mcp"
}
}
}Windsurf
Add to the config file, then refresh. ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"trek": {
"serverUrl": "https://trek-staging.aotter.workers.dev/mcp"
}
}
}Gemini CLI
Add to settings, then run /mcp auth trek. ~/.gemini/settings.json
{
"mcpServers": {
"trek": {
"httpUrl": "https://trek-staging.aotter.workers.dev/mcp"
}
}
}ChatGPT / Claude.ai
Go to Settings → Connectors → Add custom connector, paste the URL and sign in with Aotter.
https://trek-staging.aotter.workers.dev/mcp
3. Give your AI these instructions
Please connect this project to AotterTrek ads and data.
1. Connect to Trek at https://trek-staging.aotter.workers.dev/mcp. The first time, a browser window opens so I can sign in with my Aotter account and approve access.
2. Check my account status and next step (get_onboarding_status).
3. Identify this project's domain (for an app: the App Store ID on iOS or the package name on Android; an app not in its store yet registers with listing 'unlisted', iOS by bundle ID) and framework. Check whether it is already registered (list_assets); register it only if not (create_asset). If the reply asks for a Trek organisation first, or says the linked organisation has no sites or apps, list the organisations (list_trek_orgs), let me choose, then link it (link_trek_org) instead of registering straight away.
4. Create placements that fit the pages (create_placement), with formats and sizes from get_sdk_capabilities: on websites, a native multimedia ad (300x250 or 336x280) inside article content plus an optional sticky bottom banner site-wide (for example 320x50); in apps, native or native multimedia ads.
5. Get the install guide (get_integration_skill). The reply points to the SDK skills in aotter/skills: run npx skills add aotter/skills in the project first, then install with the skills the reply lists. Use the test keys in the reply in development.
6. Get the public keys (list_integration_keys), add them to the project's environment variables with the framework's public prefix (e.g. NEXT_PUBLIC_ or VITE_), and add the ads.txt line at the site root. After deploying, verify ownership (verify_asset) if the asset was created in Trek.
7. Build and open the page, confirm the ad space is reserved and nothing else changed, then check the install (verify_integration) and report the full result to me.
Rules:
- Never put tokens, passwords or secrets in files, commits or chat.
- Only change code related to ads.
- Ask me when unsure; if a write's result is unclear, check first instead of retrying.
4. Check the install
Once deployed, paste a URL into the quick check or call the public API:
curl "https://trek-staging.aotter.workers.dev/api/public/verify?url=https://your-site.com/article"
It checks the SDK, clientId, placeUid, ads.txt and whether test keys are still in use. Signed in, the dashboard or verify_integration shows the four-stage status.
The public API is rate limited to about 10 calls a minute per IP; this is approximate, not an exact quota. Beyond it the API answers 429 (RATE_LIMITED) — try again in a minute.
Tool can't connect directly?
For Lovable, Bolt, v0 and similar tools, copy your public keys from "Placements & keys" and give them to your AI with the Web SDK example. Or install it yourself with the SDK docs.