agnes-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agnes-mcp 生成一张日落海滩的图片"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agnes-mcp
基于 Agnes AI 的 MCP 服务端 — 读图·生图·生视频,全部走 OpenAI 兼容接口。
官方仓库:AgnesAI-Labs/AgnesAI-Models — 模型目录、API 文档和示例。 API 平台:https://platform.agnes-ai.com/
工具列表
工具 | 说明 |
| 读本地图片 → 自动压缩 → base64 → Agnes 视觉模型 → 返回文字描述。支持 png/jpg/webp/bmp/gif |
| 文字生图(异步)→ 返回 |
| 文字生视频(异步)→ 返回 |
| 查询任意异步任务状态(0ms 缓存,不调 API)→ 完成后返回下载路径 + 总耗时 |
describe_image
参数 | 类型 | 必填 | 默认 | 说明 |
| string | 是 | — | 本地图片路径,支持 png/jpg/jpeg/gif/webp/bmp |
| string | 否 |
| 传给视觉模型的提示词 |
返回:文字描述 + 耗时
generate_image
参数 | 类型 | 必填 | 默认 | 说明 |
| string | 是 | — | 生成图片的文字描述 |
| string | 否 |
| 期望尺寸,如 |
| string | 是 | — | 图片保存路径 |
返回:{"taskId":"img_1","status":"queued"}
generate_video
参数 | 类型 | 必填 | 默认 | 说明 |
| string | 是 | — | 生成视频的文字描述 |
| string | 是 | — | 视频保存路径 |
返回:{"taskId":"vid_1","status":"queued"}
get_task_status
参数 | 类型 | 必填 | 默认 | 说明 |
| string | 是 | — | 异步任务 ID, |
返回:{"status":"completed","outputPath":"...","totalTime":"26s"} 或 {"status":"in_progress","progress":30}
Related MCP server: agnes-mcp
快速开始
npm install
# 编辑 config.json 填入 Agnes API key
npm run dev配置
编辑项目根目录的 config.json:
{
"apiKeys": ["sk-xxx", "sk-yyy"],
"baseUrl": "https://apihub.agnes-ai.com/v1",
"models": {
"vision": "agnes-2.0-flash",
"image": "agnes-image-2.1-flash",
"video": "agnes-video-v2.0"
},
"videoTimeout": 600000,
"imageMaxDimension": 2048,
"imageQuality": 80
}字段 | 默认值 | 说明 |
|
| 多个 key 自动轮询(round-robin) |
|
| API 地址 |
| agnes-2.0-flash 等 | 各任务使用模型 |
|
| 视频生成超时(毫秒),默认 10 分钟 |
|
| 读图时最大宽/高,超过等比缩小 |
|
| JPEG 压缩质量(保留以备后续扩展) |
|
| API 请求失败时自动重试次数(对 429/5xx/网络错误生效) |
config.json 已被 .gitignore 和 pre-commit 钩子双重保护,禁止提交到仓库。
环境变量
变量 | 作用 |
| 覆盖 API 地址(默认使用 config.json) |
| JSON 数组格式的 key 列表(优先级高于 config.json) |
接入 MCP Host
opencode.json
{
"mcp": {
"agnes-mcp": {
"type": "local",
"command": ["npx", "tsx", "src/main.ts"],
"cwd": "D:\\path\\to\\agnes_mcp"
}
}
}claude_desktop_config.json
{
"mcpServers": {
"agnes-mcp": {
"command": "node",
"args": ["D:\\path\\to\\agnes_mcp\\dist\\main.js"]
}
}
}确保先执行 npm run build 编译,然后填入实际项目路径。
脚本
命令 | 作用 |
|
|
|
|
|
|
许可
MIT © 2026 1cyberlangke1
Available Tools
4 toolsdescribe_imageA
Use this when you cannot directly read a local image. Reads a local image file and describes its content via Agnes AI vision model
Inputs: filePath (required), prompt.
generate_imageA
Generate an image from a text prompt (async). Returns taskId for status polling via get_task_status
Inputs: prompt (required), outputPath (required), size.
generate_videoA
Generate a video from a text prompt (async). Returns taskId for status polling via get_task_status
Inputs: prompt (required), outputPath (required).
get_task_statusA
Check the status of an async task (image generation or video generation). Queries cached result
Inputs: taskId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool serves a distinct purpose: describing images, generating images or videos asynchronously, and checking task status. No overlap in functionality.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., describe_image, generate_image), making the set predictable.
Four tools is well-scoped for the server's purpose of image/video generation and description, covering the essential operations without bloat.
The core workflow (generate async, poll status) is covered, but missing cancel or delete operations for tasks. Minor gap that agents can work around.
Maintenance
Related MCP Connectors
MCP server for Hailuo (MiniMax) AI video generation
MCP server for Qwen Image 3 AI image generation
MCP server for OpenAI Sora AI video generation
Generate AI images and videos from any compatible MCP client.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA local MCP server that enables Claude to generate images using the OpenAI API.-
- AlicenseAqualityDmaintenanceMCP server that exposes Agnes AI's text, image, video, and multimodal capabilities as tools with up to 1M context and 4K video.7MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables local AI agents to generate images and videos through the OpenRouter API, manage a browsable media library, and track generation costs.11MIT
- AlicenseAqualityDmaintenanceOpen-source MCP server for AI image and video generation via UGCmind, enabling prompt inspiration, generation, and async task tracking from any MCP host.2512 npmMIT