@offerswap/mcp 1.0.0 → 1.1.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 +12 -1
- package/package.json +5 -2
- package/src/index.js +9 -1853
- package/src/tools.js +1885 -0
- package/src/version.js +5 -0
package/README.md
CHANGED
|
@@ -19,6 +19,16 @@ npx @offerswap/mcp
|
|
|
19
19
|
2. Go to **Settings** → **API Keys** → **New Key**
|
|
20
20
|
3. Copy the `bgl_…` token (shown once)
|
|
21
21
|
|
|
22
|
+
## Or skip the install: the hosted server
|
|
23
|
+
|
|
24
|
+
Agents that take a server URL and a header instead of a command (Grok Bot, for one, or anything on a phone or in the cloud) can use the hosted server, with the same tools:
|
|
25
|
+
|
|
26
|
+
- URL: `https://app.offerswap.com/mcp`
|
|
27
|
+
- Transport: remote, Streamable HTTP
|
|
28
|
+
- Header: `Authorization: Bearer bgl_your_key_here`
|
|
29
|
+
|
|
30
|
+
The only difference: the hosted server can't read files on your computer, so `upload_split_test_image` takes `image_url` there, not `file_path`.
|
|
31
|
+
|
|
22
32
|
## Configure your client
|
|
23
33
|
|
|
24
34
|
### Claude Desktop
|
|
@@ -91,6 +101,7 @@ Most MCP clients use the same shape. Point them at the `npx -y @offerswap/mcp` c
|
|
|
91
101
|
| `write_split_test_copy` / `upload_split_test_image` | Write variants with AI (one AI credit each: Small 20, Medium 50, Large 150 a month), and upload a picture for an image variant. |
|
|
92
102
|
| `list_report_views` / `create_report_view` / `update_report_view` / `delete_report_view` / `set_active_report_view` | Saved report views: a name plus the report columns in the user's order, kept on the account. `active` is the view reports open on: `fewer`, `all`, or a view id. Views change which columns show, never the numbers. |
|
|
93
103
|
| `set_account_timezone` | Set the IANA time zone (e.g. `America/New_York`) the account's reports count days, weekdays and hours in, or `null` to clear it. `get_campaign_stats`, `get_tracker_overview` and `get_property_stats` also take `tz` to override it for one call, and echo the zone they used as `timezone`. |
|
|
104
|
+
| `set_sale_alerts` | Turn the "New sale" card on the Dashboard's Realtime map on or off (`enabled`). On by default. Saved on the account. |
|
|
94
105
|
| `list_affiliate_networks` / `create_affiliate_network` / `update_affiliate_network` / `delete_affiliate_network` | Manage affiliate networks. Their sales come back on the account's one postback URL (`get_universal_postback_url`); networks have no postback URL of their own. `conversion_param` is the click id name appended to the network's offer URLs. Set `amazon_tag` (e.g. `yourtagid-20`) on an Amazon network to auto-tag every Amazon link with `?tag=…` at click time. |
|
|
95
106
|
| `list_offers` / `create_offer` / `update_offer` / `archive_offer` | Manage destination URLs ("offers"). Optionally tied to an affiliate network so the right conversion-param name is propagated on outbound clicks. An offer has no short link of its own; the link for an ad comes from a campaign. `list_offers` shows each offer's campaign links. Offers are archived, never deleted (`archive_offer`; `update_offer` `archived=false` restores; `list_offers` `include_archived`). |
|
|
96
107
|
| `create_offer_link` | Get a shareable link for an offer: makes the simplest campaign, every click to the offer. |
|
|
@@ -106,7 +117,7 @@ Most MCP clients use the same shape. Point them at the `npx -y @offerswap/mcp` c
|
|
|
106
117
|
| `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. |
|
|
107
118
|
| `list_property_pages` | Distinct pages seen across all the user's properties (most-viewed first): `{ url, path, title, property_name, views }`. Any page here can be used as a campaign **lander**: pass its `url` to `create_lander`, then wire that lander into a campaign flow with `set_campaign_flow`. |
|
|
108
119
|
| `get_tracker_overview` | Unified Tracker dashboard across **both** streams (sites + campaigns) in one call: totals (page views / visitors / visits / offer clicks / conversions / revenue), daily activity, country/device/browser breakdowns, per-property + per-campaign rollups (each campaign with `lander_views` and `direct_lander`), a **per-UTM-campaign** rollup (auto-detected Google `utm_*` tags), a per-`utm_source` rollup with sales credited to the visit's UTMs, and the 50 most recent events. Window: `days` or `from`/`to`; scope with `offer_id` or `property_id`. The "is everything running and getting traffic?" view. |
|
|
109
|
-
| `get_realtime` | The last 30 minutes across every campaign and property, Google Analytics Realtime style: active people in the last 30 and 5 minutes, a count per minute, active people by campaign, page views by page, the funnel in order (page views, visits, offer clicks, custom events, sales, upsells) with events and people, and people per city with coordinates, plus gross revenue since midnight (`revenue_today`, before refunds and chargebacks) and net (`net_revenue_today`), optional `tz`. Bots are left out. |
|
|
120
|
+
| `get_realtime` | The last 30 minutes across every campaign and property, Google Analytics Realtime style: active people in the last 30 and 5 minutes, a count per minute, active people by campaign, page views by page, the funnel in order (page views, visits, offer clicks, custom events, sales, upsells) with events and people, and people per city with coordinates, plus gross revenue since midnight (`revenue_today`, before refunds and chargebacks) and net (`net_revenue_today`), and the newest sales of the last 30 minutes with offer and city (`recent_sales`), optional `tz`. Bots are left out. |
|
|
110
121
|
| `get_tracker_events` | Unified event log across both streams with full **search / filter / sort** over auto-detected UTM tags. `q` free-text, `stream`, `event`, exact `utm_*` filters, scope by `campaign_id` / `offer_id` / `property_id` / `link_id`, `days` or `from`/`to`, `sort`/`dir` on any column, pagination. Campaign rows carry the location, IP and UTMs of the visit on their click. Returns events + `facets` (distinct UTM values) + `total`. |
|
|
111
122
|
|
|
112
123
|
## Example prompts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@offerswap/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "MCP server for OfferSwap (offerswap.com, formerly buygolinks): branded short links, campaign tracking, postbacks and reports from any MCP-compatible AI agent (Claude Desktop, Cursor, Cline, Continue, Hermes).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -29,5 +29,8 @@
|
|
|
29
29
|
"buygolinks"
|
|
30
30
|
],
|
|
31
31
|
"homepage": "https://offerswap.com",
|
|
32
|
-
"license": "MIT"
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"scripts": {
|
|
34
|
+
"prepublishOnly": "node -e \"import('./src/version.js').then(m=>{const v=require('./package.json').version;if(m.VERSION!==v){console.error('src/version.js says '+m.VERSION+' but package.json says '+v+'. Make them match.');process.exit(1)}})\""
|
|
35
|
+
}
|
|
33
36
|
}
|