Skip to main content
Glama
LxyMp
by LxyMp
README.md
# reasonix-vision-mcp

Vision Bridge MCP Server — 让纯文本模型通过 MCP 调用视觉模型来"看到"图片。

支持任意 OpenAI 兼容的视觉 API(SiliconFlow / GPT-4o / Qwen-VL 等),含图片压缩功能。

> ⚠️ **注意:** 本项目基于 **SiliconFlow** 平台在 **Reasonix** 中测试通过,其余平台/客户端未做完整测试,可能存在兼容性问题。

## 工具

| 工具 | 说明 |
|------|------|
| `describe_image` | 描述图片内容。支持本地图片路径或公网 URL |
| `compress_image` | 压缩本地图片文件 |
| `v` | 版本信息(仅查看,不调用) |

### describe_image 参数

| 参数 | 必填 | 说明 |
|------|------|------|
| `image` | ✅ | 图片路径:本地绝对路径或公网 URL |
| `prompt` | ❌ | 自定义描述指引,如"分析这个UI界面" |
| `detail` | ❌ | 视觉精度,默认 auto。传什么就用什么,直接透传给 API |

### compress_image 参数

| 参数 | 必填 | 默认值 | 说明 |
|------|------|--------|------|
| `image` | ✅ | — | 图片绝对路径 |
| `maxWidth` | ❌ | `800` | 最大宽度(像素)。仅在不指定 maxSize 时生效 |
| `maxSize` | ❌ | — | 目标大小,如 `"1M"`、`"500KB"`、`"200K"` |

指定 `maxSize` 时,工具会二分逼近压缩到目标大小以内,绝不超出。

## 安装

### 方式一:npx(推荐)

```json
{
  "mcpServers": {
    "reasonix-vision-mcp": {
      "command": "npx",
      "args": ["-y", "reasonix-vision-mcp"],
      "env": {
        "VISION_API_KEY": "sk-your-key",
        "VISION_BASE_URL": "https://api.siliconflow.cn/v1",
        "VISION_MODEL": "Qwen/Qwen3.5-35B-A3B",
        "VISION_DETAIL": "auto"
      }
    }
  }
}
```

### 方式二:直接运行

```bash
node dist/src/index.js
```

## 环境变量

| 变量 | 必填 | 默认值 | 说明 |
|------|------|--------|------|
| `VISION_API_KEY` | ✅ | — | 视觉模型的 API Key |
| `VISION_BASE_URL` | ❌ | `https://api.openai.com/v1` | OpenAI 兼容 API 地址 |
| `VISION_MODEL` | ❌ | `Qwen/Qwen3.5-35B-A3B` | 视觉模型名称 |
| `VISION_DETAIL` | ❌ | `auto` | 视觉精度,默认 auto。显式声明什么就传什么,不做校验 |
| `VISION_OUTPUT_DIR` | ❌ | `./vision-output` | compress_image 输出目录 |

## 许可证

MIT

TDQS

A3.9/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a distinct purpose: compress_image compresses images, describe_image analyzes them, and v provides version info. No overlap or confusion.

Naming Consistency4/5

Two tools follow verb_noun snake_case pattern, but v is an outlier as a single-letter name. Mostly consistent with one minor deviation.

Tool Count5/5

Three tools is well-scoped for a vision utility covering compression, description, and version info. Not too many or too few.

Completeness4/5

The tool set covers core image handling tasks (compression and description) but lacks features like format conversion or batch processing, which are reasonable extensions.

Maintenance

ActivityMaintained
ResponsivenessSyncing