@buygolinks/mcp 0.23.0 → 0.25.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 +2 -2
- package/package.json +1 -1
- package/src/index.js +17 -19
package/README.md
CHANGED
|
@@ -72,6 +72,7 @@ Most MCP clients use the same shape. Point them at the `npx -y @buygolinks/mcp`
|
|
|
72
72
|
| `create_domain` | Register a new branded domain (e.g. `go.acme.com`). Returns the CNAME target. |
|
|
73
73
|
| `verify_domain` | Force a fresh Cloudflare status check after DNS is added. |
|
|
74
74
|
| `delete_domain` | Remove a branded domain. |
|
|
75
|
+
| `get_universal_postback_url` | Get the account's **universal postback URL** (Voluum-style, `/postback/u/{token}`): ONE URL that works for every campaign and every network. It matches the click by `clickid` (alias `cid`) and credits whichever campaign the click belongs to — paste it once into any network's S2S settings or your own webhook (n8n, Zapier, store order webhooks) and never update it again. Optional `payout`, `currency`, `txid` params. Prefer this over per-campaign/per-network postbacks unless you want campaign-scoped validation. |
|
|
75
76
|
| `list_affiliate_networks` / `create_affiliate_network` / `update_affiliate_network` / `delete_affiliate_network` | Manage affiliate networks. Each network exposes a per-network postback URL (`/postback/n/{token}`) the user pastes into the network's S2S settings. Set `amazon_tag` (e.g. `yourtagid-20`) on an Amazon network to auto-tag every Amazon link with `?tag=…` at click time. |
|
|
76
77
|
| `list_offers` / `create_offer` / `update_offer` / `delete_offer` | Manage destination URLs ("offers"). Optionally tied to an affiliate network so the right conversion-param name is propagated on outbound clicks. |
|
|
77
78
|
| `list_landers` / `create_lander` / `update_lander` / `delete_lander` | Manage landing pages. Lander URLs may contain `{clickid}` tokens which the resolver expands. |
|
|
@@ -80,8 +81,7 @@ Most MCP clients use the same shape. Point them at the `npx -y @buygolinks/mcp`
|
|
|
80
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. |
|
|
81
82
|
| `set_campaign_offers` / `set_campaign_landers` | Replace the campaign's offer/lander split. Items are `{ offer_id, weight }` / `{ lander_id, weight }`. |
|
|
82
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. |
|
|
83
|
-
| `get_campaign_stats` | Full campaign report
|
|
84
|
-
| `get_campaign_funnel` | Per-landing-page funnel (PROPERTY tag stream): each page's views, unique views, CTA clicks, conversions, page CTR & CVR, plus `paid_facebook_views` (pageviews carrying an fbclid). The right report for **direct-link** campaigns (ad → lander, no tracker hop). |
|
|
84
|
+
| `get_campaign_stats` | Full campaign report: visits, lander views, offer clicks, conversions, revenue, cost, profit, CTR/CR/EPC/ROI, breakdowns, recent events. |
|
|
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.25.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
|
@@ -197,6 +197,12 @@ const TOOLS = [
|
|
|
197
197
|
},
|
|
198
198
|
|
|
199
199
|
// ─── Tracker: affiliate networks ────────────────────────────────────────
|
|
200
|
+
{
|
|
201
|
+
name: 'get_universal_postback_url',
|
|
202
|
+
description:
|
|
203
|
+
'Get the account\'s UNIVERSAL postback URL (Voluum-style): ONE URL that works for every campaign and every affiliate network. It matches the click by click_id alone and credits whichever campaign the click belongs to, so the user pastes it once into any network\'s S2S settings or their own webhook (n8n, Zapier, a store\'s order webhook) and never updates it again. Format: https://buygolinks.com/postback/u/{token}?clickid={clickid}&payout={payout}¤cy={currency}&txid={txid} — payout/currency/txid optional; `cid` is accepted as an alias for `clickid`. Prefer this over per-campaign or per-network postback URLs unless the user explicitly wants campaign-scoped validation (the per-campaign URL rejects clicks from other campaigns with a 400).',
|
|
204
|
+
inputSchema: { type: 'object', properties: {} },
|
|
205
|
+
},
|
|
200
206
|
{
|
|
201
207
|
name: 'list_affiliate_networks',
|
|
202
208
|
description:
|
|
@@ -609,7 +615,7 @@ const TOOLS = [
|
|
|
609
615
|
{
|
|
610
616
|
name: 'get_campaign_stats',
|
|
611
617
|
description:
|
|
612
|
-
'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, and the 50 most recent events.
|
|
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, and the 50 most recent events.',
|
|
613
619
|
inputSchema: {
|
|
614
620
|
type: 'object',
|
|
615
621
|
properties: {
|
|
@@ -619,19 +625,6 @@ const TOOLS = [
|
|
|
619
625
|
required: ['campaign_id'],
|
|
620
626
|
},
|
|
621
627
|
},
|
|
622
|
-
{
|
|
623
|
-
name: 'get_campaign_funnel',
|
|
624
|
-
description:
|
|
625
|
-
'Get a campaign\'s per-landing-page funnel from the PROPERTY tag stream: for each page, its views, unique views, CTA clicks (outbound), conversions, and the derived page CTR (CTA clicks ÷ views) and CVR (conversions ÷ views). Also returns campaign totals including paid_facebook_views (pageviews carrying an fbclid — i.e. paid Facebook/Instagram traffic). This is the right tool for DIRECT-LINK campaigns where the ad points straight at the landing page (no buygolinks hop) and answers "what is the click-through rate of my landing page?". Requires the page to have the Property tag installed and the ad URL to carry ?utm_campaign={direct_slug}.',
|
|
626
|
-
inputSchema: {
|
|
627
|
-
type: 'object',
|
|
628
|
-
properties: {
|
|
629
|
-
campaign_id: { type: 'number' },
|
|
630
|
-
days: { type: 'number', description: 'Window size in days (1–90). Defaults to 30.' },
|
|
631
|
-
},
|
|
632
|
-
required: ['campaign_id'],
|
|
633
|
-
},
|
|
634
|
-
},
|
|
635
628
|
|
|
636
629
|
// ─── Tracker: properties (GTM/GA-style site containers) ─────────────────
|
|
637
630
|
{
|
|
@@ -845,6 +838,16 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
845
838
|
}
|
|
846
839
|
|
|
847
840
|
// ── Tracker: networks ──
|
|
841
|
+
case 'get_universal_postback_url': {
|
|
842
|
+
const me = await api('/api/me');
|
|
843
|
+
const base = me.user && me.user.postback_url;
|
|
844
|
+
result = {
|
|
845
|
+
postback_url: base,
|
|
846
|
+
template: base ? `${base}?clickid=REPLACE&payout=OPTIONAL¤cy=OPTIONAL&txid=OPTIONAL` : null,
|
|
847
|
+
note: 'Universal: works for every campaign and every network. payout/currency/txid are optional; cid is accepted as an alias for clickid.',
|
|
848
|
+
};
|
|
849
|
+
break;
|
|
850
|
+
}
|
|
848
851
|
case 'list_affiliate_networks': {
|
|
849
852
|
result = await api('/api/affiliate-networks');
|
|
850
853
|
break;
|
|
@@ -1075,11 +1078,6 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
1075
1078
|
result = await api(`/api/campaigns/${Number(args.campaign_id)}/stats${days}`);
|
|
1076
1079
|
break;
|
|
1077
1080
|
}
|
|
1078
|
-
case 'get_campaign_funnel': {
|
|
1079
|
-
const days = args?.days ? `?days=${Number(args.days)}` : '';
|
|
1080
|
-
result = await api(`/api/campaigns/${Number(args.campaign_id)}/funnel${days}`);
|
|
1081
|
-
break;
|
|
1082
|
-
}
|
|
1083
1081
|
|
|
1084
1082
|
case 'list_properties': {
|
|
1085
1083
|
result = await api('/api/properties');
|