MCP Vision Relay
MCP Vision Relay enables text-only AI models to analyze images by relaying requests through locally-installed multimodal CLIs (Google Gemini and Qwen) via the Model Context Protocol.
Image Analysis Tools
gemini_analyze_imageandqwen_analyze_imagetools for processing images using Gemini or Qwen's vision capabilitiesSupport for local file paths, HTTP(S) URLs, and base64-encoded images with automatic validation and temporary file management
Customizable Execution
Custom prompts and model overrides (e.g.,
gemini-2.0-flash,qwen2.5-omni-medium)Output format control (text or JSON for Gemini)
Configurable timeouts (up to 600 seconds), sandbox mode, and custom CLI flags
Per-call CLI path overriding via
cliPathparameter
Integration & Output
Seamless MCP integration for clients like Claude and Codex to gain multimodal capabilities
Structured responses with Markdown content and metadata (model used, processing time, input source)
Environment configuration support via .env files for CLI paths and default settings
Use Case: Bridge text-only AI deployments (like Claude with DeepSeek, MiniMax, or k2 providers) to gain vision capabilities without switching providers.
Provides image analysis capabilities by relaying requests to the Google Gemini CLI, supporting local paths, URLs, and base64 image inputs with configurable models, prompts, and output formats.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Vision Relayanalyze this screenshot of my app's dashboard using Gemini and describe any UI issues"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Vision Relay
MCP Vision Relay 将本地安装的多模态 CLI(目前支持 Google Gemini CLI 与 Qwen CLI)封装为 Model Context Protocol (MCP) 服务器,帮助 Claude、Codex 等支持 MCP 的工具直接使用它们的看图能力。
Why it matters: when Claude Code connects to providers such as k2, DeepSeek, or MiniMax M2, the backing models today are text-only—no built-in vision. By relaying calls through Gemini/Qwen CLI, MCP Vision Relay gives those deployments an inexpensive path to regain multimodal features without switching providers.
Features
Unified image tools –
gemini_analyze_image与qwen_analyze_image两个工具覆盖路径、URL、base64 三种输入。Provider relay architecture – 通过 provider 抽象切换或扩展不同 CLI,保留模型、输出格式等配置能力。
Robust input handling – 自动校验图片大小、扩展名,必要时下载或写入临时文件并在使用后清理。
Configurable execution – 支持可选 sandbox、超时、额外旗标、模型覆盖,以及
.env/环境变量配置。Actionable outputs – 对 stdout 进行规整并附加元信息,便于客户端在 UI 中展示或后续处理。
Related MCP server: 2Xapi.com GPT-image MCP Server
Quick Start
Prerequisites
Node.js ≥ 18
已安装并能在命令行直接调用的 Gemini CLI 与/或 Qwen CLI
对应 CLI 的登陆/鉴权已完成(确保
gemini -p "hi"、qwen -p "hi"能返回结果)
Install & Build
npm install
npm run buildRun the MCP server
# 开发模式(tsx 直接启动 TypeScript)
npm run dev
# 生产模式(使用编译产物)
npm run start服务器通过 stdio 与 MCP 客户端通信,适用于 claude mcp add、codex mcp add 等命令。
MCP Integration Examples
⚠️ When registering the server with an MCP client, invoke the entry point directly. Running
npm run devinside the registration command causes npm to print a banner on stdout, which breaks the MCP handshake. If you must keep the npm script, wrap it withnpm --silent run dev --so no extra text reaches stdout.
Claude
claude mcp add mcp-vision-relay -- npx tsx /absolute/path/to/mcp-vision-relay/src/index.tsCodex CLI
codex mcp add mcp-vision-relay -- node /absolute/path/to/mcp-vision-relay/dist/index.js完成后即可在会话/任务中选择 mcp-vision-relay 的工具调用。
Available Tools
gemini_analyze_image
分析图像并返回 Gemini CLI 给出的描述。
参数 | 类型 | 说明 |
| string | 必填;本地路径、HTTP(S) URL 或 base64 字符串 |
| string? | 额外指令,默认使用 |
| string? | 覆盖默认模型(如 |
|
| 控制 |
| boolean? | 是否添加 |
| string[]? | 附加自定义参数 |
| number? | CLI 超时(默认 120000ms) |
返回内容包含一段 Markdown 文本与元信息(模型、输入来源、耗时等)。
qwen_analyze_image
走 Qwen CLI 进行图像理解。逻辑与 Gemini 类似,但会在需要时自动把本地文件转成 data URL 供 CLI 读取。
参数 | 类型 | 说明 |
| string | 必填;本地路径、HTTP(S) URL 或 base64 字符串 |
| string? | 额外指令,默认使用 |
| string? | Qwen 模型(如 |
| boolean? | 是否加 |
| string[]? | 附加参数 |
| number? | CLI 超时(默认 120000ms) |
Configuration
复制 .env.example 进行配置,常用条目:
GEMINI_CLI_COMMAND/QWEN_CLI_COMMAND:CLI 可执行文件路径。GEMINI_DEFAULT_MODEL/QWEN_DEFAULT_MODEL:默认模型名。GEMINI_OUTPUT_FORMAT:控制 Gemini 输出(text或json)。MCP_COMMAND_TIMEOUT_MS:全局超时(毫秒)。MCP_MAX_IMAGE_BYTES:允许的最大图片大小。MCP_ALLOWED_IMAGE_EXTENSIONS:允许的扩展名列表。MCP_IMAGE_TEMP_DIR:存放下载/解码后临时文件的目录。
如需针对单次调用覆盖 CLI 命令,可在工具参数中提供 cliPath(Gemini/Qwen 均支持)。
Local Diagnostics
项目提供两个简单脚本,便于手动验证 CLI 调用:
npx tsx scripts/dev/manual-gemini-test.ts
npx tsx scripts/dev/manual-qwen-test.ts确保在执行前已完成 npm run build 或使用 ts-node/tsx。
Project Structure
src/
index.ts # 程序入口,加载 env 并启动 MCP 服务器
config/ # 配置解析(appConfig 等)
providers/ # CLI provider 适配层(Gemini/Qwen)
server/ # MCP server wiring
tools/ # MCP 工具定义与注册
utils/ # 文件、CLI 调度等公共工具
scripts/
dev/ # 手动验证脚本
test-assets/ # 示例图像资源Roadmap
✅ Gemini CLI 图像分析
✅ Qwen CLI 图像分析(含自动 data URL)
⏳ 资源列表与更多多模态 provider
⏳ 自动化测试与 lint/format pipeline
License
MIT License. 欢迎 issue / PR 贡献改进。
Acknowledgements
Available Tools
2 toolsgemini_analyze_imageC
Use Google Gemini CLI to describe or analyze an image using multimodal capabilities.
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Local file path, http(s) URL, or base64-encoded image to analyze. | |
| prompt | No | Instruction for Gemini. Defaults to config value. | |
| model | No | Gemini model identifier (e.g., gemini-2.0-flash). | |
| cliPath | No | Override the Gemini CLI executable path. | |
| sandbox | No | Whether to run the CLI with the sandbox flag (-s). | |
| outputFormat | No | Request Gemini CLI to return the specified output format. | |
| extraFlags | No | Additional CLI flags to append as-is. | |
| timeoutMs | No | Maximum time (in milliseconds) to wait for CLI execution. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It mentions 'multimodal capabilities' but doesn't explain what this means operationally, nor does it cover important behavioral aspects like rate limits, authentication requirements, error handling, or what happens when the CLI fails. The description is too vague about the tool's actual behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at just one sentence with zero wasted words. It's front-loaded with the core functionality and efficiently communicates the essential purpose without unnecessary elaboration. Every word earns its place in this minimal description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 8 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns, how to interpret results, error conditions, or operational constraints. The description fails to compensate for the lack of structured metadata, leaving significant gaps in understanding how to effectively use this complex tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the schema already documents all 8 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline of 3. The description doesn't explain parameter interactions, default behaviors, or provide examples of effective parameter combinations.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('describe or analyze an image') and the technology used ('Google Gemini CLI with multimodal capabilities'), which provides a specific verb+resource combination. However, it doesn't explicitly differentiate from its sibling 'qwen_analyze_image' beyond mentioning the different technology stack.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, including its sibling 'qwen_analyze_image'. There's no mention of specific use cases, prerequisites, or comparative advantages that would help an agent choose between available image analysis tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
qwen_analyze_imageC
Use Qwen CLI to describe or analyze an image with its multimodal capabilities.
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Local file path, http(s) URL, or base64-encoded image to analyze. | |
| prompt | No | Instruction for Qwen. Defaults to config value. | |
| model | No | Qwen model identifier. | |
| cliPath | No | Override the Qwen CLI executable path. | |
| sandbox | No | Whether to run the CLI with the sandbox flag (-s). | |
| extraFlags | No | Additional CLI flags to append as-is. | |
| timeoutMs | No | Maximum time (in milliseconds) to wait for CLI execution. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. The description mentions 'multimodal capabilities' but doesn't explain what this entails (e.g., types of analysis, output format, limitations). It also lacks details on permissions, rate limits, error handling, or what happens during execution (e.g., whether it's synchronous). This leaves significant gaps for an agent to understand the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every element ('Use Qwen CLI', 'describe or analyze an image', 'multimodal capabilities') contributing essential information. There's zero waste in the phrasing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (7 parameters, no annotations, no output schema), the description is insufficiently complete. It doesn't explain the return values or output format, which is critical since there's no output schema. It also lacks behavioral context (e.g., what 'analyze' entails, error cases, or performance characteristics). For a tool with this many parameters and no structured support, the description should provide more guidance.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema fully documents all 7 parameters with clear descriptions. The tool description adds no additional parameter information beyond what's in the schema. According to the rules, when schema coverage is high (>80%), the baseline score is 3 even with no param info in the description, which applies here.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'describe or analyze an image with its multimodal capabilities' using Qwen CLI. It specifies the verb ('describe or analyze'), resource ('image'), and technology ('Qwen CLI'), making the purpose unambiguous. However, it doesn't explicitly differentiate from its sibling 'gemini_analyze_image' beyond mentioning Qwen specifically.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention the sibling tool 'gemini_analyze_image' or any other alternatives, nor does it provide context about when Qwen might be preferred over other image analysis tools. Usage is implied through the tool name and description but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
- First observed
gemini_analyze_image - First observed
qwen_analyze_image
TDQS
The two tools are essentially identical in purpose—both describe or analyze images using multimodal capabilities, differing only in the underlying model (Gemini vs. Qwen). An agent would have no clear basis to choose one over the other based on their descriptions, leading to confusion and misselection.
The tool names follow a perfectly consistent pattern: both use a clear 'model_verb_noun' structure (gemini_analyze_image, qwen_analyze_image). This consistency makes it easy to understand what each tool does at a glance.
With only two tools, the server feels thin for a vision-related domain, as it lacks coverage for common operations like image generation, editing, or filtering. The tools are redundant in functionality, making the count seem artificially low for the apparent scope.
The tool surface is severely incomplete for a vision server; it only offers image analysis via two similar models, with no support for tasks like image creation, transformation, or retrieval. This creates significant gaps that will limit agent capabilities in handling broader vision workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Create images & video from any MCP agent — 17 models, spend limits, one URL.
Related MCP Servers
- FlicenseAqualityBmaintenanceEnables text-only agents to process images by accepting image files, base64 data, or URLs, sending them to multimodal models, and returning structured text results via MCP.41-
- AlicenseAqualityAmaintenanceWraps OpenAI-compatible text-to-image APIs as MCP tools, enabling image generation directly from conversations in Claude Code, Codex, Cursor, or Claude Desktop using the user's own API key.62Apache 2.0
- AlicenseAqualityBmaintenanceMCP server that exposes an analyze_image tool using Gemini vision models to describe or analyze images from local paths, URLs, or base64 data URIs.115MIT
- AlicenseNot gradedqualityCmaintenanceProvides multimodal vision MCP tools for image analysis, OCR, object detection, text-to-image generation, and image similarity, integrating OpenAI, Qwen, and Gemini.321MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ah-wq/mcp-vision-relay'
If you have feedback or need assistance with the MCP directory API, please join our Discord server