@buygolinks/mcp 0.20.0 → 0.21.1
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 +6 -2
package/README.md
CHANGED
|
@@ -72,12 +72,12 @@ 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
|
-
| `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. |
|
|
75
|
+
| `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
76
|
| `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
77
|
| `list_landers` / `create_lander` / `update_lander` / `delete_lander` | Manage landing pages. Lander URLs may contain `{clickid}` tokens which the resolver expands. |
|
|
78
78
|
| `list_traffic_sources` / `create_traffic_source` / `update_traffic_source` / `delete_traffic_source` | Manage **traffic sources** — the platforms you buy traffic from (Facebook, TikTok, Google, …). Each has a `name`, optional `platform`, and `token_params` mapping the source's click macros onto sub1..sub5 (e.g. Facebook sub1 = Ad ID `{{ad.id}}`). `list_traffic_sources` returns a `presets` catalog. Campaigns reference one via `traffic_source_id`. |
|
|
79
79
|
| `list_tracking_pixels` / `create_tracking_pixel` / `update_tracking_pixel` / `delete_tracking_pixel` | Manage ad-platform pixels (Facebook, Google, TikTok, …). Each pixel has a `default_event` (e.g. `Purchase`, `Lead`, `CompletePayment`) and, for Facebook/TikTok, an optional server-side Conversions API `capi_token`. `list_tracking_pixels` also returns a `platforms` catalog with each platform's valid `events`, `defaultEvent`, and `capi` support. Pixels fire on short-link clicks and can be chosen as a campaign's conversion pixel. |
|
|
80
|
-
| `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 slug 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
|
|
80
|
+
| `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 slug 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={direct_slug}` forwarded onto the CTA. Set `direct_slug` to run traffic straight to a lander with no tracker hop (`?utm_campaign={direct_slug}` resolves the campaign at `/click` and stitches via the property tag); `fallback_url` is the never-dead-end guarantee. |
|
|
81
81
|
| `set_campaign_offers` / `set_campaign_landers` | Replace the campaign's offer/lander split. Items are `{ offer_id, weight }` / `{ lander_id, weight }`. |
|
|
82
82
|
| `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
83
|
| `get_campaign_stats` | Full campaign report: visits, lander views, offer clicks, conversions, revenue, cost, profit, CTR/CR/EPC/ROI, breakdowns, recent events. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buygolinks/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.1",
|
|
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
|
@@ -206,7 +206,7 @@ const TOOLS = [
|
|
|
206
206
|
{
|
|
207
207
|
name: 'create_affiliate_network',
|
|
208
208
|
description:
|
|
209
|
-
'Add a new affiliate network. The server mints a per-network postback URL (https://buygolinks.com/postback/n/{token}) the user pastes into the network. The postback accepts ?{conversion_param}={clickid}&{payout_param}={payout}&{currency_param}={currency}&{txid_param}={txid} — payout, currency, and txid are optional. Returns the network row including postback_url.',
|
|
209
|
+
'Add a new affiliate network. The server mints a per-network postback URL (https://buygolinks.com/postback/n/{token}) the user pastes into the network. The postback accepts ?{conversion_param}={clickid}&{payout_param}={payout}&{currency_param}={currency}&{txid_param}={txid} — payout, currency, and txid are optional. Returns the network row including postback_url. For Amazon Associates, set amazon_tag (e.g. "yourtagid-20"): every Amazon destination link the user adds is then auto-tagged with ?tag={amazon_tag} at click time (a tag already on the URL always wins).',
|
|
210
210
|
inputSchema: {
|
|
211
211
|
type: 'object',
|
|
212
212
|
properties: {
|
|
@@ -215,13 +215,14 @@ const TOOLS = [
|
|
|
215
215
|
payout_param: { type: 'string', description: 'What the network calls the payout amount (default "payout").' },
|
|
216
216
|
currency_param: { type: 'string', description: 'What the network calls the currency code (default "currency").' },
|
|
217
217
|
txid_param: { type: 'string', description: 'What the network calls the transaction/order id in its postback (default "txid"). Stored on the conversion for reconciliation/dedupe.' },
|
|
218
|
+
amazon_tag: { type: 'string', description: 'Amazon Associates tracking tag (e.g. "yourtagid-20"). When set, Amazon links are auto-converted to affiliate links by appending ?tag={amazon_tag} on each click.' },
|
|
218
219
|
},
|
|
219
220
|
required: ['name'],
|
|
220
221
|
},
|
|
221
222
|
},
|
|
222
223
|
{
|
|
223
224
|
name: 'update_affiliate_network',
|
|
224
|
-
description: 'Update an affiliate network (rename
|
|
225
|
+
description: 'Update an affiliate network (rename, change postback param names, or set the Amazon Associates amazon_tag — pass an empty string to clear it). Pass archived=true to soft-archive.',
|
|
225
226
|
inputSchema: {
|
|
226
227
|
type: 'object',
|
|
227
228
|
properties: {
|
|
@@ -231,6 +232,7 @@ const TOOLS = [
|
|
|
231
232
|
payout_param: { type: 'string' },
|
|
232
233
|
currency_param: { type: 'string' },
|
|
233
234
|
txid_param: { type: 'string' },
|
|
235
|
+
amazon_tag: { type: 'string', description: 'Amazon Associates tracking tag (e.g. "yourtagid-20"); empty string clears it.' },
|
|
234
236
|
archived: { type: 'boolean' },
|
|
235
237
|
},
|
|
236
238
|
required: ['network_id'],
|
|
@@ -838,6 +840,7 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
838
840
|
if (typeof args.payout_param === 'string') body.payout_param = args.payout_param;
|
|
839
841
|
if (typeof args.currency_param === 'string') body.currency_param = args.currency_param;
|
|
840
842
|
if (typeof args.txid_param === 'string') body.txid_param = args.txid_param;
|
|
843
|
+
if (typeof args.amazon_tag === 'string') body.amazon_tag = args.amazon_tag;
|
|
841
844
|
result = await api('/api/affiliate-networks', { method: 'POST', body: JSON.stringify(body) });
|
|
842
845
|
break;
|
|
843
846
|
}
|
|
@@ -848,6 +851,7 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
848
851
|
if (typeof args.payout_param === 'string') body.payout_param = args.payout_param;
|
|
849
852
|
if (typeof args.currency_param === 'string') body.currency_param = args.currency_param;
|
|
850
853
|
if (typeof args.txid_param === 'string') body.txid_param = args.txid_param;
|
|
854
|
+
if (typeof args.amazon_tag === 'string') body.amazon_tag = args.amazon_tag;
|
|
851
855
|
if (typeof args.archived === 'boolean') body.archived = args.archived;
|
|
852
856
|
result = await api(`/api/affiliate-networks/${Number(args.network_id)}`, { method: 'PATCH', body: JSON.stringify(body) });
|
|
853
857
|
break;
|