@buygolinks/mcp 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/index.js +12 -1
package/README.md
CHANGED
|
@@ -81,7 +81,7 @@ Most MCP clients use the same shape. Point them at the `npx -y @buygolinks/mcp`
|
|
|
81
81
|
| `list_campaigns` / `create_campaign` / `get_campaign` / `update_campaign` / `delete_campaign` / `duplicate_campaign` | Manage campaigns. `duplicate_campaign` deep-copies a campaign (settings + full routing flow + offer/lander pools) into a fresh short link named `COPY - {name}` (`COPY (1) - …` when copying a copy); stats and the unique direct-link tags are not carried over. One campaign = one tracked short link + N offers (weighted) + N optional landers + a per-campaign postback URL + a pixel snippet. A campaign references one saved traffic source via `traffic_source_id` and an optional `conversion_pixel_id` + `conversion_event` that fires **server-side via the pixel's CAPI token** when the campaign converts (a pixel with no CAPI token can't fire back). `report_value_mode` controls the value reported back — `payout` (real), `fixed` (a set number), or `adjusted` (payout − `report_value_adjust_pct`% − `report_value_adjust_flat`) so you can withhold your margin. Each campaign also returns a `click_url` (`…/click`) — the single, campaign-agnostic lander CTA link (same on every campaign, so one lander serves many) that always resolves to an offer (never a dead page); the campaign is read from the visitor's cookie or the ad's `?utm_campaign={slug}` (matched against any of the campaign's direct-link tags) forwarded onto the CTA. As of **0.22.0**, `create_campaign`/`update_campaign` gained **`direct_slugs`** — a campaign can claim MULTIPLE direct-link tags (an array of strings or `{ slug, label }` objects, each routing through the campaign's flow) so you run traffic straight to a lander with no tracker hop (`?utm_campaign={slug}` resolves the campaign at `/click` and stitches via the property tag); handy for migrating an older campaign or turning a lander already getting direct traffic into a campaign. The legacy single `direct_slug` is deprecated but still accepted (responses mirror it to the oldest slug). `fallback_url` is the never-dead-end guarantee. |
|
|
82
82
|
| `set_campaign_offers` / `set_campaign_landers` | Replace the campaign's offer/lander split. Items are `{ offer_id, weight }` / `{ lander_id, weight }`. |
|
|
83
83
|
| `get_campaign_flow` / `set_campaign_flow` | Read/replace the campaign's **routing flow graph** (n8n-style). Nodes are `source` (one entry) / `lander` / `offer`; weighted edges go source→lander, source→offer, or lander→offer. The resolver walks this graph per click so a specific lander routes to its own specific offers — use it to split-test offers, divert a lander to a different offer, or insert a landing page before an offer. Saving also re-derives the flat offer/lander pools. |
|
|
84
|
-
| `get_campaign_stats` | Full campaign report: visits, lander views, offer clicks, conversions, revenue, cost, profit, CTR/CR/EPC/ROI, recent events, plus Voluum-style `breakdowns` — grouped rows (`{key, visits, clicks, conversions, revenue, ctr, cr, epc}`) for
|
|
84
|
+
| `get_campaign_stats` | Full campaign report: visits, lander views, offer clicks, conversions, revenue, cost, profit, CTR/CR/EPC/ROI, recent events, plus Voluum-style `breakdowns` — grouped rows (`{key, visits, clicks, conversions, revenue, ctr, cr, epc}`) for 8 dimensions: utm_campaign / utm_source / utm_content / utm_term / offer / country / device / day. Downstream events attribute to the utm values of the visit that minted their click_id; the `offer` dimension attributes each visit to the offer its click routed to (keyed by offer name); empty values group as `(none)`. **Drill-down:** pass any dimension as a filter (e.g. `utm_campaign` + read `breakdowns.offer` to see which split-test offer converts for that ad) — the whole report narrows to that slice; filters combine. Window: rolling `days` or an explicit `from`/`to` range. |
|
|
85
85
|
| `list_properties` / `create_property` / `get_property` / `update_property` / `delete_property` | Manage **properties** — GTM/GA-style site containers. One property = one universal tag (`/t.js?p={key}`) the user installs on every page of their site. Every page auto-reports pageviews, time-on-page, scroll, outbound clicks, and conversions; campaign traffic auto-attributes by click. `create_property` requires an active custom domain (the tag is served first-party from the user's own domain so it tracks on iOS/Safari) and returns the bound `tracking_domain` + install `snippet`. |
|
|
86
86
|
| `set_property_campaigns` | Link/unlink campaigns to a property (many-to-many, for the source split in reports). Items are `{ campaign_id }`. |
|
|
87
87
|
| `get_property_stats` | Full property report: page views, unique visitors, outbound, conversions, revenue, avg time/scroll, top pages, source split (organic vs campaign), country/device/browser/referrer breakdowns, recent events. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buygolinks/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "MCP server for buygolinks.com — create and manage branded short links with Amazon affiliate geo-routing from any MCP-compatible AI agent (Claude Desktop, Cursor, Cline, Continue, Hermes).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/index.js
CHANGED
|
@@ -615,7 +615,7 @@ const TOOLS = [
|
|
|
615
615
|
{
|
|
616
616
|
name: 'get_campaign_stats',
|
|
617
617
|
description:
|
|
618
|
-
'Get a campaign\'s full report: totals (visits / unique / lander_views / offer_clicks / conversions / revenue / cost / profit / CTR / CR / EPC / ROI), by_day / by_country / by_device / by_browser / by_referrer / by_hour, per-offer and per-lander performance, the 50 most recent events, and `breakdowns` — Voluum-style grouped report rows for
|
|
618
|
+
'Get a campaign\'s full report: totals (visits / unique / lander_views / offer_clicks / conversions / revenue / cost / profit / CTR / CR / EPC / ROI), by_day / by_country / by_device / by_browser / by_referrer / by_hour, per-offer and per-lander performance, the 50 most recent events, and `breakdowns` — Voluum-style grouped report rows for 8 dimensions (utm_campaign / utm_source / utm_content / utm_term / offer / country / device / day), each row {key, visits, clicks, conversions, revenue, ctr, cr, epc}. Offer clicks and conversions are attributed to the utm values of the visit that minted their click_id (postback conversions landing after the visit included); the `offer` dimension attributes each visit to the offer its click routed to (keyed by offer NAME), so split-test rows read correctly; traffic with no value groups under "(none)". DRILL-DOWN: pass any dimension as a filter (e.g. utm_campaign="Summer Sale", or offer="My Offer") and the WHOLE report — totals, by_day, breakdowns — narrows to that traffic slice; combine filters to drill deeper (e.g. utm_campaign + group the result\'s `breakdowns.offer` to see which offer converts for that ad). Pass "(none)" to match events with no value.',
|
|
619
619
|
inputSchema: {
|
|
620
620
|
type: 'object',
|
|
621
621
|
properties: {
|
|
@@ -623,6 +623,14 @@ const TOOLS = [
|
|
|
623
623
|
days: { type: 'number', description: 'Rolling window size in days (1–90). Defaults to 14. Ignored when `from` is set.' },
|
|
624
624
|
from: { type: 'string', description: 'ISO date/datetime — start of an explicit closed range (overrides days).' },
|
|
625
625
|
to: { type: 'string', description: 'ISO date/datetime — end of the explicit range. Defaults to now when omitted.' },
|
|
626
|
+
utm_campaign: { type: 'string', description: 'Drill-down filter: only traffic whose minting visit carried this utm_campaign.' },
|
|
627
|
+
utm_source: { type: 'string', description: 'Drill-down filter by utm_source.' },
|
|
628
|
+
utm_content: { type: 'string', description: 'Drill-down filter by utm_content.' },
|
|
629
|
+
utm_term: { type: 'string', description: 'Drill-down filter by utm_term.' },
|
|
630
|
+
offer: { type: 'string', description: 'Drill-down filter by offer NAME (as returned in breakdowns.offer keys).' },
|
|
631
|
+
country: { type: 'string', description: 'Drill-down filter by ISO2 country of the minting visit.' },
|
|
632
|
+
device: { type: 'string', description: 'Drill-down filter by device of the minting visit.' },
|
|
633
|
+
day: { type: 'string', description: 'Drill-down filter by UTC day (YYYY-MM-DD) of the minting visit.' },
|
|
626
634
|
},
|
|
627
635
|
required: ['campaign_id'],
|
|
628
636
|
},
|
|
@@ -1080,6 +1088,9 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
1080
1088
|
if (args?.from) qs.set('from', String(args.from));
|
|
1081
1089
|
if (args?.to) qs.set('to', String(args.to));
|
|
1082
1090
|
if (args?.days && !args?.from) qs.set('days', String(Number(args.days)));
|
|
1091
|
+
for (const dim of ['utm_campaign', 'utm_source', 'utm_content', 'utm_term', 'offer', 'country', 'device', 'day']) {
|
|
1092
|
+
if (args?.[dim]) qs.set(dim, String(args[dim]));
|
|
1093
|
+
}
|
|
1083
1094
|
const q = qs.toString();
|
|
1084
1095
|
result = await api(`/api/campaigns/${Number(args.campaign_id)}/stats${q ? `?${q}` : ''}`);
|
|
1085
1096
|
break;
|