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.
curl -O https://raw.githubusercontent.com/156554395/image-video-generation-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/156554395/image-video-generation-mcpWrote 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.
[](https://agentmods.dev/instructions/156554395/image-video-generation-mcp/claude-md)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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 密钥、默认模型、超时等配置- 接口定义:
ImageVideoGenerationConfig、ImageGenerationParams、VideoGenerationParams等 - 支持环境变量和配置文件两种配置方式
-
src/image-video-generation-client.ts: API 客户端模块
ImageVideoGenerationClient类:封装 BigModel API 调用- 实现重试机制、错误处理、异步视频状态查询
- 支持图像生成、视频生成、结果查询三个主要功能
-
src/errors.ts: 错误处理模块
- 定义了
ValidationError、ApiError、NetworkError等自定义错误类型
- 定义了
配置管理
项目支持两种配置方式:
-
环境变量配置:
IMAGE_VIDEO_GENERATION_API_KEY: API 密钥(必需)IMAGE_VIDEO_GENERATION_DEFAULT_IMAGE_MODEL: 默认图像模型(可选,默认 cogview-3-flash)IMAGE_VIDEO_GENERATION_DEFAULT_VIDEO_MODEL: 默认视频模型(可选,默认 cogvideox-flash)
-
配置文件:
.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 功能:
- 🎯 可视化调试界面
- 🛠️ 工具测试和参数编辑
- 📝 实时日志查看
- 📊 响应结果预览
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.
- 10d ago First seen · 166 lines · 1,215 tokens per session scan A 827797b09dee
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.
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.
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.
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).
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.
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).
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.