返回顶部
m

minimax-understand-image

使用 MiniMax MCP 进行图像理解和分析。触发条件:(1) 用户要求分析图片、理解图像、描述图片内容 (2) 需要识别图片中的物体、文字、场景 (3) 使用 MiniMax 的 understand_image 功能

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.3
安全检测
已通过
5,240
下载量
6
收藏
概述
安装方式
版本历史

minimax-understand-image

# minimax-understand-image 使用 MiniMax MCP 服务器进行图像理解和分析。 ## 执行流程(首次需要安装,后续直接步骤4调用) ### 步骤 1: 检查并安装依赖 #### 1.1 检查 uvx 是否可用 ```bash which uvx ``` 如果不存在,安装 uv: **方法 1: 使用官方安装脚本(推荐)** ```bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` **方法 2: 使用国内镜像加速(如果官方脚本下载失败)** 临时使用清华镜像源安装: ```bash export UV_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple" curl -LsSf https://astral.sh/uv/install.sh | sh ``` 或者临时使用阿里云镜像源: ```bash export UV_INDEX_URL="https://mirrors.aliyun.com/pypi/simple/" curl -LsSf https://astral.sh/uv/install.sh | sh ``` #### 1.2 检查 MCP 服务器是否已安装 ```bash uvx minimax-coding-plan-mcp --help ``` 执行命令判断是否MCP服务器已安装, 如果安装了跳到步骤 2。 #### 1.3 安装 MCP 服务器(如果未安装) **方法 1: 使用默认源安装** ```bash uvx install minimax-coding-plan-mcp ``` **方法 2: 使用国内镜像加速(如果默认源下载失败)** 临时使用清华镜像源: ```bash export UV_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple" uvx install minimax-coding-plan-mcp ``` 或者临时使用阿里云镜像源: ```bash export UV_INDEX_URL="https://mirrors.aliyun.com/pypi/simple/" uvx install minimax-coding-plan-mcp ``` ### 步骤 2: 检查 API Key 配置 ```bash cat ~/.openclaw/config/minimax.json 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('api_key', ''))" ``` 如果返回非空的 API Key,跳到步骤 4。 ### 步骤 3: 配置 API Key(如果未配置) #### 3.1 尝试从 ~/.openclaw/agents/main/agent/auth-profiles.json 中的配置文件中获取 根据返回的判断: - 名称包含 "minimax" 或 "MiniMax" 找到匹配的 Key 后,询问用户确认是否使用。 #### 3.2 如果没有找到 Key,向用户索要 直接询问用户提供 MiniMax API Key。 如果未购买MiniMax,购买地址为: https://platform.minimaxi.com/subscribe/coding-plan?code=GjuAjhGKqQ&source=link #### 3.3 保存 API Key ```bash mkdir -p ~/.openclaw/config cat > ~/.openclaw/config/minimax.json << EOF { "api_key": "API密钥", "output_path": "~/.openclaw/workspace/minimax-output" } EOF ``` ### 步骤 4: 使用 MCP 处理图像 #### 4.1 准备图片 将图片放到可访问路径,例如: - `~/.openclaw/workspace/images/图片名.jpg` - 或者使用 URL #### 4.2 调用 understand_image 使用脚本调用 MCP 服务: ```bash python3 {curDir}/scripts/understand_image.py <图片路径或URL> "<对图片的提问>" ``` **示例:** ```bash # 描述图片内容 python3 {curDir}/scripts/understand_image.py ~/image.jpg "详细描述这张图片的内容" # 使用 URL python3 {curDir}/scripts/understand_image.py "https://example.com/image.jpg "这张图片展示了什么?" ``` #### 4.3 API 参数说明 | 参数 | 说明 | 类型 | |------|------|------| | image | 图片路径或 URL | string (必填) | | prompt | 对图片的提问 | string (必填) | ## 脚本说明 脚本位置:`{curDir}/scripts/understand_image.py` **功能:** - 优先从环境变量 `MINIMAX_API_KEY` 读取 API Key,如果没有则从 `~/.openclaw/config/minimax.json` 读取 - 通过 stdio 模式启动 MCP 服务器 - 发送 JSON-RPC 请求调用 `understand_image` 工具 - 返回格式化的 JSON 结果 **错误处理:** - API Key 未配置时提示错误 - uvx 未安装时提示安装命令 - MCP 服务器错误时显示 stderr 输出

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 minimax-understand-image-1776420084 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 minimax-understand-image-1776420084 技能

通过命令行安装

skillhub install minimax-understand-image-1776420084

下载 Zip 包

⬇ 下载 minimax-understand-image v1.0.3

文件大小: 3.97 KB | 发布时间: 2026-4-17 19:54

v1.0.3 最新 2026-4-17 19:54
minimax-understand-image 1.0.3

- 流程优化:首次配置流程更为简洁,后续可直接调用图像分析功能。
- API Key 自动获取逻辑修改:默认从 ~/.openclaw/agents/main/agent/auth-profiles.json 查找,而非此前的路径。
- 清理文档内容,去除冗余完整流程示例,提升可读性。
- 步骤描述更明确,帮助用户更快完成配置和调用。

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部