Skip to main content

视觉理解 MCP Server - 为不支持视觉的编码模型提供图片理解能力

Project description

视觉理解 MCP Server

为不支持视觉的编码模型提供图片理解能力。

原理

编码模型(如 GLM-5.1)遇到图片时,自动调用 MCP 工具 understand_image,由视觉模型完成图片识别,结果以文本回传给编码模型继续推理。无需切换模型,上下文不中断。

用户粘贴截图 → 编码模型调用 understand_image → 视觉模型识别 → 文字描述回传 → 继续编码

配置

在 MCP 客户端配置中通过 env 传入:

{
  "mcpServers": {
    "visual-understand": {
      "command": "uv",
      "args": [
        "--directory", "/path/to/visual-understand-mcp",
        "run", "visual-understand-mcp"
      ],
      "env": {
        "VISION_API_BASE": "https://dashscope.aliyuncs.com/compatible-mode/v1",
        "VISION_MODEL": "qwen-vl-max",
        "VISION_API_KEY": "sk-xxx"
      }
    }
  }
}
变量 说明 默认值
VISION_API_BASE 视觉模型 API 地址 无(必填)
VISION_MODEL 视觉模型名称 无(必填)
VISION_API_KEY 视觉模型密钥 无(必填)
VISION_TEMPERATURE 输出随机性 0.1
VISION_MAX_TOKENS 最大输出长度 12000
VISION_TIMEOUT 请求超时(秒) 120
VISION_SYSTEM_PROMPT 视觉模型系统提示词 见上

前三个必填,其余可选。配置也可写入 ~/.visual-understand-mcp/config.json,env 优先级更高。

建议写入 CLAUDE.md

进行图片识别任务时,使用 visual-understand MCP 的 understand_image 工具。

本地调试

uv run mcp dev src/visual_understand_mcp/server.py

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

visual_understand_mcp-0.1.0.tar.gz (64.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

visual_understand_mcp-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file visual_understand_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: visual_understand_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 64.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for visual_understand_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 806094b0c4e0f301f80bce668b5ed2397f25a18431faa9880aecd09f08fe472d
MD5 907472f16158fea6807447f88aaed159
BLAKE2b-256 4983d63350ae028f015e3ae629d272655deed0c9558d3c3ce12ff59651635536

See more details on using hashes here.

File details

Details for the file visual_understand_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for visual_understand_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 daeb2c14fc42bb6381aeb60d740aa440b4a0d2c2f1662ce5a7df93ead2203a0d
MD5 c427cf838450cba396e70809f94b6e24
BLAKE2b-256 5f7aa885c0567d822163813f69942f7eb761a67bbd9b5fb69e7459b813d102e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page