vyra-mcp 0.2.0 → 0.3.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 CHANGED
@@ -17,13 +17,18 @@ performance-based creator campaigns in plain English.
17
17
 
18
18
  ## Tools
19
19
 
20
+ On connect, the server tells your agent how Vyra works (performance-based creator
21
+ marketing, **not** paid ads) so it won't ask irrelevant ad-platform questions.
22
+
20
23
  | Tool | What it does |
21
24
  |------|--------------|
25
+ | `get_started` | Call first — how Vyra works + live wallet/campaigns + required fields |
22
26
  | `get_wallet_balance` | Available prepaid balance |
23
27
  | `list_campaigns` | All your campaigns |
24
28
  | `get_campaign` | One campaign by id |
25
29
  | `list_campaign_slots` | Creators who joined, with status + views |
26
30
  | `get_submission` | One submission's metrics, cost, watch-window |
31
+ | `estimate_campaign` | Preview how many creators a budget funds (no spend) |
27
32
  | `create_campaign` | Create a draft campaign (optionally with assets) |
28
33
  | `activate_campaign` | Fund-check, reserve budget, go live |
29
34
  | `pause_campaign` | Stop new creators from joining |
package/dist/server.js CHANGED
@@ -7,6 +7,25 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
7
7
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
8
8
  import { z } from "zod";
9
9
  import { apiRequest } from "./api.js";
10
+ // Injected into the agent's context the moment it connects. This is what stops
11
+ // agents from asking generic ad-platform questions (daily budget, destination
12
+ // URL, ad placements) — Vyra is not paid ads.
13
+ const INSTRUCTIONS = `Vyra is a PERFORMANCE-BASED CREATOR MARKETING platform — NOT a paid-ads tool (not Meta/Google/TikTok Ads).
14
+
15
+ How it works: a brand funds prepaid credits, then creates a campaign that pays small creators to post short organic videos to their OWN audiences. Each creator earns a FIXED FEE when their video is approved, plus an optional PERFORMANCE BONUS based on views over a watch window. The brand buys "slots" — one creator per slot.
16
+
17
+ So DO NOT ask about: daily ad budget, destination/landing URL as an ad target, ad placements, bid strategy, conversion tracking pixels, or audiences-to-target-with-ads. Those don't apply.
18
+
19
+ Recommended workflow when a user wants to run a campaign:
20
+ 1. Call get_started first — it returns the brand's live wallet balance, existing campaigns, and the exact fields a campaign needs. Ground yourself in that before asking anything.
21
+ 2. To create a campaign you only NEED: a name, a fixed_fee_cents (guaranteed pay per creator on approval), and a budget_cents (total — budget ÷ per-creator cost = number of creator slots). Everything else has sensible defaults.
22
+ 3. Helpful extras: key_message (the brief — what creators should highlight), a bonus (bonus_type "milestone" or "cpm" + bonus_cap_cents), targeting (countries, min/max_followers), content rules (watch_window_days, min/max_video_seconds, submission_deadline_hours), hashtags, promo_link, and assets (logo/demo video/screenshots attached BY URL).
23
+ 4. create_campaign makes a DRAFT — it is not live and spends nothing yet.
24
+ 5. To go live, call activate_campaign. This RESERVES the budget from the wallet, so the wallet must be funded first (check get_wallet_balance). If funds are too low, tell the user to add credits in the Vyra dashboard.
25
+
26
+ NEVER INVENT NUMBERS. Do not guess or calculate slot counts, costs, or balances yourself. Always read them from tool results: get_wallet_balance for funds, estimate_campaign to preview how many creators a budget funds, and the value create_campaign returns for the real slot count. If you don't have a number from a tool, call the tool — don't make one up.
27
+
28
+ IMPORTANT: All money fields are integer CENTS (e.g. $5.00 = 500). Platform fees/margins are internal — never ask about or expose them. Confirm the draft with the user before activating (activation spends real credits).`;
10
29
  // Wrap any tool body so a thrown error becomes a clean MCP error result instead
11
30
  // of crashing the transport. Success returns the value as pretty JSON text.
12
31
  async function run(fn) {
@@ -20,7 +39,49 @@ async function run(fn) {
20
39
  }
21
40
  }
22
41
  export function buildServer() {
23
- const server = new McpServer({ name: "vyra", version: "0.2.0" });
42
+ const server = new McpServer({ name: "vyra", version: "0.3.0" }, { instructions: INSTRUCTIONS });
43
+ // --- Orientation --------------------------------------------------------
44
+ // One call an agent makes first to ground itself: live state + how Vyra works
45
+ // + exactly what a campaign needs. Stops it from asking irrelevant questions.
46
+ server.registerTool("get_started", {
47
+ title: "Get started / account overview",
48
+ description: "Call this FIRST. Returns how Vyra works, the brand's live wallet balance and existing campaigns, and the exact fields needed to create a campaign. Use it to avoid asking the user for anything Vyra doesn't need.",
49
+ inputSchema: {},
50
+ }, () => run(async () => {
51
+ // Pull live state; tolerate either call failing so orientation still works.
52
+ const [wallet, campaigns] = await Promise.all([
53
+ apiRequest("GET", "/wallet").catch(() => null),
54
+ apiRequest("GET", "/campaigns").catch(() => null),
55
+ ]);
56
+ return {
57
+ platform: "Vyra — performance-based creator marketing. Brands pay small creators a fixed fee + performance bonus to post short organic videos. NOT paid ads.",
58
+ wallet,
59
+ campaigns,
60
+ to_create_a_campaign: {
61
+ required: {
62
+ name: "Campaign name",
63
+ fixed_fee_cents: "Guaranteed pay per creator on approval (cents)",
64
+ budget_cents: "Total budget (cents). budget ÷ per-creator cost = creator slots",
65
+ },
66
+ optional: {
67
+ key_message: "The brief — what creators should highlight",
68
+ bonus: "bonus_type 'milestone'|'cpm' + bonus_cap_cents (and bonus_cpm_cents for cpm)",
69
+ targeting: "countries[], min_followers, max_followers",
70
+ content_rules: "watch_window_days, min_video_seconds, max_video_seconds, submission_deadline_hours",
71
+ hashtags: "hashtags[]",
72
+ promo_link: "Link or discount code",
73
+ assets: "Attach logo/demo video/screenshots by URL (attach_campaign_asset)",
74
+ platform: "tiktok (default) | instagram | youtube",
75
+ },
76
+ notes: [
77
+ "All money is integer cents ($5 = 500).",
78
+ "create_campaign makes a DRAFT (spends nothing).",
79
+ "activate_campaign reserves budget from the wallet — fund it first.",
80
+ "Do NOT ask about ad budgets, placements, or destination URLs — Vyra is not paid ads.",
81
+ ],
82
+ },
83
+ };
84
+ }));
24
85
  // --- Wallet -------------------------------------------------------------
25
86
  server.registerTool("get_wallet_balance", {
26
87
  title: "Get wallet balance",
@@ -56,6 +117,22 @@ export function buildServer() {
56
117
  },
57
118
  }, ({ submission_id }) => run(() => apiRequest("GET", `/submissions/${submission_id}`)));
58
119
  // --- Campaigns: write ---------------------------------------------------
120
+ server.registerTool("estimate_campaign", {
121
+ title: "Estimate creator slots",
122
+ description: "Preview how many creator slots a budget funds, WITHOUT creating anything. Call this to show the user real numbers before creating a campaign — never compute slot counts yourself.",
123
+ inputSchema: {
124
+ fixed_fee_cents: z
125
+ .number()
126
+ .int()
127
+ .describe("Guaranteed fee per creator, in cents"),
128
+ budget_cents: z.number().int().describe("Total budget, in cents"),
129
+ bonus_cap_cents: z
130
+ .number()
131
+ .int()
132
+ .optional()
133
+ .describe("Max performance bonus per creator, in cents"),
134
+ },
135
+ }, (args) => run(() => apiRequest("POST", "/campaigns/estimate", args)));
59
136
  server.registerTool("create_campaign", {
60
137
  title: "Create campaign (draft)",
61
138
  description: "Create a new draft campaign. It is NOT live yet — call activate_campaign after funding. All money fields are integer cents.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vyra-mcp",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Drive Vyra from Claude, ChatGPT, or any MCP client — manage performance-based creator campaigns in plain English.",
5
5
  "license": "MIT",
6
6
  "type": "module",