pubweb-ads-mcp 0.1.0 → 0.2.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 +3 -0
- package/package.json +1 -1
- package/src/index.js +37 -1
package/README.md
CHANGED
|
@@ -53,6 +53,9 @@ PUBWEB_API_KEY=... npm run smoke # lists the tools (sanity check)
|
|
|
53
53
|
| `ad_media(id)` | Presigned image/video URLs (30-min TTL) |
|
|
54
54
|
| `ad_funnel(id)` | The ad's landing→destination funnel |
|
|
55
55
|
| `targets_list()` | Competitor domains you track, with ad counts |
|
|
56
|
+
| `adx_kpis(site?, from?, to?)` | AdX ad-serving funnel KPIs for **your** sites (requests/fills/viewability/ctr) — needs `v1:adx:read` |
|
|
57
|
+
| `adx_timeseries(site?, from?, to?, granularity?)` | AdX funnel over time (hour/day/week) |
|
|
58
|
+
| `adx_fill_report(site?, from?, to?)` | AdX funnel by block / country / price bucket / size / device |
|
|
56
59
|
| `whoami()` | Verify the key + see its abilities (setup/debug) |
|
|
57
60
|
|
|
58
61
|
## Security
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pubweb-ads-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "MCP server exposing the pubweb Ads knowledge base (semantic search over scraped competitor ads, with media + funnels) to Claude and other MCP clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
13
13
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
14
14
|
import { z } from 'zod';
|
|
15
15
|
|
|
16
|
-
const VERSION = '0.
|
|
16
|
+
const VERSION = '0.2.0';
|
|
17
17
|
const API_URL = (process.env.PUBWEB_API_URL || 'https://app.pubweb.ai').replace(/\/+$/, '');
|
|
18
18
|
const API_KEY = process.env.PUBWEB_API_KEY;
|
|
19
19
|
|
|
@@ -131,6 +131,42 @@ server.tool(
|
|
|
131
131
|
async () => run(() => apiGet('/me')),
|
|
132
132
|
);
|
|
133
133
|
|
|
134
|
+
// ── AdX ad-serving telemetry (your own sites — needs ability v1:adx:read) ──
|
|
135
|
+
|
|
136
|
+
server.tool(
|
|
137
|
+
'adx_kpis',
|
|
138
|
+
'AdX ad-serving funnel KPIs over a window for YOUR sites: requests, fills, unfills, viewables, clicks, refreshes + derived fill_rate, viewability, ctr. No revenue/cost — funnel health only.',
|
|
139
|
+
{
|
|
140
|
+
site: z.string().optional().describe('One of your site ids (default: all your sites)'),
|
|
141
|
+
from: z.string().optional().describe('ISO date — start (default: 7 days ago)'),
|
|
142
|
+
to: z.string().optional().describe('ISO date — end (default: now)'),
|
|
143
|
+
},
|
|
144
|
+
async (args) => run(() => apiGet('/adx/kpis', args)),
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
server.tool(
|
|
148
|
+
'adx_timeseries',
|
|
149
|
+
'AdX funnel per time bucket (hour | day | week) for your sites — the same counters as adx_kpis over time.',
|
|
150
|
+
{
|
|
151
|
+
site: z.string().optional(),
|
|
152
|
+
from: z.string().optional(),
|
|
153
|
+
to: z.string().optional(),
|
|
154
|
+
granularity: z.enum(['hour', 'day', 'week']).optional().describe('Bucket size (default: day)'),
|
|
155
|
+
},
|
|
156
|
+
async (args) => run(() => apiGet('/adx/timeseries', args)),
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
server.tool(
|
|
160
|
+
'adx_fill_report',
|
|
161
|
+
'AdX funnel broken down by block (code), country (cc), price_rule (floor ladder bucket), brand-safety, size and device.',
|
|
162
|
+
{
|
|
163
|
+
site: z.string().optional(),
|
|
164
|
+
from: z.string().optional(),
|
|
165
|
+
to: z.string().optional(),
|
|
166
|
+
},
|
|
167
|
+
async (args) => run(() => apiGet('/adx/fill-report', args)),
|
|
168
|
+
);
|
|
169
|
+
|
|
134
170
|
const transport = new StdioServerTransport();
|
|
135
171
|
await server.connect(transport);
|
|
136
172
|
console.error(`[pubweb-ads-mcp] ready → ${API_URL}/api/v1`);
|