image-video-generation-mcp: Instructions file for Claude Code

CLAUDE.md

image-video-generation-mcp CLAUDE.md is an instructions file for Claude Code from 156554395/image-video-generation-mcp. It costs 1,215 tokens per session, scanned A, original, MIT.

Project instructions for a TypeScript server that generates images and videos through the BigModel AI service. MCP is a way for an AI assistant to call tools provided by another program.

In plain words
What is it for?
Use them when installing dependencies, building, testing, debugging, configuring models, or extending image and video generation features.
Why use it?
They document the main tools, configuration, development commands, testing, debugging, and release process for the server.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is 156554395/image-video-generation-mcp's own configuration. It tells Claude Code how to work on image-video-generation-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything image-video-generation-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to 156554395/image-video-generation-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/156554395/image-video-generation-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/156554395/image-video-generation-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for image-video-generation-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/156554395/image-video-generation-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/156554395/image-video-generation-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/156554395/image-video-generation-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/156554395/image-video-generation-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for image-video-generation-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/156554395/image-video-generation-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/156554395/image-video-generation-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,215 This file is loaded in full into every session.
When invoked 1,215 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01215 $0.01215
Opus 5 $0.00607 $0.00607
Sonnet 5 $0.00243 $0.00243
Haiku 4.5 $0.00121 $0.00121

Measured 10d ago against content hash 827797b09dee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

image-video-generation-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 166 lines

How it starts

The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

项目概述

这是一个基于 Model Context Protocol (MCP) 的图像和视频生成服务器,使用 BigModel AI 平台的 CogView 和 CogVideoX 模型。项目使用 TypeScript 开发,通过 npm 包管理器 pnpm 进行依赖管理。

开发命令

构建和开发

# 安装依赖
pnpm install

# 开发模式(监听文件变化自动编译)
pnpm dev

# 构建
pnpm build

# 启动服务器
pnpm start

# 运行测试
pnpm test

# 代码检查
pnpm lint

调试命令

# 启动调试模式
pnpm debug

# 启动调试并在开始时暂停
pnpm debug:break

# 启动 MCP Inspector(推荐)
pnpm inspector

# 直接使用 MCP Inspector
pnpm inspector:direct

发布命令

# 完整发布流程(构建→测试→发布)
pnpm release

# 发布前准备
pnpm prepublishOnly
pnpm prepack

项目架构

核心模块

  • src/index.ts: MCP 服务器主入口,定义了5个核心工具

    • generate_image: 图像生成工具
    • generate_video: 视频生成工具
    • query_video_result: 查询视频生成结果
    • wait_for_video: 等待视频生成完成
    • configure_models: 配置默认模型和设置
  • src/config.ts: 配置管理模块

    • Config 类:管理 API 密钥、默认模型、超时等配置
    • 接口定义:ImageVideoGenerationConfigImageGenerationParamsVideoGenerationParams
    • 支持环境变量和配置文件两种配置方式
  • src/image-video-generation-client.ts: API 客户端模块

    • ImageVideoGenerationClient 类:封装 BigModel API 调用
    • 实现重试机制、错误处理、异步视频状态查询
    • 支持图像生成、视频生成、结果查询三个主要功能
  • src/errors.ts: 错误处理模块

    • 定义了 ValidationErrorApiErrorNetworkError 等自定义错误类型

配置管理

项目支持两种配置方式:

  1. 环境变量配置

    • IMAGE_VIDEO_GENERATION_API_KEY: API 密钥(必需)
    • IMAGE_VIDEO_GENERATION_DEFAULT_IMAGE_MODEL: 默认图像模型(可选,默认 cogview-3-flash)
    • IMAGE_VIDEO_GENERATION_DEFAULT_VIDEO_MODEL: 默认视频模型(可选,默认 cogvideox-flash)
  2. 配置文件.image-video-generation-config.json

默认模型配置

  • 图像生成: cogview-3-flash(免费模型,快速生成)
  • 视频生成: cogvideox-flash(免费模型,快速视频生成)

调试

推荐调试方式:MCP Inspector

MCP Inspector 是最佳调试工具,提供可视化界面:

# 设置环境变量
export IMAGE_VIDEO_GENERATION_API_KEY="your_api_key"
export IMAGE_VIDEO_GENERATION_DEFAULT_IMAGE_MODEL="cogview-3-flash"

# 启动 Inspector
pnpm inspector

Inspector 功能:

  • 🎯 可视化调试界面
  • 🛠️ 工具测试和参数编辑
  • 📝 实时日志查看
  • 📊 响应结果预览

Read the full file on GitHub · 166 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 166 lines · 1,215 tokens per session scan A 827797b09dee

Subscribe to this mod's changes

image-video-generation-mcp CLAUDE.md is an instructions file published in the GitHub repository 156554395/image-video-generation-mcp (4 stars, last pushed 10mo ago), licensed MIT. It adds 1,215 tokens to every session, about $0.0061 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens