@yuuno-io/mcp
v0.13.6
Published
MCP server that lets Claude Code (or any MCP client) build, run and inspect Yuuno visual-flow canvases — generate AI ads end-to-end from a chat prompt.
Maintainers
Readme
@yuuno-io/mcp
MCP (Model Context Protocol) server that lets Claude Code — or any MCP client — build, run, and inspect Adflow visual-flow canvases on a Yuuno backend.
You write, Claude builds. Tell it:
"Build a 3-step ad pipeline: a Flux 2 pro image of a runner mid-stride → Kling 3.0 turning it into a 5-second slow-mo → Remotion videoEditor for the final cut. Save as 'Runner ad'."
…and the canvas appears in your Yuuno SPA in real time.
Install
# Run on demand (no install)
npx -y @yuuno-io/mcp
# Or install globally
npm install -g @yuuno-io/mcp
yuuno-mcpConfigure Claude Code
Add to your Claude Code MCP config
(~/.config/claude-code/mcp.json or project-local .claude/mcp.json):
{
"mcpServers": {
"adflow": {
"command": "npx",
"args": ["-y", "@yuuno-io/mcp"],
"env": {
"YUUNO_BACKEND_URL": "https://api.yuuno.app",
"YUUNO_API_KEY": "yk_…paste your key here…"
}
}
}
}Restart Claude Code; you'll see adflow in the MCP servers list with 15
tools available.
Get an API key
- Sign in to your Yuuno account.
- Go to Settings → API Keys, click New key, give it a name (e.g. "Claude Code MCP").
- Copy the
yk_…value — the server shows it once. - Paste into your MCP config above.
If the SPA is unavailable, you can mint one over HTTP:
curl -X POST https://api.yuuno.app/users/me/api-keys/ \
-H "Authorization: Bearer $YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{"name": "Claude Code MCP"}'The JSON response contains a key field — that's your YUUNO_API_KEY.
What the MCP can do
15 tools, all routed through the same apply_ops your SPA uses, so changes
appear in the canvas immediately.
| Tool | Purpose |
|---|---|
| create_session(title) | New canvas |
| list_sessions(limit) | Recent canvases |
| get_dag(session_id) | Read full DAG |
| delete_session(session_id) | Remove canvas |
| add_node(session_id, node_type, …) | Insert one node |
| update_node(session_id, node_id, patch) | Patch a node |
| remove_node(session_id, node_id) | Drop a node |
| add_edge(session_id, source, target) | Connect nodes |
| remove_edge(session_id, edge_id) | Disconnect |
| apply_ops_batch(session_id, ops) | Atomic multi-op |
| list_node_types() | Catalog (12 node kinds) |
| list_models() | Generation models catalog |
| run_dag(session_id) | Execute the DAG |
| get_run_status(run_id) | Poll execution |
| improve_prompt(prompt, node_type) | Yuuno copilot helper |
All write tools accept an optional expected_version argument for
optimistic locking — pass the save_version you read with get_dag and
the server will reject stale writes with a 409.
Multi-tab / multi-user safety
Every API key is scoped to one user. The Yuuno backend filters every
read and write by user_id, so your MCP cannot see or mutate sessions
that belong to a different account. Concurrent edits from Claude Code +
the SPA get serialized through SQLite + idempotent ops; the same op
applied twice does not corrupt the canvas.
Domain portability
Nothing here hard-codes a domain. Point YUUNO_BACKEND_URL at any
environment — local dev, staging, production — and the server keeps
working. No rebuild necessary; the env vars are read at process start.
Development
git clone https://github.com/yuuno-io/yuuno
cd yuuno/mcp
npm install
npm run build # produces dist/
npm run dev # tsc --watchLocal backend (Yuuno API) is required for end-to-end testing — see the backend repo for spin-up instructions.
License
MIT — see LICENSE.
