@mambalabsdev/mcp-pinterest-brand-presence-mapper 1.1.0 → 1.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 +14 -0
- package/build/index.js +14 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -51,6 +51,7 @@ Tool: `map_pinterest_brand_presence`
|
|
|
51
51
|
| `handle` | string | Optional. The Pinterest username from pinterest.com/<handle>. Supplying it skips discovery and, more importantly, skips the identity risk: Pinterest handles are rarely the domain stem. |
|
|
52
52
|
| `includeFollowerCounts` | boolean | Default true: the profile page is fetched and the follower counts are extracted. Set false to resolve the profile URL only, which is cheaper and needs no proxy. |
|
|
53
53
|
| `skipCache` | boolean | Default false: a successful lookup is cached for seven days and reused. Set true to force a fresh fetch. |
|
|
54
|
+
| `max_charge_usd` | number | Optional spending cap for this call, in USD. The actor stops before any charge that would take the run past this amount and keeps every row already charged. |
|
|
54
55
|
|
|
55
56
|
## Reading the output
|
|
56
57
|
|
|
@@ -70,6 +71,19 @@ first. The vocabulary is the same across the whole Mamba Labs social family:
|
|
|
70
71
|
answer is no. `null` means we could not look. If you filter for companies with no
|
|
71
72
|
presence, filter on `false`, because `null` rows are unknown rather than absent.
|
|
72
73
|
|
|
74
|
+
## Pricing
|
|
75
|
+
|
|
76
|
+
You pay per event on Apify, billed to your own Apify account. Prices from the live pricing record, read 2026-10-16:
|
|
77
|
+
|
|
78
|
+
| Event | Price per event (USD) | Fires when |
|
|
79
|
+
| --- | --- | --- |
|
|
80
|
+
| `apify-actor-start` | $0.00005 | Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). |
|
|
81
|
+
| `company-checked` | $0.0035 on the Free plan, down to $0.00245 on higher Apify plans | Once per company for which the discovery cascade completed and a non degraded row was produced, whether or not a Pinterest profile was found. Does not fire on a degraded row, because on a degraded row no discovery was performed. |
|
|
82
|
+
| `profile-resolved` | $0.003 on the Free plan, down to $0.0021 on higher Apify plans | Once per company whose candidate Pinterest URL passed the identity gate. Fires on the validation work, not on a populated count. A candidate dropped as an impersonator does not charge: the work was done and the honest answer is that there is no such profile. |
|
|
83
|
+
| `follower-count-extracted` | $0.0025 on the Free plan, down to $0.00175 on higher Apify plans | Once per company where a numeric follower count was read off the public page. Does not fire on not_extractable, blocked, identity_mismatch or url only runs. |
|
|
84
|
+
|
|
85
|
+
The [actor's Apify page](https://apify.com/mambalabs/pinterest-brand-presence-mapper) carries the current prices. Running this server consumes Apify credits.
|
|
86
|
+
|
|
73
87
|
## Full actor documentation
|
|
74
88
|
|
|
75
89
|
[apify.com/mambalabs/pinterest-brand-presence-mapper](https://apify.com/mambalabs/pinterest-brand-presence-mapper)
|
package/build/index.js
CHANGED
|
@@ -5,6 +5,13 @@ import { dirname, join } from "node:path";
|
|
|
5
5
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
6
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
+
// Optional per call spending cap, passed through to the actor's own max_charge_usd
|
|
9
|
+
// input. The actor enforces it; this wrapper only forwards it when set.
|
|
10
|
+
const MAX_CHARGE_USD = z
|
|
11
|
+
.number()
|
|
12
|
+
.min(0)
|
|
13
|
+
.optional()
|
|
14
|
+
.describe("Optional spending cap for this call, in USD, passed to the actor as max_charge_usd. The run stops before any charge that would take it past this amount and keeps every row already charged. Leave empty to rely only on the maximum charge per run set on your Apify account.");
|
|
8
15
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
9
16
|
const pkg = JSON.parse(readFileSync(join(here, "..", "package.json"), "utf8"));
|
|
10
17
|
// Distinctive UA so Apify run meta.userAgent marks MCP-originated runs.
|
|
@@ -42,7 +49,9 @@ function boolToString(v) {
|
|
|
42
49
|
}
|
|
43
50
|
// actorPath is the actor's IMMUTABLE Apify actor id, not its slug, so a Store
|
|
44
51
|
// rename never breaks these calls.
|
|
45
|
-
async function runActor(actorPath, actorLabel, input) {
|
|
52
|
+
async function runActor(actorPath, actorLabel, input, maxChargeUsd) {
|
|
53
|
+
if (maxChargeUsd !== undefined)
|
|
54
|
+
input = { ...input, max_charge_usd: maxChargeUsd };
|
|
46
55
|
if (!APIFY_TOKEN) {
|
|
47
56
|
return { isError: true, content: [{ type: "text", text: "APIFY_TOKEN is not set. Create a token at https://console.apify.com/account/integrations and set it as the APIFY_TOKEN environment variable." }] };
|
|
48
57
|
}
|
|
@@ -178,7 +187,7 @@ server.registerTool("map_pinterest_brand_presence", {
|
|
|
178
187
|
description: "Resolve a company domain to its Pinterest business account and return EXACT follower, following, pin and board counts, plus the claimed website, verified merchant status and last pin date, as one flat Clay ready row. Pinterest serves real integers, so these counts can be summed across a list. Board count is a better activity signal than followers for a consumer brand, because boards are curation effort. Pinterest handles are rarely the domain stem, so a guessed account that fails the identity check is reported as identity_mismatch with no counts rather than returning a stranger's numbers. Read only; requires an APIFY_TOKEN and consumes Apify credits per call.",
|
|
179
188
|
annotations: {
|
|
180
189
|
title: "Map Pinterest Brand Presence",
|
|
181
|
-
readOnlyHint:
|
|
190
|
+
readOnlyHint: false,
|
|
182
191
|
destructiveHint: false,
|
|
183
192
|
idempotentHint: true,
|
|
184
193
|
openWorldHint: true,
|
|
@@ -199,15 +208,16 @@ server.registerTool("map_pinterest_brand_presence", {
|
|
|
199
208
|
skipCache: z.boolean()
|
|
200
209
|
.optional()
|
|
201
210
|
.describe("Default false: a successful lookup is cached for seven days and reused. Set true to force a fresh fetch."),
|
|
211
|
+
max_charge_usd: MAX_CHARGE_USD,
|
|
202
212
|
},
|
|
203
|
-
}, async ({ company_domain, company_name, handle, includeFollowerCounts, skipCache }) => {
|
|
213
|
+
}, async ({ company_domain, company_name, handle, includeFollowerCounts, skipCache, max_charge_usd }) => {
|
|
204
214
|
return runActor("d1HvjZfKhgvWsoEwn", "Pinterest Brand Presence Mapper", compact({
|
|
205
215
|
company_domain,
|
|
206
216
|
company_name,
|
|
207
217
|
handle,
|
|
208
218
|
includeFollowerCounts: boolToString(includeFollowerCounts),
|
|
209
219
|
skipCache: boolToString(skipCache),
|
|
210
|
-
}));
|
|
220
|
+
}), max_charge_usd);
|
|
211
221
|
});
|
|
212
222
|
const transport = new StdioServerTransport();
|
|
213
223
|
await server.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mambalabsdev/mcp-pinterest-brand-presence-mapper",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "MCP server for the Mamba Labs Pinterest Brand Presence Mapper actor on Apify. Resolve a company domain to its Pinterest business account with exact follower, pin and board counts.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"node": ">=18"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.32.0",
|
|
42
42
|
"zod": "^4.5.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|