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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mcpcn/image-vision-mcp

v1.0.6

Published

合并版 MCP:图片文字提取 + 图片内容理解

Readme

合并版 MCP:图片文字提取 + 图片内容理解

本项目将原有两个 MCP:

  • 图片文字提取(阿里云百炼 Qwen OCR)
  • 图片内容理解(智谱 GLM 视觉模型)

合并为一个 MCP 服务器,统一暴露两个工具,便于在同一次连接中调用。

环境变量

  • DASHSCOPE_API_KEY:阿里云百炼 API Key(用于图片文字提取)
  • ZHIPU_API_KEYGLM_API_KEY:智谱 AI API Key(用于图片内容理解)
  • GLM_VISION_MODEL:可选,自定义默认视觉模型(默认 GLM-4V-Plus-0111

未配置对应密钥时,相关工具会返回友好错误,不影响服务器启动。

安装与构建

npm install
npm run build

运行

# 直接运行已构建的入口
npm start
# 或作为可执行命令(安装到全局/本地 bin 后)
image-vision-mcp

在 MCP 客户端中配置

以 Claude Desktop 为例,在其 MCP 配置中添加:

{
  "mcpServers": {
    "image-vision": {
      "command": "node",
      "args": ["/绝对路径/到/本项目/dist/index.js"],
      "env": {
        "DASHSCOPE_API_KEY": "your-dashscope-key",
        "ZHIPU_API_KEY": "your-zhipu-key"
      }
    }
  }
}

暴露的工具

  • 工具名:ocr_extract_text
    • 参数:image_urlcustom_prompt?min_pixels?max_pixels?
    • 功能:使用阿里云百炼Qwen OCR提取图片文字。
  • 工具名:image_understanding
    • 参数:imageUrlprompt?model?temperature?maxTokens?
    • 功能:使用智谱视觉模型进行图片内容理解与分析。

目录结构

  • src/index.ts:单一 MCP 服务器入口,同时注册两个工具。
  • src/tools/ocr-qwen.ts:图片文字提取工具实现(Qwen OCR)。
  • src/tools/understanding-glm.ts:图片内容理解工具实现(GLM)。
  • src/types.ts:通用类型定义。
  • src/config.ts:模型默认值与枚举。

兼容性

  • Node.js >= 18
  • @modelcontextprotocol/sdk v1 接口

迁移说明

源项目:

  • /Users/fengjinchao/Desktop/mcp/skills/typescript/图片文字提取
  • /Users/fengjinchao/Desktop/mcp/skills/typescript/图片内容理解

两者的核心逻辑已整合并最小改动保留;若后续要合并更多模型,只需在 src/tools 下新增实现,并在 src/index.ts 增加工具注册即可。