Communitygithub.com

wan27-media

Generate images and videos with Wan27, discover available models, estimate credit costs, and retrieve generation results through its MCP tools or CLI. Use when the user chooses Wan27 or wan2-7.io for media creation or task tracking.

wan27-media とは?

wan27-media is a Claude Code agent skill that generate images and videos with Wan27, discover available models, estimate credit costs, and retrieve generation results through its MCP tools or CLI. Use when the user chooses Wan27 or wan2-7.io for media creation or task tracking.

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/NotUsingGithub/wan27-media/tree/main

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Wan27 media generation

Use the user's account at wan2-7.io. The client is MIT licensed, but API/MCP access requires an active paid Wan27 subscription. Generation consumes the same credits as the website. A credit pack alone does not enable API access.

Connect

Prefer an already connected Wan27 MCP server. Otherwise use the official CLI on Node.js 22+ and macOS or Linux (including WSL):

npm install -g @wan27/[email protected]
wan27 auth login

The user completes login in their browser. Never ask them to paste a password or token into chat. Stored credentials are used automatically. WAN27_ACCESS_TOKEN is an alternative for an existing automation credential; do not expose it in files or logs.

MCP client configuration:

{"mcpServers":{"wan27":{"command":"npx","args":["-y","@wan27/[email protected]","mcp"]}}}

The final mcp argument is required. This is a local stdio server, not a hosted SSE endpoint. Full setup: MCP documentation.

Choose and estimate

  1. Read account_status to check subscription and credits. If access is unavailable, report the returned reason and subscription options; do not purchase or upgrade on the user's behalf.
  2. Read list_models, then get_model with the chosen modelId. Use the returned input schema for resolution, aspect ratio, duration, image references, and other supported parameters. Do not invent options or hard-code current prices.
  3. Build an input object using the requested subject, composition, style, motion and output format. Keep the user's intended content; ask only for details that materially affect the result or cost.
  4. Call estimate_generation with {"input": {...}}. Report estimated credits before creation. Generate within the user's authorized budget; if spending has not been authorized or the estimate exceeds it, obtain approval first. An estimate alone never creates a task.

Current model identifiers in client 0.1.3 include wan2.7-image, wan2.7-image-pro, wan27-text-to-video, and wan27-image-to-video. Verify availability and schema at execution time.

Create and retrieve

  • Use generate_image for image models and generate_video for video models. Both take input plus an optional requestId.
  • Generate a unique request ID before each new authorized generation. IDs must be 16–128 characters using letters, digits, _ or -; a UUID works. Retain it alongside the input and returned task ID.
  • If the submission result is ambiguous, inspect list_tasks before retrying. Retry the same input with the same request ID. Never create a fresh request ID merely because a network request or polling operation timed out.
  • Poll get_task with the returned taskId, with a bounded wait. queued and processing are not completed results; succeeded provides outputs download URLs. A polling timeout does not cancel the generation. Report the task ID and pending state when the wait limit is reached.
  • For failed, report the service error. A new generation is a new spend; do not silently loop through new paid attempts. The service documents automatic refunds for failed tasks, but only report a refund as confirmed when account/ledger evidence establishes it.
  • Return the actual result URLs or the files downloaded by the CLI. Do not invent completion, output URLs, generation quality, or credit balances.

CLI equivalent

The CLI returns JSON on stdout and prints the request ID on stderr. Prefer a JSON input file over shell-interpolated prompts.

wan27 account
wan27 models
wan27 model wan27-text-to-video
wan27 estimate --input request.json
# Only after generation spending is authorized:
wan27 create --input request.json --request-id <retained-uuid> --wait
wan27 task <task-id>
wan27 download <task-id> --output result.mp4

Example input, subject to the selected model's current schema:

{"modelId":"wan27-text-to-video","prompt":"A paper boat floating through a rain puddle, gentle tracking shot","durationSeconds":5,"resolution":"720p"}

For an authorized local reference image, wan27 upload path/to/frame.png returns its hosted URL; use that URL in the model's imageUrl field. Upload shares the image with Wan27: use only a file the user selected for this task. Upload is available through the CLI, not among the eight MCP tools.

MCP responses place successful data under structuredContent.data and JSON text content. For tool errors, inspect isError and the returned error code. CLI task creation returns task.id; do not confuse the client request ID with the server task ID.

Workflow guide · Client source · Report an issue

関連スキル