Skip to main content
Glama

mcp-scan-qr

这是一个基于 FastMCP 框架构建的 MCP (Model Context Protocol) 工具包,用于从图像中扫描二维码。

功能

当前实现了以下二维码扫描工具:

  • scanQRCode: 从单个图片URL扫描二维码

  • scanQRCodeBatch: 从多个图片URL批量扫描二维码

安装依赖

bun install

运行项目

bun run dev

调试项目

bun run inspect

构建项目

bun run build

部署 MCP

{
  "mcpServers": {
    "mcp-scan-qr": {
      "args": ["-y","@pidanmoe/mcp-scan-qr"],
      "command": "npx",
      "env": {
        // 环境变量
      }
    }
  }
}

项目结构

使用说明

该工具包提供了两个MCP工具:

scanQRCode

从单个HTTPS图片URL扫描二维码:

{
  "name": "scanQRCode",
  "arguments": {
    "imageUrl": "https://example.com/qrcode.png"
  }
}

scanQRCodeBatch

从多个HTTPS图片URL批量扫描二维码(最多10个):

{
  "name": "scanQRCodeBatch",
  "arguments": {
    "imageUrls": [
      "https://example.com/qrcode1.png",
      "https://example.com/qrcode2.png"
    ]
  }
}

两个工具都会返回包含扫描结果的JSON字符串。成功时返回二维码内容,失败时返回错误信息。

技术栈

  • Bun - JavaScript/TypeScript 运行时

  • FastMCP - MCP 框架

  • Zod - TypeScript-first schema declaration and validation library

  • jsQR - JavaScript QR code reader

  • Sharp - High performance Node.js image processing

  • Axios - Promise based HTTP client


此项目使用 bun v1.2.19 创建。Bun 是一个快速的一体化 JavaScript 运行时。

-
security - not tested
F
license - not found
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pidanmeng/mcp-scan-qr'

If you have feedback or need assistance with the MCP directory API, please join our Discord server