npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cqsjjb/mcp-vision-understanding

v1.0.0

Published

MCP server for vision understanding - 支持图片上传和分析功能

Readme

Vision Understanding MCP Server

这是一个视觉理解 MCP (Model Context Protocol) 服务器,用于在 Cursor 等 IDE 中分析图片内容。支持多种视觉理解模型。

功能特性

  • ✅ 支持图片上传和分析
  • ✅ 支持自定义提示词
  • ✅ 支持多种图片格式(jpg, jpeg, png, gif, webp, bmp)
  • ✅ 详细的错误处理和反馈

安装

方式一:使用 NPM 包(推荐,全局可用)

发布到 NPM 后,可以直接使用:

# 全局安装(可选)
npm install -g mcp-vision-understanding

或者在 Cursor 配置中使用 npx(无需安装):

{
  "mcpServers": {
    "vision-understanding": {
      "command": "npx",
      "args": ["-y", "mcp-vision-understanding"],
      "env": {
        "VISION_API_KEY": "your-api-key-here",
        "VISION_MODEL": "your-model-name"
      }
    }
  }
}

方式二:本地安装

cd mcp-vision-understanding
npm install

配置

环境变量配置(推荐)

使用环境变量配置 API 密钥,更安全:

  • VISION_API_KEY: API 密钥(必需)
  • VISION_BASE_URL: API 基础 URL(可选,默认:https://dashscope.aliyuncs.com/compatible-mode/v1)
  • VISION_MODEL: 模型名称(必需)

在 Cursor 中配置

使用 NPM 包(推荐)

{
  "mcpServers": {
    "vision-understanding": {
      "command": "npx",
      "args": ["-y", "mcp-vision-understanding"],
      "env": {
        "VISION_API_KEY": "your-api-key-here",
        "VISION_MODEL": "your-model-name"
      }
    }
  }
}

使用本地安装

{
  "mcpServers": {
    "vision-understanding": {
      "command": "node",
      "args": ["E:/path/to/mcp-vision-understanding/index.js"],
      "env": {
        "VISION_API_KEY": "your-api-key-here",
        "VISION_MODEL": "your-model-name"
      }
    }
  }
}

注意:

  • 使用 NPM 包方式,所有项目都可以使用,无需每个项目都安装
  • 使用本地安装方式,需要将路径替换为您项目的实际路径

使用方法

在 Cursor 中,您可以通过以下方式使用:

  1. 上传图片并分析:

    使用 analyze_image 工具分析图片: 无标题.png
  2. 使用自定义提示词:

    分析图片 无标题.png,请告诉我图片中有哪些物体和它们的颜色

工具说明

analyze_image

分析图片内容并返回详细描述。

参数:

  • imagePath (必需): 图片文件的路径
  • prompt (可选): 自定义提示词,默认为"请详细描述这张图片的内容"

示例:

{
  "imagePath": "无标题.png",
  "prompt": "请详细描述这张图片的内容,包括主要物体、颜色、场景等"
}

支持的图片格式

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • GIF (.gif)
  • WebP (.webp)
  • BMP (.bmp)

注意事项

  1. 确保您的 API 密钥有效且有足够的配额
  2. 图片文件路径可以是相对路径或绝对路径
  3. 相对路径会从当前工作目录解析
  4. API 调用超时时间为 60 秒

故障排除

图片文件不存在

  • 检查文件路径是否正确
  • 确保使用正确的路径分隔符(Windows 使用 \,Unix 使用 /

API 调用失败

  • 检查 API 密钥是否正确
  • 检查网络连接
  • 查看控制台错误信息

不支持的文件格式

  • 确保图片文件扩展名在支持列表中
  • 可以尝试将图片转换为支持的格式

许可证

MIT