wyren-mcp 1.0.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 ADDED
@@ -0,0 +1,35 @@
1
+ # wyren-mcp
2
+
3
+ Install the [Wyren](https://wyren.yibby.ai) MCP server and agent skills for Claude Code.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ # Project-only (current directory)
9
+ npx wyren-mcp
10
+
11
+ # Global (all projects)
12
+ npx wyren-mcp --global
13
+ ```
14
+
15
+ This adds the Wyren MCP server to your Claude Code config and installs the Wyren skill for guided AI pipeline building.
16
+
17
+ ## What you get
18
+
19
+ - **MCP Server** — 38 tools for creating, building, executing, and publishing AI workflows
20
+ - **Agent Skill** — teaches Claude how to use Wyren tools effectively, with workflow patterns and domain knowledge
21
+
22
+ ## Manual setup
23
+
24
+ If the installer doesn't work, you can set up manually:
25
+
26
+ ```bash
27
+ # Add MCP server (local)
28
+ claude mcp add --transport http wyren https://api.wyren.ai/mcp
29
+
30
+ # Add MCP server (global)
31
+ claude mcp add --transport http --scope user wyren https://api.wyren.ai/mcp
32
+
33
+ # Install skill (via skills CLI)
34
+ npx skills add briarbearrr/wyren-mcp
35
+ ```
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "wyren-mcp",
3
+ "version": "1.0.0",
4
+ "description": "Install the Wyren MCP server and agent skills for Claude Code",
5
+ "bin": {
6
+ "wyren-mcp": "setup.mjs"
7
+ },
8
+ "files": [
9
+ "setup.mjs",
10
+ "skills/"
11
+ ],
12
+ "keywords": [
13
+ "wyren",
14
+ "mcp",
15
+ "claude",
16
+ "ai",
17
+ "video",
18
+ "agent-skills"
19
+ ],
20
+ "license": "MIT",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/briarbearrr/wyren-mcp.git"
24
+ }
25
+ }
package/setup.mjs ADDED
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execFileSync } from 'child_process';
4
+ import { cpSync, existsSync, mkdirSync } from 'fs';
5
+ import { homedir } from 'os';
6
+ import { dirname, join } from 'path';
7
+ import { fileURLToPath } from 'url';
8
+
9
+ const __dirname = dirname(fileURLToPath(import.meta.url));
10
+ const MCP_URL = 'https://api.wyren.ai/mcp';
11
+
12
+ const args = process.argv.slice(2);
13
+ const isGlobal = args.includes('-g') || args.includes('--global');
14
+ const scope = isGlobal ? 'user' : 'local';
15
+
16
+ console.log('\n Wyren MCP Setup\n');
17
+ console.log(` Scope: ${isGlobal ? 'global (all projects)' : 'local (this project)'}\n`);
18
+
19
+ // Step 1: Add MCP server to Claude Code
20
+ console.log(' [1/2] Adding Wyren MCP server...');
21
+ try {
22
+ execFileSync(
23
+ 'claude',
24
+ ['mcp', 'add', '--transport', 'http', '--scope', scope, 'wyren', MCP_URL],
25
+ { stdio: 'pipe' },
26
+ );
27
+ console.log(' MCP server added.');
28
+ } catch {
29
+ console.log(' MCP server already configured or claude CLI not found.');
30
+ console.log(
31
+ ` Manual: claude mcp add --transport http --scope ${scope} wyren ${MCP_URL}`,
32
+ );
33
+ }
34
+
35
+ // Step 2: Copy skill files
36
+ console.log(' [2/2] Installing Wyren skill...');
37
+ const skillSrc = join(__dirname, 'skills', 'wyren');
38
+ const skillDest = isGlobal
39
+ ? join(homedir(), '.claude', 'skills', 'wyren')
40
+ : join(process.cwd(), '.claude', 'skills', 'wyren');
41
+
42
+ if (!existsSync(skillSrc)) {
43
+ console.error(' Skill files not found. Skipping skill install.');
44
+ } else {
45
+ mkdirSync(skillDest, { recursive: true });
46
+ cpSync(skillSrc, skillDest, { recursive: true });
47
+ console.log(` Skill installed to ${skillDest}`);
48
+ }
49
+
50
+ console.log('\n Done! Start Claude Code and the Wyren tools will be available.');
51
+ console.log(
52
+ ` Tip: run with ${isGlobal ? '' : '--global (-g) for all projects, or without flag for '}project-only.\n`,
53
+ );
@@ -0,0 +1,204 @@
1
+ ---
2
+ name: wyren
3
+ description: |
4
+ MUST INVOKE BEFORE calling ANY `mcp__wyren__*` tool. Wyren is an AI video generation
5
+ platform for building, running, and publishing AI pipelines (text, image, video, voice,
6
+ captions) via MCP. This skill defines the required execution policy, pricing/budget
7
+ playbook, node-by-node workflow discipline, and recommendation format — calling Wyren
8
+ MCP tools without loading it first will produce wrong behavior (skipped clarifications,
9
+ unapproved full-workflow runs, malformed budget pitches, missing pricing lookups).
10
+
11
+ AUTO-TRIGGER on ANY of the following, with or without "/wyren":
12
+ - Any mention of "video", "ad", "marketing video", "product video", "brand video",
13
+ "slideshow", "reel", "voiceover", "AI pipeline", "workflow", "pipeline"
14
+ - Any budget/credit/pricing question: "what can I build for $X", "what's possible
15
+ with Y credits", "ideas for $X", "how much does X cost", "pricing for video"
16
+ - Any industry-scoped video ideation: "I have a real estate agency / restaurant /
17
+ SaaS / store — what video can I get", "video for my business"
18
+ - Any request to build, run, list, execute, publish, modify, or debug Wyren
19
+ workflows, nodes, products, templates, or API endpoints
20
+ - Any question about Wyren models, credits, templates, MCP tools, or `mcp__wyren__*`
21
+ - User types "/wyren" or references the Wyren platform by name
22
+
23
+ If a `mcp__wyren__*` tool looks like a direct answer to the user's question, that is
24
+ the STRONGEST signal to load this skill first — never shortcut straight to the tool.
25
+ metadata:
26
+ tags: wyren, video, ai, mcp, workflow, pipeline, budget, marketing, ads, recommendations, real-estate, pricing, credits, business-video
27
+ ---
28
+
29
+ ## What is Wyren
30
+
31
+ Wyren is a node-based AI workflow generation platform. Users build pipelines by connecting modular nodes that perform AI operations — text generation, image generation, video generation, voice synthesis, captions, and more. Each node does one thing; connecting them creates powerful content pipelines.
32
+
33
+ You interact with Wyren through MCP tools. You can create workflows, add and connect nodes, configure AI models, execute pipelines, and publish them as API endpoints.
34
+
35
+ ## How to interact
36
+
37
+ **Be collaborative and narrate your actions:**
38
+
39
+ 1. When the user describes what they want to create, ask clarifying questions first:
40
+ - What's the final output? (video, image + voiceover, slideshow, etc.)
41
+ - Any style preferences? (cinematic, anime, realistic, etc.)
42
+ - What AI models should be used? (or let you pick defaults)
43
+ - Any specific requirements? (duration, aspect ratio, voice, etc.)
44
+
45
+ 2. As you build, narrate each step:
46
+ - "I'll create a workflow called 'Cat Video Pipeline'"
47
+ - "Adding a text node to generate the scene description..."
48
+ - "Connecting the text output to the image generator..."
49
+ - "Setting the model to Kling 2.0 for video generation..."
50
+
51
+ 3. After building, always validate with `validate_workflow` before telling the user it's ready.
52
+
53
+ 4. Ask before executing — running nodes costs credits.
54
+
55
+ ## Remember user context
56
+
57
+ When the user names a business, brand, industry, or drops a URL, it becomes a HARD REQUIREMENT for the rest of the conversation — you don't get to forget it between turns.
58
+
59
+ ### Pre-flight research phase (runs BEFORE you ask the user anything)
60
+
61
+ When the user gives you a URL for a branded ad / marketing video / short-form request, you MUST do your own research **before** asking clarifying questions. The goal is to walk back to the user with a concrete starting point — a brief + candidate images — not an empty set of questions.
62
+
63
+ **Steps, in order:**
64
+
65
+ 1. **Fetch the page** — use `WebFetch` (fast, cheap, always available) or `mcp__firecrawl__firecrawl_scrape` (when `WebFetch` returns a JS shell and you need rendered content). Ask for a compact summary: company name, one-line positioning, 3–5 key products/services, tone/voice, and primary color if visible.
66
+ 2. **Harvest image candidates** — from the fetched HTML / markdown, extract up to 5 candidate image URLs: the `og:image`, any `<img>` whose class / alt contains `logo`, the largest `<img>` in `<header>` or hero section, and any product photos. Absolute-resolve each against the base URL. You are a model reading markdown / HTML — no code, no scraper, just pattern-match.
67
+ 3. **Write a 3-line brief** — (a) brand name + one-line positioning, (b) the single visual motif the site leans on (e.g. "clean white vinyl fences against manicured lawns"), (c) the emotional beat the ad should hit (e.g. "suburban pride / craftsmanship / curb-appeal envy").
68
+ 4. **Present to the user** — one message, four parts: the 3-line brief, the candidate image URLs as a numbered list, the default assumptions ("voiceover + captions + 3-scene pacing = on by default"), and the two outstanding questions ("which image(s) to anchor on" and "anything in the brief to change"). Do NOT ask about voiceover / captions / scene count unless the user raises it — those are defaults the user can override.
69
+
70
+ **This is not optional for URL-based requests.** Skipping it and asking "what's your logo / what's your brand vibe" when you could have fetched it yourself wastes the user's turn and makes you look lazy. The only time you skip this phase is when the URL is obviously unfetchable (localhost, private, login-gated) — in which case you fall back to the mandatory pre-build checklist's "ask for brand name, tagline, primary color" flow.
71
+
72
+ **Separation from the `websiteResearch` node**: the pre-flight research is YOUR research, done with YOUR tools (`WebFetch` / firecrawl MCP), to seed the conversation. It does NOT replace the `websiteResearch` node in the final pipeline — the node still runs at execution time so the AI prompts get the full brand document. Pre-flight is "what the agent knows before talking"; the node is "what the pipeline sees at run time."
73
+
74
+ ### Mandatory pre-build checklist (run BEFORE `build_graph` / `use_essential` / `create_workflow`)
75
+
76
+ 1. **If a URL was given → you MUST add a `websiteResearch` node and run it before building the rest of the pipeline.** Not "offer" — add it. The only exceptions are:
77
+ - The user has explicitly declined in this conversation ("don't scrape", "skip research"), OR
78
+ - The URL is obviously unfetchable (localhost, private, paywalled login).
79
+
80
+ In either exception, you MUST instead ask the user for: brand name, one-line tagline, primary color, and any specific product/listing/offering they want featured — and bake those verbatim into every downstream `textAI` prompt via `dataUpdates`.
81
+
82
+ 2. **Brand imagery is mandatory for any branded ad request.** The pre-flight research phase above should have already surfaced candidate image URLs from the site. Your job here is to get the user's pick: "Which of these images should we anchor on? Or paste a different URL." The chosen image(s) become `imageInput` node(s) wired into the ad pipeline per the "TikTok 3-scene branded ad" pattern in [rules/workflow-patterns.md](rules/workflow-patterns.md). If the site had no usable images AND the user declines to provide one, note that the output will look generic and proceed — but this should be rare, because the pre-flight phase usually finds at least a logo or `og:image`.
83
+
84
+ 3. **Never invent concrete facts.** If the user hasn't told you the city, price, square footage, product SKU, menu item, or any other specific, DO NOT write it into a prompt. Describe the scene and style, and let the brand name + real scraped context carry the specificity. Fabricated listings ("Malibu. Six bedrooms. Twenty-two million.") are a bug — the user will notice and lose trust. If you need a specific to make the concept land, ASK the user or pull it from `websiteResearch` output.
85
+
86
+ 4. **Retrofit brand context into essentials.** When you copy an essential via `use_essential`, it will NOT include `websiteResearch`. You MUST add it and wire its outputs into the essential's `textAI` / `imageAI` nodes before validating. See [rules/workflow-patterns.md](rules/workflow-patterns.md) → "Retrofitting brand context into an essential".
87
+
88
+ ### Concept naming
89
+
90
+ - Name concepts with the brand embedded: "Sotheby's golden-hour glide" ✓, "Golden-hour glide" ✗.
91
+ - Never propose a concept that would work for any business. If the pitch could be copy-pasted to a restaurant or a SaaS, rewrite it.
92
+
93
+ This rule applies for the entire conversation once established — you don't get to "forget" the brand between turns.
94
+
95
+ ## Concept-refinement phase (before `build_graph`)
96
+
97
+ For any marketing / ad / short-form video request, you MUST produce a **concept brief** and show it to the user before calling `build_graph` / `use_essential`. The brief is a 3-scene TikTok-native structure:
98
+
99
+ - **Scene 1 — Hook (0–3 s)**: what stops the scroll. One-line visual beat + on-screen text (if any).
100
+ - **Scene 2 — Payoff (3–10 s)**: the product / service in action. One-line visual beat + voiceover line (if voiceover enabled).
101
+ - **Scene 3 — CTA (10–15 s)**: the call to action. One-line visual beat + on-screen text or voiceover line.
102
+
103
+ Each scene names: the shot, the on-screen text (if any), the voiceover line (if any), and whether the user-provided image (logo / product / hero) appears.
104
+
105
+ Example brief shape (show the user this structure):
106
+
107
+ > **Concept: "<Brand> <hook name>"**
108
+ > - **Hook (0–3 s)**: Close-up on [visual]. On-screen text: "[hook line]". Logo micro-flash.
109
+ > - **Payoff (3–10 s)**: [product / service in action]. Voiceover: "[one line]".
110
+ > - **CTA (10–15 s)**: [final shot]. On-screen text: "[CTA]". Logo + URL.
111
+
112
+ Only after the user approves the brief (or edits it) do you call `build_graph`. Do not skip this step — a flat pipeline without scene structure produces generic "any business" output and the user will reject it.
113
+
114
+ ## Polling workflow execution
115
+
116
+ When you call `run_workflow`, it returns `{ run_id, status: "running" }` and starts execution in the background. You MUST enter a polling loop:
117
+
118
+ 1. Call `get_workflow_run_status({ run_id })` every 5 seconds.
119
+ 2. Continue polling until `status` is not `"running"` or `"pending"` (i.e., `"completed"`, `"partial"`, `"failed"`, or `"cancelled"`).
120
+ 3. **Never hand control back to the user mid-run.** Never tell the user to say "status" or "check progress".
121
+ 4. On `completed`: read the outputs from the response and present the final result.
122
+ 5. On `failed`: surface the error and offer next steps.
123
+
124
+ ## Check existing resources first
125
+
126
+ Before creating a new workflow, check for existing resources:
127
+
128
+ 1. `list_workflows` — check `nodeTypes` array for workflows with matching pipeline structure
129
+ 2. `list_products` — check for published products that already do what's needed
130
+ 3. If a match exists, use `duplicate_workflow` to copy and modify
131
+ 4. Only `create_workflow` from scratch if nothing suitable exists
132
+
133
+ When scanning workflows, if any are missing a description, generate one from the graph structure via `get_workflow` and save it with `update_workflow`.
134
+
135
+ ## Recommending what to build for a budget
136
+
137
+ If the user asks "what can I build for $X", "what's possible with Y credits", or any budget-scoped ideation question, load [rules/recommendations.md](rules/recommendations.md) before responding. The playbook calls `discover_options` first, then returns a single ranked list of 4–6 creative concepts — each pitched as a 2-sentence idea with a "Pipeline: uses X" realization line (saved workflow, product, essential, template, or custom build) and an upper-bound "up to N credits" cost. Never use bucket headers. Never name a concept by its format ("slideshow ad", "hero shot"). Never quote custom-build costs without calling `get_pricing` per node.
138
+
139
+ ## Parameter validation
140
+
141
+ The server validates all field values on `build_graph` — invalid values return clear error messages that include the field's full schema in the `details.fieldErrors` payload. Scalar type mismatches that are unambiguous (e.g., `"off"` for a boolean field, or a numeric string for a number field) are auto-coerced so you don't need to retry.
142
+
143
+ ## Tool categories
144
+
145
+ Load the relevant rules file when working in each area:
146
+
147
+ - **Budget-scoped recommendations ("what can I build for $X")** → load [rules/recommendations.md](rules/recommendations.md)
148
+ - **Building workflows from scratch or templates** → load [rules/workflow-patterns.md](rules/workflow-patterns.md)
149
+ - **Understanding available nodes, sockets, and connections** → load [rules/nodes.md](rules/nodes.md)
150
+ - **Choosing and configuring AI models** → load [rules/models.md](rules/models.md)
151
+ - **Running nodes, workflows, or checking outputs** → load [rules/execution.md](rules/execution.md)
152
+ - **Credit balance, pricing, or cost estimation** → load [rules/billing.md](rules/billing.md)
153
+ - **Publishing workflows as API endpoints** → load [rules/products.md](rules/products.md)
154
+
155
+ ## Quick tool reference
156
+
157
+ ### Discovery (always safe to call)
158
+
159
+ - `discover_options({ budget, include?, exclude? })` — budget-aware recommendation mixing user workflows, products, essentials, and templates. Use for any "what can I build for $X" question.
160
+ - `list_node_types` — see all available nodes
161
+ - `get_node_type_info({ nodeType })` — details on a specific node (fields, models, handle IDs)
162
+ - `list_models` — available AI models by category
163
+ - `get_model_capabilities` — full spec for a model
164
+ - `list_prompt_templates` — prompt presets for AI nodes
165
+ - `list_style_templates` — visual style presets
166
+ - `list_voices` — ElevenLabs voice options
167
+ - `list_workflow_templates` — pre-built workflow templates
168
+ - `get_trend_inspiration` — fetch trending content references for ideation
169
+
170
+ ### Workflow management
171
+
172
+ - `create_workflow` / `get_workflow` / `list_workflows` / `update_workflow` / `delete_workflow` / `duplicate_workflow`
173
+
174
+ ### Graph building
175
+
176
+ - `build_graph` — **THE ONLY graph mutation tool.** Atomic batch ops: `addNodes`, `addEdges`, `dataUpdates` (partial merge), `removeNodeIds`, `removeEdgeIds`. Supports `tempId` references for edges to newly-added nodes. Auto-positions in a clean DAG layout.
177
+ - `organize_layout` — opt-in full re-layout pass (dagre). Overwrites positions.
178
+ - `validate_workflow` — check for issues AND warnings before execution. If warnings are present, ask the user about them before running.
179
+
180
+ ### Execution (costs credits)
181
+
182
+ - `run_node` — execute a single node (default — follow `_agentInstructions` in each response)
183
+ - `run_workflow` — execute entire workflow (requires `userConfirmed: true`). Returns `{ run_id }`; you MUST poll `get_workflow_run_status({ run_id })` every 5s until terminal.
184
+ - `get_workflow_run_status` — poll a running workflow for per-node status, errors, and credits charged
185
+ - `get_node_outputs` — retrieve execution results
186
+ - `cancel_job` — cancel an in-progress async job
187
+
188
+ ### Billing
189
+
190
+ - `get_credit_balance` — check remaining credits
191
+ - `get_pricing` — two modes: (1) lookup rate cards by operation/model, (2) **chain mode** — pass `{ chain: [{ type, model?, config? }, ...] }` with every AI node in your planned pipeline to get a server-computed `totalUpperBound` for custom-build cost quoting. Always use chain mode for custom builds so small nodes like textAI are never dropped from the sum.
192
+
193
+ ### Products (API publishing)
194
+
195
+ - `publish_product` / `republish_product` / `unpublish_product` / `list_products` / `get_product`
196
+ - `get_product_schema` / `estimate_product_cost`
197
+ - `set_product_inputs` — mark nodes as API inputs/outputs
198
+ - `create_api_key` / `list_api_keys` / `revoke_api_key`
199
+ - `get_run_status` / `list_runs` — monitor API runs
200
+
201
+ ### Templates
202
+
203
+ - `list_workflow_templates` — browse available templates
204
+ - `create_from_template` — create workflow from a template