Let your AI assistant do the setup
Trek is built for the AI era: assistants in your dev tools connect via MCP, and in-browser agents work the dashboard via WebMCP. Both share one permission model that you control and can revoke.
01MCP
One URL. Every tool.
Streamable HTTP with OAuth 2.1 (PKCE) and dynamic registration; it only returns data you can access.
https://trek-staging.aotter.workers.dev/mcp
| Tool | Purpose | Type |
|---|---|---|
get_onboarding_status | Account, Trek organisation and next step | Read |
list_assets | List your sites and apps; with Trek connected, the selected Trek organisation's apps are read from Trek at that moment | Read |
list_placements | List ad placements; with Trek connected, places and their state are read from Trek at that moment | Read |
list_trek_orgs | List the Trek organisations you belong to | Read |
link_trek_org | Choose the Trek organisation whose assets are listed and new assets are created in | Write |
create_asset | Register a site (domain) or app (App Store ID for iOS, package name for Android; bundle ID for an iOS app not in the App Store yet) | Write |
report_asset_listing | Report that an app is now in its store (iOS with its App Store ID); app-ads.txt can be verified after that | Write |
update_asset | Rename an asset or change its category | Write |
verify_asset | Ask Trek to check ads.txt and verify ownership | Write |
get_sdk_capabilities | SDK versions, formats and sizes per platform (from the official install docs) | Read |
create_placement | Create a placement per the SDK docs: native multimedia or banner on websites; native, native multimedia or banner in apps | Write |
set_placement_state | Pause or resume a Trek placement | Write |
get_integration_skill | Get the install guide and keys: the aotter/skills SDK skills to use and this placement's keys | Read |
list_integration_keys | Get public keys (clientId, placeUid) and ads.txt | Read |
verify_integration | Check the install in four stages | Read |
get_revenue_report | Impressions, clicks, eCPM, fill rate and estimated revenue | Read |
get_payee_info | View the linked organisation's payee details (personal data masked by AotterTrek) | Read |
update_payee_info | Change the text fields of the linked organisation's payee details (send only what changes; images never pass through MCP and are uploaded in the dashboard) | Write |
get_wallet | View the linked organisation's wallet: amount available, balance, open payout requests, the minimum payout and why a payout cannot be requested now (payouts are requested in the dashboard only, never through MCP) | Read |
list_payout_requests | List the linked organisation's payout requests: status, amount, adjustments, amount paid and pay date | Read |
connections | List GAM, AdMob, AdSense and other sources | Read |
02Supported AI tools
Pick your tool, copy, paste
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/mcp
Then 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.
Add this file (or Settings → MCP → Add), then click Login. .cursor/mcp.json
{
"mcpServers": {
"trek": {
"url": "https://trek-staging.aotter.workers.dev/mcp"
}
}
}
Then 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.
Add to your config, then run codex mcp login trek. ~/.codex/config.toml
[mcp_servers.trek]
url = "https://trek-staging.aotter.workers.dev/mcp"
Then 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.
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"
}
}
}
Then 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.
Add to the config file, then refresh. ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"trek": {
"serverUrl": "https://trek-staging.aotter.workers.dev/mcp"
}
}
}
Then 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.
Add to settings, then run /mcp auth trek. ~/.gemini/settings.json
{
"mcpServers": {
"trek": {
"httpUrl": "https://trek-staging.aotter.workers.dev/mcp"
}
}
}
Then 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.
Go to Settings → Connectors → Add custom connector, paste the URL and sign in with Aotter.
https://trek-staging.aotter.workers.dev/mcp
Then 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.
If your tool (Lovable, Bolt, v0…) can't connect directly, copy your public keys from "Placements & keys" in the dashboard and paste them with the instructions below.
Then 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.
03WebMCP
In-browser AI works the dashboard
When a WebMCP-capable browser (W3C community draft) opens the Trek dashboard, the page offers tools such as trek_get_context, trek_navigate and trek_create_asset. Every call uses your session and is re-authorised by the server.
const ctx = document.modelContext ?? navigator.modelContext; // Tools offered by the Trek dashboard // trek_get_context · trek_navigate · trek_list_assets // trek_create_asset · trek_create_placement // trek_get_keys · trek_revenue_summary
04Security
Three relationships, authorised separately
You ↔ Trek
Sign in with Aotter; your Trek organisation is created and its credentials are kept server-side.
Trek ↔ other sources
GAM, AdMob, AdSense and others are authorised one by one, with separate accounts and revocation.
You ↔ your AI
Each AI tool has its own revocable grant; install skills give knowledge, never extra permissions.