# MCP server

> Connect Okidoki to Claude, ChatGPT or any MCP client with one address.

Okidoki is an MCP server, so Claude, ChatGPT and any other MCP client can use it as a set of tools. Add it once, then ask things like *How is mysite.com doing?* or *Add a goal for signups*.

It works on every plan. Reports a tool reads within a few minutes of each other count as one question, since it often reads two or three to answer: 20 a month on Free and 2,000 on Plus. When Free's are used, the AI tool says so kindly and suggests Plus.

## Claude and ChatGPT

The address is the same for everyone:

```text title="The MCP address"
https://okidoki.sh/mcp
```

There is no key to copy. You sign in to Okidoki when you connect, with the code we email you or your passkey, and choose what the app may do.

**In Claude**

1. Open Settings, then Connectors.
2. Click **Add custom connector**, name it Okidoki and paste the address.
3. Click **Connect**, sign in to Okidoki and tap **Allow**.

**In ChatGPT**

1. Open Settings, then Apps, then Advanced settings, and turn on Developer mode.
2. Click **Create app**, name it Okidoki, paste the address and pick OAuth.
3. Sign in to Okidoki and tap **Allow**.

Then ask in a normal chat. The address and these steps are also in Okidoki, under **Settings → Connections**, on the card **Connect your agent**, and at the bottom of each overview, on the card **Let your AI read your stats**.

When you connect, Okidoki asks what the app may do:

| Choice | What it allows |
| --- | --- |
| **Read my numbers** | Visits, pages, sources, goals, campaigns and comparisons. Nothing can be changed |
| **Read and set things up** | Also add sites, goals and share links, and change settings |

Each connected app gets its own key, which shows up under **Your AI agent** in **Settings → Connections**. Turn it off there and the app loses access at once.

## Claude Code

```bash
claude mcp add --transport http okidoki https://okidoki.sh/mcp
```

Then run `/mcp` in Claude Code, pick okidoki and sign in to Okidoki.

## Site builders

Lovable, Bolt, Replit, v0 and Base44 can connect to Okidoki in their own chat. Then the builder installs Okidoki, counts buttons and forms, adds goals and reads your numbers while it works on the site. Builders use their own address, with only the tools for building a site, so their chat stays fast:

```text title="The MCP address for site builders"
https://okidoki.sh/mcp/build
```

Sign-in is the same: no key, you just sign in to Okidoki. The steps for each builder are in its install guide: [Lovable](https://docs.okidoki.sh/install/lovable#let-lovable-handle-okidoki-for-you), [Bolt](https://docs.okidoki.sh/install/bolt#let-bolt-handle-okidoki-for-you), [Replit](https://docs.okidoki.sh/install/replit#let-replit-handle-okidoki-for-you), [v0](https://docs.okidoki.sh/install/v0#let-v0-handle-okidoki-for-you) and [Base44](https://docs.okidoki.sh/install/base44#let-base44-handle-okidoki-for-you).

## Agents with an API key

Cursor, scripts and other agents that take a key can send it as a header to the same address. Make the key under **Your AI agent** in **Settings → Connections**, see [API keys](https://docs.okidoki.sh/api/keys).

```json title="MCP client config"
{
  "mcpServers": {
    "okidoki": {
      "type": "http",
      "url": "https://okidoki.sh/mcp",
      "headers": { "Authorization": "Bearer oks_..." }
    }
  }
}
```

## How it talks

| | |
| --- | --- |
| Transport | Streamable HTTP, `POST` with JSON-RPC. Answers are plain JSON, never a stream |
| Address | `https://okidoki.sh/mcp` |
| Sign-in | OAuth 2.1 with PKCE, signed in on okidoki.sh. Or `Authorization: Bearer oks_...` |
| OAuth metadata | `https://okidoki.sh/.well-known/oauth-protected-resource/mcp` and `https://okidoki.sh/.well-known/oauth-authorization-server` |
| Client registration | Dynamic client registration and client ID metadata documents, so clients need no setup |
| Server name | `okidoki` |
| Protocol versions | `2025-11-25`, `2025-06-18`, `2025-03-26` and `2024-11-05`. A `MCP-Protocol-Version` header with any other is `400` |

Every tool answer has a plain `message` the agent can repeat to you, followed by the data, both as text and as `structuredContent` (`{ "message", "data" }`). Every tool declares that shape as its `outputSchema`, and annotations say which tools only read, which change things and which reach outside Okidoki.

Errors come back as tool errors (`isError: true`) with a message that says what to do, so the model can correct itself, and the API's error code in `structuredContent.error`:

```json title="A tool error"
{
  "content": [{ "type": "text", "text": "There is no site \"mysite.co\" in this account. List your sites with GET /api/v1/sites." }],
  "structuredContent": { "message": "There is no site \"mysite.co\" in this account. …", "data": null, "error": { "code": "site_not_found", "status": 404 } },
  "isError": true
}
```

Arguments are checked against each tool's `inputSchema` first. A missing or wrong argument is a tool error that names it (`invalid_arguments`); numbers sent as text are accepted. An unknown tool is a JSON-RPC error `-32602`.

Tools are the API underneath, so the API's [rate limits](https://docs.okidoki.sh/api#rate-limits) apply: 20 report reads a month on Free, 2,000 on Plus.

## The tools

| Tool | Changes things | What it does |
| --- | --- | --- |
| `who_am_i` | No | Which Okidoki account and plan this key belongs to, and what it may do. |
| `set_weekly_email` | Yes | Turn the Monday email with last week's numbers on or off for the account. |
| `list_sites` | No | The sites in the account. |
| `add_site` | Yes | Add a site to Okidoki. The answer holds one sentence to paste into the site builder (Lovable, Bolt, v0, Replit, Cursor) to install it, or do it yourself: put the script tag in <head> on every page. |
| `open_setup` | No | Shows how to get Okidoki counting on a site as a card, step by step, for the tool the site is built with (Lovable, WordPress, Shopify and others): a one-click connection where there is one, otherwise the sentence or the line to paste with a copy button. The card watches for the first visitor and turns green by itself. Use it after add_site, or when the person asks how to install Okidoki or why nothing is counted. |
| `get_install_instructions` | No | The script tag, the React component and the sentence for a site builder, for one site. |
| `check_install` | No | Check that Okidoki counts visits on a site. If not, the answer says what is wrong and what to paste to fix it. |
| `get_ad_blocker_setup` | No | How to count visitors who use ad blockers on a site: the state of its own subdomain, the DNS record to add, and a proxy (with ready code for Next.js, Vercel, Netlify, Cloudflare and Node) as the other way. Same data as before, no cookies. |
| `set_own_subdomain` | Yes | Serve Okidoki from a subdomain of the site, like x7f3k.mysite.com, so ad blockers do not stop it. The answer says which DNS record to add, with own_address.add_record: a one-click link at the person's DNS provider (give it to them to open) or steps for their provider. After that, change the script tag to the one it gives. Leave host out to use the suggested name. |
| `remove_own_subdomain` | Yes | Stop serving Okidoki from the site's own subdomain. Put the okidoki.sh tag back on the site first. |
| `set_timezone` | Yes | Change the time zone a site's reports use. |
| `get_heatmap_link` | No | A link that opens one page of the site with its heat map drawn on top (Plus): what people click, with the share of page views on each thing, and how far down they scroll, for the last 30 days, on phone or computer. Only the person who opens the link sees it, and it works for an hour. Give it to the person to open; read the numbers with get_report and report heatmap. |
| `quick_look` | No | The fastest answer: the whole picture of a site in one call, shown as a card. Visitors and page views with the change from the period before, a small chart, the three biggest changes, the top sources, pages and goals, and how many are on the site right now. Kept for a minute, so asking again is instant. Start here for "how is my site doing?", "quick overview", "just the big picture", "snabbt" or any quick question about the whole site, and answer in two or three sentences from it without calling more tools unless the person asks for more. Defaults to the last 7 days. |
| `get_summary` | No | How a site is doing, in a few plain sentences without a card, compared with the period before. Use it for a narrower question with filters, like "how did Google do this month?"; for the quick picture of the whole site, use quick_look. |
| `get_weekly_brief` | No | The weekly business check-in for a site: how the last 7 days went in a few sentences, the numbers, what changed, and (on Plus) revenue and up to three next steps, each with the tool you can run to do it. On Free, the answer says what Plus would add. Start here when the person asks "how is my business doing?" or for a Monday check-in. |
| `get_next_steps` | No | Up to three things worth doing on a site right now, the most useful first: fix what broke, track goals, connect the shop, use campaign links, connect Google. Each says why, and which tool does it, so you can offer to do it for the person. Plus. |
| `get_recent_events` | No | What happened on a site since a time: traffic jumps, a day without visitors, new sales, goals reached or gone quiet, and the Monday check-in. Call it when you check in on a schedule ("anything new since yesterday?"), with since set to your last check. Plus. |
| `list_findings` | No | Start here for "anything I should know?" or "anything new on my site?": what Okidoki's background agent noticed on a site: every morning it compares the last seven days with the seven before, works out where a change came from and what else happened on those days (a note, a holiday, the site being down), and writes to the owner only when something stands out. Each finding has a plain text to repeat as is, whether it was sent to the owner, the one action it proposes (save as an occasion, a goal alert, a campaign link) who does it, how the owner will know whether it worked and, once enough has been counted (60 more visitors or 15 more goals, after one to four weeks), a follow-up on how it went. Call it for "anything I should know?" before reading reports yourself. Plus. |
| `respond_to_finding` | Yes | Answers a finding from the background agent for the owner: useful (more like this, and a follow-up once enough has been counted to tell), not_useful (fewer like this), never (no more of this kind on this site) or approve (do the action it proposed, within the limits the owner set). Ask the person before you approve. The agent learns from every answer. |
| `set_agent_limits` | Yes | What the background agent may do on its own for a site. For each action, auto (do it and say so), ask (the default: the owner approves with one click) or never (do not propose it). Actions: note (save a change as an occasion), goal_alert (an alert when a goal goes quiet), campaign_link (always ask: the owner posts the link). Leave limits out to read them. Only change them when the person asks. |
| `list_webhooks` | No | The webhooks that send Okidoki events to an address, and the events there are. Plus. |
| `add_webhook` | Yes | Send events to an https address as they happen, so you do not have to ask: traffic_spike, quiet_day, sale, goal_reached, goal_quiet, weekly_brief, site_down, site_up, tracking_stopped, tracking_back, goal_stopped, goal_back, sales_stopped, sales_back, finding. Each is a signed POST with JSON (header Okidoki-Signature "t=<time>,v1=<HMAC SHA-256 of "<time>.<body>">"). The answer holds the secret once: keep it where you check the signature. Ask the person before adding one. Plus. |
| `test_webhook` | Yes | Send a test event to a webhook now and say whether its address answered. Get the id from list_webhooks. |
| `list_webhook_deliveries` | No | Every attempt to send events to a webhook, newest first: event, attempt number, the status the address answered, timeout or network error, and how long it took. Use it when the person says events do not arrive. Get the id from list_webhooks. Plus. |
| `remove_webhook` | Yes | Stop sending events to a webhook. Get its id from list_webhooks. |
| `list_chat_channels` | No | The Slack, Microsoft Teams and Discord channels that get Okidoki alerts, sales and the weekly check-in, and the events there are. Never shows the full address. Plus. |
| `add_chat_channel` | Yes | Send alerts, sales and the Monday check-in to a Slack, Microsoft Teams or Discord channel, as a readable message with a button to Okidoki. For Slack and Discord the simplest way is the link in slack_install or discord_install from list_chat_channels: the person opens it, signs in and picks a channel, nothing to copy. Otherwise ask the person for an incoming webhook address: in Slack, an app with Incoming Webhooks (https://hooks.slack.com/services/…); in Teams, the Workflows app with "Post to a channel when a webhook request is received"; in Discord, Server Settings, Integrations, Webhooks (https://discord.com/api/webhooks/…). Okidoki sends a first message right away to check it, then stores the address encrypted. Plus. |
| `send_to_chat` | Yes | Plus: sends a view to the team's Slack, Microsoft Teams or Discord channel, as a message in the account's language with the picture, the key numbers and a button into Okidoki. what: funnel (a saved funnel, id from list_funnels; the first one when left out), journey (the way to a goal, id = a goal id from list_goals) or plan (how the marketing went and the plan, last 30 days). In Slack, a channel added with "Add to Slack" also gets buttons for 7, 30 and 90 days that redraw the message. With several channels, give channel (an id from list_chat_channels). Ask the person before sending: the whole channel sees it. |
| `update_chat_channel` | Yes | Change which events a chat channel gets, or its label. Get the id from list_chat_channels. |
| `test_chat_channel` | Yes | Send a test message to a chat channel now and say whether it arrived. A test that works turns a channel on again after failures. Get the id from list_chat_channels. |
| `remove_chat_channel` | Yes | Stop sending to a Slack, Teams or Discord channel. Get its id from list_chat_channels. |
| `get_insights` | No | The headline for a site, what changed more than usual, and question cards with tips. Good for "what changed?" or "what changed this month?". For "anything I should know?", call list_findings first: the background agent has already looked. |
| `suggest_questions` | No | Questions worth asking about a site right now, picked from its numbers. Offer them to the person, then answer with get_summary, get_report and get_insights. |
| `get_report` | No | One report for a site, with a plain sentence, the numbers and the change from the period before. Reports: revenue (orders and revenue from the connected shop or payment platform: Free gets the total and each channel for the last 30 days, Plus adds source, campaign and all history), campaigns (each campaign's visitors, how they behaved on the landing page: engaged, clicked on, read it all, time; goals per 100 visitors, orders, revenue, and with costs entered cost per visitor, cost per goal and return on ad spend, with guards against too little data), overview (visitors, page views, bounces, time), pages (also how far pages are read, exit pages and site search), sources (channels, sites, campaigns, AI assistants and AI crawlers; a source without a dot, like google, came through a link tagged utm_source=google, most often an ad or an email, while google.com is the Google search page itself, so call the first a campaign link and never treat the two as duplicates), locations (also browser languages), technology (also load time), events (clicks, downloads, forms), videos (video starts, how far they are watched and the share watched to the end, per video and page, for <video> players and YouTube and Vimeo embeds), goals (with each goal's monthly target and whether this month is ahead or behind, when set), health (broken links, JavaScript errors, rage clicks, slow pages, with warnings, and the watch: whether the site is down or visits, goals or sales have stopped), business (from the site's Google Business Profile, once connected: calls, route requests, website clicks, views on Google Maps and Search, and new reviews with their stars; two or three days late), calendar (each day's visitors next to a usual day like it, with holidays, paydays, the weather in the site's town and downtime; note is the day that stood out with something on the calendar, upcoming lists holidays and paydays in the next two weeks, forecast the coming days' weather), sitesearch (what visitors searched for in the site's own search box, each term with how many searches and how many found nothing, and not_found: the searches that found nothing, the clearest list of what people want and cannot find), speed (how fast the site feels to real visitors: Core Web Vitals as Google counts them, the 75th percentile of LCP, INP and CLS with good/needs work/poor shares, on phones and computers, and Google's weekly Lighthouse test of the home page; Plus adds each page and Lighthouse for the five most visited pages), notfound (missing pages: addresses visitors opened that said "not found", how often, the links that led there, split into the site's own pages (fix the link), other sites (add a redirect) and direct, and the existing page most like each one as a redirect to add), uptime (was the site up: uptime as a percentage for the period, each time it was down with minutes, whether it is down right now, and how fast the home page answers; Plus is checked every minute, Free every five), forecast (where visitors are heading: this month's expected total with a likely range, the next 7 and 14 days, and sales this month with a shop connected, from the site's own history; the period is ignored; track says how right earlier forecasts were; Plus; always say "about" and give the range), impact (Plus: how it went after each noted change, the days after against as many before; the period is ignored), metrics (Plus: the site's own metrics, each one number divided by another, like contact forms per 100 visitors or revenue per order, for the period next to the period before; add them with add_metric), budgets (Plus: what each ad channel may cost a month, this month's spend and whether it is heading over or under; the period is ignored), search (what people searched on Google before they came: search terms, clicks, times shown and place in the results, from the site's Google Search Console; only page and device filters apply) realtime (roughly how many people are on the site right now, and what they read; the period is ignored), customers (from the shop's own orders, never visitors: how many customers bought again, month by month after their first order, which channel brings customers who come back, and subscriptions still paying after 1, 3 and 6 months; the period is ignored), paths (where people went next: give page to see the pages people went to right after it, where they came from and how many left; without page, the most common steps between pages) funnels (the saved funnels, or give steps to count any funnel: how many went straight on at each step and about how many got the whole way), heatmap (Plus: for one page, give a page filter or get the busiest page, what people click with the share of page views per thing, and the scroll map: the share that reached each tenth of the page; never coordinates or people) and forms (Plus: each form people started, the share that sent it, and per field how many got that far and how many stopped there; never what was typed). |
| `open_dashboard` | No | Opens the Okidoki overview for a site in full screen: visitors over time, channels, sources, pages, countries and devices, with a period to pick and rows to click to see only that. Use it when the person wants to look around their statistics themselves ("show me my dashboard", "open Okidoki"). For a question, answer with get_summary or get_report instead. Without site, it opens the first site in the account. |
| `open_settings` | No | Shows a site's settings as a card the person can change with a click: the alerts (traffic jumps, a day without visitors, a goal that goes quiet), the goals with suggestions to add, and the Monday email. Use it when the person wants to see or change their settings ("my settings", "turn on alerts", "which goals do I have"). Which sites this connection sees, the plan and the account are changed on okidoki.sh only. Without site, it opens the first site. |
| `get_patterns` | No | Things in a site's numbers that go together, over the last 90 full days, each as one plain sentence with the two numbers behind it: channels, sources, landing pages or devices whose visits go on to a second page, read to the end or stay a minute more or less often than others; goals per 100 visits by device (country on Plus); a weekday that reaches a goal more often than a usual day; pages that lead straight on to a goal page; orders the shop credits to a channel per 100 visits (Plus). A pattern needs enough data, must hold in both halves of the period and survive a correction for testing many things, so an empty list is an honest answer. near_misses lists what was tested and did not hold, with the reason. Patterns show what goes together, not why: never present one as a cause. Okidoki never links page views, so "do people who read the blog buy more?" cannot be answered; offer the closest pattern instead. To look closer at an email, a campaign or an occasion behind a pattern, use compare_results. |
| `list_occasions` | No | The occasions a business plans around for the site's country (Black Friday, Black Week, Cyber Monday, Christmas shopping, after-Christmas sales, Mother's and Father's Day, Valentine's Day, Easter, Halloween and more), each with its latest dates and the next ones. The country follows the site's time zone; give country (SE, NO, DK, FI, IS, DE, FR, ES, GB, US) for another calendar. Occasions the person hid are listed apart under hidden; their own occasions come from list_occasion_notes. |
| `get_change_impact` | No | How it went after each change the owner noted on the timeline in the last 60 days (a new version of the site, a price change, a launch or something else, also from a deploy hook): the days after it against as many days before (7 to 14, so the weekdays match), for visitors a day, goals per 100 visitors and orders a day. verdict is up or down only when bigger than chance, same, or too_few. same_days names other notes in those days. Say what happened after the change, never that it caused it. Plus. |
| `get_occasion` | No | How one occasion went: visitors, sources, campaign links and revenue, next to a usual stretch of the same length (the four weeks before, away from other big sales days) and the same occasion last year. Give occasion as a key from list_occasions (like blackFriday) and year, or occasion "custom" with from, to and name for a launch or a sale of your own (at most 92 days). |
| `find_occasions` | No | Plus: the occasions Okidoki found by itself in the last year, like notes in a calendar that nobody had to write. Emails that went out, campaigns that ran and peaks from one source, each with its dates, how many days the effect lasted, the visitors it brought and how much busier the whole site was than usual. To look closer, call get_occasion with occasion "custom" and the dates. |
| `list_occasion_notes` | No | The occasions of the person's own (a sale in their shop, a fair or event, print or poster, radio or TV, a mention in the press, a price change, a launch), with their latest and next dates and whether they repeat every year, and the templates with how many days each measures by default. Read a note's effect with get_occasion and the note id as occasion. |
| `add_occasion_note` | Yes | Add an occasion of the person's own, so Okidoki measures its effect like the ones in the calendar: a sale in their shop, a fair, an ad, a launch. template is sale, fair, print, broadcast, press, price, launch or other; from (and to, if it lasts more than a day) as dates, up to a year ahead; repeats true when it comes back on the same dates every year; effect_days defaults to the template's. Ask the person first. |
| `update_occasion_note` | Yes | Change an occasion of the person's own: its name, dates, template, effect_days or whether it repeats every year. Only the fields given change. Get its id from list_occasion_notes. Ask the person first. |
| `remove_occasion_note` | Yes | Remove an occasion of the person's own. Get its id from list_occasion_notes. |
| `hide_occasion` | Yes | Hide an occasion from the site's calendar (like Halloween for a shop that never marks it), or show it again with hidden false. occasion is a key from list_occasions. Ask the person first. |
| `set_occasion_dates` | Yes | Set a calendar occasion's dates for one year the way this business counts it (its own Black Week, say), so the occasion is compared with the right days last year. occasion is a key from list_occasions, year the year it starts in. Set the dates for last year too when they differed. Leave out from to go back to the calendar's dates. Ask the person first. |
| `export_csv` | No | All reports, or one, for a period as CSV text for a spreadsheet (Plus). For everything Okidoki keeps, day by day, use get_data, or point the person to Settings, Account, Download all your data (a zip of CSV files on every plan). |
| `get_data` | No | Plus: the data Okidoki keeps for a site, one table at a time, as daily totals for its whole history (never a row per visitor). Tables: visitors, pages, channels, sources, campaigns, utm_sources, utm_mediums, countries, regions, devices, browsers, operating_systems, events, goal_completions, sales, deals, ad_results, imported_history, goals, funnels, campaign_costs, occasions, segments, saved_views, ab_tests, uptime, speed, site_searches, downtime, lighthouse, share_links, alert_rules. Pages end between days; ask again with cursor=next_cursor while has_more. |
| `get_google_connection` | No | Whether a site is connected to Google Search Console (and Google Analytics), which Search Console property it reads, and the link to connect. Connecting needs the person: give them connect_search_console to open while signed in to Okidoki. |
| `choose_search_console_property` | Yes | Pick which Search Console property a site reads search terms from, when the one picked on its own is wrong. Use a url from gsc_properties in get_google_connection. |
| `get_search_console_tag` | No | When a site is not in Google Search Console yet (can_add in get_google_connection): the Google verification tag to put in <head> on the home page, and a sentence to paste into the site builder. Add the tag yourself if you edit the site, publish, then call add_site_to_search_console. Needs the person to have allowed adding first (allow_adding_to_search_console in get_google_connection). |
| `add_site_to_search_console` | Yes | After the verification tag from get_search_console_tag is published: checks the home page for it, verifies the site with Google, adds it to Search Console and starts reading search terms from it. |
| `list_goals` | No | The goals set up for a site. |
| `suggest_goals` | No | Goals worth tracking on a site, from what visitors did there, ready to add with add_goal. |
| `get_measurement_plan` | No | The measurement plan for a site: what kind of site it is, what the owner wants visitors to do, and the goals worth tracking (each ready for add_goal, with tracked true when it already is). Null when there is none yet. |
| `make_measurement_plan` | Yes | Read the site (robots.txt, sitemap and a handful of pages, politely) and write a plain measurement plan with suggested goals. The first plan is free; a new one later uses one question. Ask the person before making a new one when a plan already exists. Takes up to a minute. |
| `set_site_kind` | Yes | Say what kind of site it is when the read got it wrong or the site is several things, like a shop that also has recipes to read. kinds is one to three of shop, booking, saas, leads, content, local, event, nonprofit, portfolio, other, the one that matters most first. The most important goals, important pages, occasions and ready-made questions follow, and a new read keeps the choice. Needs a measurement plan first. |
| `get_moments` | No | Things worth celebrating on a site: round visitor numbers passed this week, the best day so far, first visitors from new countries, and the next milestone. |
| `add_goal` | Yes | Track a goal: a page visit (page, like /thanks, end with * for every page below it), an event (event, like form, outbound, app (a click to an app store), download, email, phone or a custom name) or engagement (engaged: read = scrolled to the end of a page and stayed 15 seconds, time = had a page in view for at least seconds in one go, pages = went on to another page after the first). Give exactly one of page, event or engaged. Plus, when an agent does it. |
| `set_goal_target` | Yes | Give a goal a monthly target, like 200 purchases a month, so Okidoki says whether the month is ahead or behind an even pace and what each remaining day needs. monthly_target null removes it. Free has a target on one goal per site, Plus on every goal; Plus when an agent does it. How the month is going is in the goals report (targets) and in list_goal_targets. |
| `list_event_labels` | No | The event lexicon: every event the site sent in the last 90 days (clicks, downloads, forms and its own events) with how often, the name the owner gave it, what it means and whether it is hidden from the reports. Read it before naming goals or explaining events, and use the owner's names. |
| `set_event_label` | Yes | Give an event its own name (like "Signed up" for signup_v2), a sentence on what it means, or hide it from the events report and goal ideas (a test event, an old button). Overwrites what is there; null removes a name or description. Goals that use a hidden event still count it. Free sites do this in the app; Plus when an agent does it. |
| `add_metric` | Yes | Add an own metric to a site: one number divided by another, like contact forms per 100 visitors (top goal, bottom visitors, unit per100) or revenue per order (top revenue, bottom orders, unit number). Each side is visitors, pageviews, a goal (by id or name from list_goals), an event (by name from list_event_labels), orders or revenue. A metric with the same name is replaced. Read the numbers with get_report and report metrics. Plus. |
| `remove_metric` | Yes | Remove an own metric by its id or name. Plus. |
| `list_goal_targets` | No | Goals with a monthly target and how this month is going: so far, where an even month would be by now, ahead or behind, where the month lands at this rate and how many a day the rest of the month needs. Always this month and the whole site. |
| `remove_goal` | Yes | Stop tracking a goal. Get its id from list_goals. Plus, when an agent does it. |
| `list_funnels` | No | The funnels saved for a site. Read their numbers with get_report and report funnels. |
| `get_funnel_ideas` | No | Up to three funnels Okidoki suggests from how people actually moved through the site in the last 30 days, each ending on a goal or a page like sign up or thanks, with its numbers. Save one with add_funnel and its steps. |
| `get_goal_journey` | No | Plus: the common way to one goal, walked back from the page where it is reached: each step, the share of page views that went straight on to the next step, the share who left the site there, where views of the first step came from (outside the site or other pages), the step most people leave from, and the three or four most common ways from the page a visit started on, each "about N". Put together from page pairs, because Okidoki never follows a visitor: always say the numbers are estimates. Get goal ids from list_goals. Suggest add_funnel with the steps to keep an eye on the way. |
| `get_attribution` | No | Plus: what gave the result. For each channel (Search, Social with its ads, Direct, Email, Paid and so on), or with channel set the sources, posts and ad campaigns inside it, or with level campaign every campaign with its cost: visits, the pages the visits started on, the result and the result per 100 visits. The result is a goal (goal = a goal id) or the shop's orders (goal = orders; the default when the shop has orders). Goals are estimated from how often each landing page leads on to the goal, scaled to the goals really reached, with confidence likely or few; orders and revenue are exact, as the shop recorded them. answers names the channel with most visits, the most viewed page and the channel with most results. For Search, terms lists the top Google search terms when Search Console is connected. Always say goal numbers are about, never present a row as the cause of a result, and say "too few to tell" for rows with confidence few. |
| `get_marketing_plan` | No | Plus: how the marketing went over the last 30 days and what to do next. totals: what the ads cost and the sales they brought (the shop's orders and the CRM's deals won, tagged with the campaign) and the value back for every 1 spent. channels: each ad platform, newsletters and free links with cost, sales, value and a verdict (pays_well, pays, loses, no_sales, too_few_sales, too_few_visits, free_best, free_works, free_few). steps: up to four things to do, each with how sure it is (sure, likely, test): shift money from a channel that sells nothing to one that pays well, pause, grow, lean on a free channel, test pausing search ads on the site's own name, repeat what paid off at this time last year, or use the ad version (utm_content) that stands out. budget: a suggestion for next month per channel, to save with set_ad_budget if the person agrees. creatives: ad versions side by side. Never change anything in an ad account; say "too few to tell" where the verdict says so. |
| `add_funnel` | Yes | Save a funnel: 2 to 5 pages people should go through in order, like /pricing,/signup,/welcome. End a path with * for every page below it. It shows on the Goals page. Plus, when an agent does it. |
| `remove_funnel` | Yes | Remove a saved funnel. Get its id from list_funnels. Plus, when an agent does it. |
| `make_campaign_link` | No | A link with campaign (UTM) tags, so visits from an ad, a post or a newsletter show up as their own campaign. |
| `get_ad_setup` | No | What to paste in an ad platform (Meta, Google, YouTube, TikTok, LinkedIn, X, Snapchat, Pinterest, Reddit, Bing, Spotify, Amazon) so every ad shows up by campaign and ad name, with the steps. |
| `test_ad_link` | No | Check a link from an ad (or only its tags) before spending money: how its visits will be counted, and what to fix. |
| `list_ad_costs` | No | What each campaign cost, as entered or fetched for the site: the total per campaign, and each entry with its id (for remove_ad_cost). Defaults to the last 30 days. Cost per goal and return on ad spend are in the campaigns report. |
| `add_ad_cost` | Yes | Save what a campaign cost (Plus), so the campaigns report shows cost per visitor, cost per goal and return on ad spend. Read the amount from the ad platform's own report and give the campaign exactly as in utm_campaign. The same campaign and days replace the old amount. Okidoki never sends anything about visitors to the ad platforms: they only take conversions with an id per person. |
| `list_ad_budgets` | No | What each ad channel may cost a month and how this month is going: spent so far, where an even month would be, where the month lands at this rate, and status (over, fast = heading 10% or more over, slow = 20% or more under, on_track, early). Spend comes from the connected ad accounts and costs entered by hand. Plus. |
| `set_ad_budget` | Yes | Set what an ad channel may cost a month, like 5000 SEK for Google Ads, or change it. Okidoki then says every day whether the month is heading over or under, and emails the owner once when it will run over. channel: all, google, bing (Microsoft Ads), facebook (Meta), tiktok, snapchat, pinterest, linkedin, reddit, or the utm_source the ads use. Plus. |
| `remove_ad_budget` | Yes | Remove an ad budget: give its id or its channel, from list_ad_budgets. Plus. |
| `remove_ad_cost` | Yes | Remove one entered campaign cost (its id from list_ad_costs). |
| `list_share_links` | No | Read-only share links for a site's reports. |
| `create_share_link` | Yes | Make a link anyone can open to see the site's reports, read-only and without signing in. Plus, when an agent does it. |
| `turn_off_share_link` | Yes | Turn off a share link. It stops working right away. Get its id from list_share_links. Plus, when an agent does it. |
| `list_changes` | No | The account's change log: who changed goals, funnels, share links, alerts, segments, connections, the team, keys, sites or settings, and when, newest first. Use it for "who changed this?" or "what changed lately?". Free shows the last 30 days, Plus the whole log. |
| `undo_change` | Yes | Undoes one change from the change log (list_changes, where can_undo is true): something added is removed, something removed comes back as it was, something changed is written back. Works for goals, funnels, alerts, segments, saved views, A/B tests, metrics and ad budgets, for 30 days, the newest change to a thing first. Also undoes what Okidoki's autopilot did (via agent). Ask the person first. |
| `autopilot` | Yes | Plus: Okidoki's autopilot for a site. Leave state out to read it: off, trial (it only proposes until started), on or paused, what it did in the last seven days (with why) and what waits for a yes. It adds goals visitors already reach, turns on alerts for goals reached about daily, adds a funnel while the site has few, and ends decided A/B tests; at most 10 changes a day, all undoable with undo_change. It never touches the site, ad accounts, payments, connections or the team; new ad budgets are only proposed. state: on (start trying: it proposes first), start (let it act by itself), pause, resume, off. Only change it when the person asks. |
| `answer_autopilot_proposal` | Yes | Plus: says yes (approve: Okidoki does it and it lands in the change log, undoable) or no (dismiss) to something the autopilot proposes, like next month's ad budget for a channel or, in the trial, a goal it would add. Proposals and their ids are in autopilot. Ask the person first. |
| `get_plan` | No | The account's plan (Free or Plus) and questions left for Okidoki AI. |
| `get_payment_link` | Yes | A payment link for Plus or a pack of extra questions. Give the link to the user to open and pay; nothing is charged until they do. |
| `get_billing_portal_link` | Yes | A link where the user changes their card, sees receipts, switches between monthly and yearly, or cancels Plus. |
| `list_results` | No | Everything the person did that can be compared, newest first: each email send and campaign run (with its days, weekday, channel, where it ran like Instagram or Mailchimp, and visitors), the occasions in the calendar and the notes they wrote down, each with a ref for compare_results. Use it to find "Tuesday's newsletter" or "the Instagram campaign" from the person's words. days: how far back, 7 to 365, default 90. |
| `compare_results` | No | Up to six emails, campaigns, occasions or notes side by side, with the same measures for each, so you can say how they hang together: visitors through the link (and per day), how much busier the whole site was than usual and for how many days, how engaged the visitors were and how many read the landing page to the end, goals per 100 visitors, and on Plus the orders, revenue, cost, cost per goal and return on ad spend. Each item has a plain sentence; the message also says which did best on each measure, only when the numbers are big enough to tell apart. Use it for "how did the newsletter on Tuesday do compared with the Instagram campaign?", "did the email or Black Friday bring more?" or "what did the fair do for the site?". Items are refs from list_results, or written as campaign:<name> (latest run), campaign:<name>@<YYYY-MM-DD> (the run around that day), occasion:<key>@<year>, note:<id> or custom:<from>..<to>:<name>. |
| `list_views` | No | The saved views on a site: a name, filters and a period kept under a link of their own, whether each is pinned on the overview, an Okidoki AI question kept with it, and whether it is sent as a report every Monday or on the 1st, and to whom. |
| `save_view` | Yes | Saves a view: filters and a period under a name, with a link of its own, like "Google in Sweden" as source=google&country=SE&period=30d. pinned shows it on the overview. question keeps an Okidoki AI question with it. schedule weekly or monthly sends it as a report (Plus) to the team, recipients (up to 10 more addresses) and chat_channel_id. A value starting with "!" leaves it out: device=!mobile. |
| `update_view` | Yes | Changes a saved view: rename, pin or unpin, change its filters, or send it as a report (schedule weekly or monthly, Plus) or stop (schedule none). Give only what changes. |
| `remove_view` | Yes | Removes a saved view, and the report it sent. |
| `list_segments` | No | The segments on a site: groups of visits (never people) by filters, like "Newsletter readers" as source=newsletter. A segment works as a filter everywhere (segment=<id>), in alert rules and, when chosen, in the weekly email. |
| `add_segment` | Yes | Adds a segment: a named group of visits by filters, like source=newsletter&country=!SE. in_weekly_email shows it in the weekly email (Plus, up to three). |
| `remove_segment` | Yes | Removes a segment. |
| `compare_side_by_side` | No | Two to four campaigns, pages, sources, countries, devices and more next to each other for the same period: visitors, page views, the change, and goals when comparing pages, places or technology (a goal is never tied to where a visit came from). Use it for "how did the newsletter do against Black Week?" or "mobile or desktop?". |
| `explore` | No | For hard questions that need many numbers at once: one site cut by one or two things together, like sources by device, landing pages by country, channels by weekday, ad creatives (utm_content) or click ID types by device, or weekday by hour, with the period before next to each row. Each row has visitors, the change, the share of all, how many left after one page, and, when not cut by where visits came from, page views, time on page and how many read to the end; give goal to also count a goal per row (only when cut by place, device, browser, language or time, since Okidoki never ties a goal to a page or a source). The card shows bars for one cut and a heat map for two, and the person can switch the measure. Use it for "where do my mobile visitors come from?", "which countries read the most?", "when in the week do people buy?", "which landing pages lose people from Google?" or "compare everything by device". Call it several times to combine angles, then explain what stands out in plain words; every number comes from Okidoki. Use get_report for a single plain list. Up to 93 days. |
| `get_portfolio` | No | Every site in the account on one page, for agencies: visitors, the change, page views, goals reached, and which sites are worth a look (no visits yet, quiet for two days, or down 25 % or more). Start here for "how are all my clients doing?". |
| `list_clients` | No | Every client of an agency on one page: sites grouped per client (by the name in the domain unless someone moved them), visitors over 7 or 30 days, the change, goals reached, revenue, who is responsible, and what needs the agency first (no visits yet, quiet, dropping, what the background agent told, good news to pass on). Start here for "how are all my clients doing?" when the account has many sites. |
| `get_client` | No | One client in detail: its sites with their numbers, visitors per day for 30 days, where visitors came from across its sites, goals reached, what Okidoki noticed, and who gets its monthly report. Use the client key from list_clients. |
| `update_client` | Yes | Renames a client, or chooses who at the agency is responsible for it ("owner" for the account owner, a person id from the team, or null). Give the key from list_clients; an automatic client is saved and gets a new key, returned in the answer. |
| `move_site_to_client` | Yes | Puts a site under another client: give client (a key from list_clients), or name alone to start a new client for it, or neither to send it back to the client its domain points to. |
| `get_client_overview` | No | What a client sees when they open their own link: the widgets in order, the period it opens on, the client links per site, and the templates and widgets to choose from. |
| `set_client_overview` | Yes | Makes the overview a client sees through their own link (Plus): blocks (widgets with sizes s, m, l or xl, from get_client_overview) or a template id, and the period it opens on. to "all" gives every client the same overview. Each site gets a client link, returned in the answer; revenue and costs are never shown to clients. |
| `get_client_report` | No | The monthly report a client gets on the 1st, as they will get it: subject, the summary, what the agency did and how visits went after, and who gets it. month is last (default), this or like 2026-10. |
| `set_client_report` | Yes | Chooses who gets a client's monthly report (report_to, up to ten addresses; an empty list stops it), the agency's own greeting at the top, and the report's language. On Agency also the agency's comment for one month's report (report_comment, with comment_month like 2026-11; null removes it): start from draft_client_comment and let the person read and change it first. Ask the person before adding an address. |
| `draft_client_comment` | No | A draft of the agency's comment for a client's monthly report (Agency): a few sentences from the month's numbers, in the report's language, never claiming that what the agency did caused a change. Nothing is saved or sent. Show it to the person, let them change it, then save it with set_client_report (report_comment, comment_month). |
| `send_client_report` | Yes | Sends a client's monthly report now (Plus): to "me" as a test (the default), or to "client". Always ask the person before sending to the client. |
| `copy_setup` | Yes | Copies goals, funnels and alert rules from one site to the client's other sites (to "client", the default), to every site ("all") or to a list of domains (Plus). What a site already has stays as it is. |
| `list_alerts` | No | The ready-made alerts on a site and whether each is on: spike (traffic jumps), quiet (a whole day without visitors) and goal (a goal not reached for some days). Alerts arrive by email, and in chat channels when connected. |
| `turn_on_alert` | Yes | Turns a ready-made alert on (Plus), or changes one that is on: spike, quiet, or goal with the goal's name or id and days (1 to 30, 3 when left out). |
| `turn_off_alert` | Yes | Turns a ready-made alert off. Get its id from list_alerts. |
| `list_alert_rules` | No | The alert rules of the person's own on a site, each in words like "visitors from google drop 30 % or more from the week before". Checked every morning at 7. |
| `add_alert_rule` | Yes | Adds an alert rule (Plus): tell the person when a measure (visitors, pageviews or a goal) with filters or a segment drops, rises or either by a percent, against the week before (window week) or the same weekday the four weeks before (window day). A goal rule takes page, place and technology filters only. |
| `remove_alert_rule` | Yes | Removes an alert rule. |
| `list_ab_tests` | No | The A/B tests on a site, each with its verdict in words: which version of the page reaches the goal more often, and whether that is chance (early, winner, no_difference or loser), with about how many more views are needed. Repeat the sentence; never call a winner before Okidoki does. |
| `start_ab_test` | Yes | Starts an A/B test (Plus): two to four versions of a page, the first being the one to beat, like ["/pricing", "/pricing-b"], and a goal. The goal counts for a version when reached on that page or, for a page goal, on the page right after. The person sends visitors to the versions in turn (two ad versions, or the site builder's split). |
| `end_ab_test` | Yes | Ends an A/B test today, keeping its result. |
| `run_sql` | No | Runs one SELECT in SQLite on a site's own events for a period (Plus, up to 93 days, at most 1 000 rows back). One table, events: day, hour, ts, type (pageview, event, engagement), path, prev_path, is_entry, source, referrer_domain, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country, region, device, browser, os, language, event_name, event_target, duration_ms, scroll_pct, continued, is_followup, load_ms. Visitors are rows with type = 'pageview' and is_entry = 1. There is no visit or person id, so page views cannot be joined into journeys. Use it when no report answers the question. |
| `make_deploy_hook` | Yes | Gives an address the site's build (Netlify, Vercel, GitHub Actions or any) can call after each deploy, so the day gets a mark on the timeline and a change in the numbers can be tied to a new version. |

Tools that change things need a key that may **read and change**. Tools for one site work with a key for that site or for the whole account; adding sites needs a key for the whole account.

## Ready-made prompts and routines

The server also has prompts, which Claude and other apps show as ready-made starts: **Weekly check-in**, **What should I do next?**, **Set up my site**, **All my sites this morning**, **Watch what matters**, **How are my A/B tests doing?** and **Compare two things**.

Four of them are routines, made to run on a schedule in your AI tool, such as a scheduled task in ChatGPT or Claude. They only read:

| Routine | When | What you get |
| --- | --- | --- |
| **A report every Monday** | Mondays | Last week next to the week before |
| **Morning watch** | Every morning | Anything new on the site since yesterday, in one line when nothing happened |
| **Monthly report** | On the 1st | Last month next to the month before, written so it can be forwarded |
| **Campaign follow-up** | One, three and seven days after a campaign or newsletter | What it brought, next to the one before |

The Claude and ChatGPT plugins have the same routines as the skill **make-it-a-routine**, together with **all my sites on Monday**.

## Example

```json title="tools/call"
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": { "name": "get_summary", "arguments": { "site": "mysite.com", "period": "7d" } }
}
```

The answer's text starts with a sentence like *312 visitors came in the last 7 days, 18% more than the 7 days before.*, followed by the numbers.

## No account yet?

Connecting needs an account. An agent without one can create the account first with `POST /api/v1/start`. See [Set up with an agent](https://docs.okidoki.sh/agents).

