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

@niaoyue/mcp-vision-client

v1.1.4

Published

Simple MCP Vision Client for remote image analysis

Readme

MCP Vision Client

🖼️ 一个简单的MCP视觉客户端,用于远程图片分析。

🚀 快速开始

安装

# 全局安装
npm install -g @niaoyue/mcp-vision-client

# 或使用 npx (推荐)
npx @niaoyue/mcp-vision-client --help

基本用法

# 直接运行 (需要先配置环境变量)
MCP_SERVER_URL=http://your-server:3002 MCP_CLIENT_TOKEN=your-token mcp-vision-client

# 或使用命令行参数
mcp-vision-client --server-url http://your-server:3002 --token your-token

🔧 配置

命令行参数

  • -s, --server-url <url> - 服务端地址
  • -t, --token <token> - 客户端认证令牌 (必需)
  • --timeout <ms> - 请求超时时间 (默认: 30000)
  • --max-size <bytes> - 最大图片大小 (默认: 7340032)
  • -h, --help - 显示帮助信息

环境变量

  • MCP_SERVER_URL - 服务端地址
  • MCP_CLIENT_TOKEN - 客户端认证令牌
  • MCP_TIMEOUT - 请求超时时间
  • MCP_MAX_SIZE - 最大图片大小

📋 在AI应用中使用

Claude Code CLI 配置

~/.claude.json 中添加:

{
  "mcpServers": {
    "mcp-vision-client": {
      "command": "npx",
      "args": [
        "@niaoyue/mcp-vision-client",
        "--server-url", "http://your-server:3002",
        "--token", "your-secure-token"
      ]
    }
  }
}

若需兼容 GLM 原生 API,可指定 tool-format

{
  "mcpServers": {
    "mcp-vision-client": {
      "command": "npx",
      "args": [
        "@niaoyue/mcp-vision-client",
        "--server-url", "http://your-server:3002",
        "--token", "your-secure-token"
      ]
    }
  }
}

使用环境变量方式

{
  "mcpServers": {
    "mcp-vision-client": {
      "command": "bash",
      "args": ["-c", "MCP_SERVER_URL=http://your-server:3002 MCP_CLIENT_TOKEN=your-token npx @niaoyue/mcp-vision-client"]
    }
  }
}

当前返回的是标准 MCP inputSchema 定义;若需 GLM 原生 function.parameters 结构,请在代理层自行转换。


## 🎯 API使用

### 可用工具

**analyze_image** - 分析图片内容

参数:
- `image_source` (必需) - 图片的本地路径或URL
- `prompt` (可选) - 分析指令,默认识别文字

示例:
```javascript
// 通过AI应用调用
const result = await mcp.callTool("analyze_image", {
  image_source: "/path/to/image.png",
  prompt: "请识别图片中的文字内容"
});

🔒 安全说明

  • ✅ 客户端不存储API密钥
  • ✅ 通过Bearer Token认证
  • ✅ 支持HTTPS加密传输
  • ✅ 文件大小限制保护

🛠️ 开发

本地开发

# 克隆仓库
git clone https://github.com/niaoyue/mcp-vision-client.git
cd mcp-vision-client

# 安装依赖
npm install

# 运行测试
npm test

# 链接全局测试
npm link
mcp-vision-client --help

发布到npm

# 登录npm
npm login

# 发布
npm publish

📦 依赖

  • Node.js 18+
  • @modelcontextprotocol/sdk
  • dotenv

🤝 贡献

欢迎提交Issues和Pull Requests!

📄 许可证

MIT License

🔗 相关链接