Skip to main content
Glama
1cyberlangke1

agnes-mcp

agnes-mcp

基于 Agnes AI 的 MCP 服务端 — 读图·生图·生视频,全部走 OpenAI 兼容接口。

官方仓库:AgnesAI-Labs/AgnesAI-Models — 模型目录、API 文档和示例。 API 平台:https://platform.agnes-ai.com/

工具列表

工具

说明

describe_image

读本地图片 → 自动压缩 → base64 → Agnes 视觉模型 → 返回文字描述。支持 png/jpg/webp/bmp/gif

generate_image

文字生图(异步)→ 返回 taskId: "img_1",后台自动下载

generate_video

文字生视频(异步)→ 返回 taskId: "vid_1",后台自动轮询并下载

get_task_status

查询任意异步任务状态(0ms 缓存,不调 API)→ 完成后返回下载路径 + 总耗时

describe_image

参数

类型

必填

默认

说明

filePath

string

本地图片路径,支持 png/jpg/jpeg/gif/webp/bmp

prompt

string

"Describe this image in detail"

传给视觉模型的提示词

返回:文字描述 + 耗时

generate_image

参数

类型

必填

默认

说明

prompt

string

生成图片的文字描述

size

string

"1024x768"

期望尺寸,如 "1024x768""512x512"(实际由 Agnes 决定最终分辨率)

outputPath

string

图片保存路径

返回:{"taskId":"img_1","status":"queued"}

generate_video

参数

类型

必填

默认

说明

prompt

string

生成视频的文字描述

outputPath

string

视频保存路径

返回:{"taskId":"vid_1","status":"queued"}

get_task_status

参数

类型

必填

默认

说明

taskId

string

异步任务 ID,img_*vid_*

返回:{"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
}

字段

默认值

说明

apiKeys

[]

多个 key 自动轮询(round-robin)

baseUrl

https://apihub.agnes-ai.com/v1

API 地址

models.*

agnes-2.0-flash 等

各任务使用模型

videoTimeout

600000

视频生成超时(毫秒),默认 10 分钟

imageMaxDimension

2048

读图时最大宽/高,超过等比缩小

imageQuality

80

JPEG 压缩质量(保留以备后续扩展)

retryCount

3

API 请求失败时自动重试次数(对 429/5xx/网络错误生效)

config.json 已被 .gitignorepre-commit 钩子双重保护,禁止提交到仓库。

环境变量

变量

作用

AGNES_BASE_URL

覆盖 API 地址(默认使用 config.json)

AGNES_API_KEYS

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 编译,然后填入实际项目路径。

脚本

命令

作用

npm run dev

tsx watch src/main.ts 开发模式

npm run build

tsc 编译

npm run start

node dist/main.js 启动

许可

MIT © 2026 1cyberlangke1

Available Tools

4 tools
describe_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

ParametersJSON Schema
NameRequiredDescriptionDefault
promptNoPrompt for the vision modelDescribe this image in detail
filePathYesLocal path to the image file

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions reading a local file and using a vision model, but doesn't disclose potential limitations like supported formats, file size, or side effects. The transparency is adequate but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences totaling ~30 words, with the usage advice front-loaded. Every sentence adds value, and there is no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks an output schema and does not specify the format or type of description returned. It also omits constraints like file format or access permissions. For a simple tool, it is slightly incomplete but not critically lacking.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with both parameters described in the input schema. The description adds no additional parameter-level details beyond what the schema provides. Since baseline is 3 for high coverage, this score is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Reads a local image file and describes its content', specifying the action and resource. It also includes a usage hint distinguishing it from direct reading, and the sibling tools are all generation tasks, making differentiation clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use this when you cannot directly read a local image', providing a clear when-to-use condition. It doesn't list when not to use or alternatives, but the context and sibling tools imply it's for image description when direct access isn't available.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_imageA

Generate an image from a text prompt (async). Returns taskId for status polling via get_task_status

ParametersJSON Schema
NameRequiredDescriptionDefault
sizeNoImage size, e.g. 1024x7681024x768
promptYesText prompt for image generation
outputPathYesLocal path to save the image

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses async behavior and returns taskId, which is key for polling. No annotations provided, so description carries burden. Does not mention side effects like delayed file writing, rate limits, or authorization—could be more transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with action and async note. No redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers essential: async generation, taskId for polling, and output path. No output schema, but description explains return value. Could clarify that file is saved only after task completes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions. Description adds no extra meaning beyond schema (e.g., prompt is 'text prompt', outputPath is 'local path'). Baseline 3 for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states action (generate image from text prompt), async nature, and follow-up polling via get_task_status. Distinguishes from siblings (describe_image, generate_video, get_task_status).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage context: generate then poll via get_task_status. Does not explicitly exclude alternatives like describe_image or generate_video, but the name and description provide sufficient guidance for an agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_videoA

Generate a video from a text prompt (async). Returns taskId for status polling via get_task_status

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesText prompt for video generation
outputPathYesLocal path to save the video

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries behavioral burden. It discloses async nature and taskId return, but lacks details on write operations, auth needs, or failure modes. Adequate but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, concise and front-loaded. Could benefit from slight structure but is efficient for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool is simple with 2 params, no output schema. Description covers async behavior and next step, sufficient for basic usage. Lacks edge case details but adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameters are already described. Description adds minimal extra meaning (e.g., 'text prompt', 'Local path'), not exceeding baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states verb 'generate', resource 'video', method 'from a text prompt (async)', and mentions async behavior with taskId return. Differentiates from siblings (generate_image, describe_image, get_task_status) by specifying video generation and async polling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description indicates async operation and directs to use get_task_status for polling, providing clear context for usage. Does not explicitly exclude cases but implies appropriate usage vs. siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_task_statusA

Check the status of an async task (image generation or video generation). Queries cached result

ParametersJSON Schema
NameRequiredDescriptionDefault
taskIdYesTask ID returned from generate_image or generate_video

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It states 'queries cached result', indicating idempotency and speed, but does not disclose what happens if the task is still processing or not found.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the purpose, and contains no unnecessary words. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple polling tool with one parameter and no output schema, the description is sufficiently complete. It explains the tool's purpose and caching behavior, which covers essential usage context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already describes the parameter as returning from generate_image/generate_video. The description adds no new parameter-specific information, meeting baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the verb 'check', the resource 'status of an async task', and specifies the scope 'image generation or video generation'. It distinguishes from sibling tools like generate_image and generate_video which create tasks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage after submitting a task, but lacks explicit when-to-use or when-not-to-use guidance. It does not mention polling frequency or prerequisites beyond having a task ID.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • First observeddescribe_image
    • First observedgenerate_image
    • First observedgenerate_video
    • First observedget_task_status

TDQS

A4.2/5.0

Scored across 4 tools

Disambiguation5/5

Each tool serves a distinct purpose: describing images, generating images or videos asynchronously, and checking task status. No overlap in functionality.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., describe_image, generate_image), making the set predictable.

Tool Count5/5

Four tools is well-scoped for the server's purpose of image/video generation and description, covering the essential operations without bloat.

Completeness4/5

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

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers