image-recognition-mcp
Allows vision-less LLMs to analyze clipboard images by proxying to an OpenAI-compatible vision model for description, OCR, and error diagnosis.
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., "@image-recognition-mcpWhat's in the screenshot in my clipboard?"
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.
clipboard-vision-mcp
给你的编码助手或 AI 工具装上"眼睛"。注册这个 MCP 服务后,原本没有视觉能力的 LLM 可以读取剪贴板截图、本地图片、HTTP(S) 图片 URL、data URL 或 base64 图片,并返回文字描述或对图片问题的回答。
LLM(无视觉)──MCP/stdio──► clipboard-vision-mcp ──OpenAI-compatible API──► 视觉模型 ──► 文本结果使用
1. 准备依赖
需要:
Node.js 20 或更高版本
能访问视觉模型的 OpenAI-compatible API key
剪贴板图片读取工具:
macOS:
brew install pngpasteWindows:系统内置 PowerShell,无需额外安装
Linux Wayland:
wl-paste(来自wl-clipboard)Linux X11:
xclip
包地址:clipboard-vision-mcp on npm
2. 配置 MCP Host
在 MCP Host 的 mcpServers 中添加,并按你的 OpenAI-compatible provider 填写 env:
{
"mcpServers": {
"clipboard-vision": {
"command": "npx",
"args": ["-y", "clipboard-vision-mcp"],
"env": {
"OPENAI_API_KEY": "your-api-key",
"OPENAI_MODEL": "your-vision-model",
"OPENAI_BASE_URL": "https://your-openai-compatible-endpoint/v1"
}
}
}
}3. 验证
复制一张截图到剪贴板,然后向你的 AI 助手提问:
分析我剪贴板里的截图,上面有什么文字?
如果 MCP Host 已正确加载服务,助手会调用默认读取剪贴板的 recognize_image,然后返回图片内容。
Related MCP server: clipboard-vision-mcp
工具
recognize_image
单个通用图片识别工具。默认读取剪贴板,也可以通过 image 参数传入本地路径、HTTP(S) URL、data URL、base64 或 "clipboard"。
参数 | 类型 | 必填 | 默认值 | 说明 |
| string | 否 |
| 路径 / URL / data URL / base64 / |
| string | 否 |
| 对图片的提问或指令 |
|
| 否 |
| 视觉 detail 级别, |
| integer | 否 |
| 响应最大 token 数 |
示例问题:
描述这张截图
提取图片里的文字
这张 UI 截图里有什么错误提示?
这个图表表达了什么?
返回 { content: [{ type: "text", text: "..." }] };失败时返回 isError: true 和错误信息。
配置项
除在 MCP Host 的 env 中直接设置外,也支持项目根目录的 .env 文件。MCP Host 传入的环境变量优先级更高。
环境变量 | 默认值 | 说明 |
| 必填 | OpenAI-compatible API key |
|
| 视觉模型名 |
| OpenAI 默认地址 | OpenAI-compatible 网关地址 |
|
| 请求超时时间(毫秒) |
|
| 设为 |
| 空 | 路径 allowlist,逗号分隔,例如 |
Provider 配置示例:
OPENAI_API_KEY=...
OPENAI_MODEL=your-vision-model
OPENAI_BASE_URL=https://your-openai-compatible-endpoint/v1本地文件、data URL、原始 base64 和剪贴板输入必须是 PNG、JPEG、GIF、WebP 或 BMP 格式,单张不超过 20 MiB。HTTP/HTTPS URL 会作为 URL 直接传给 OpenAI-compatible API。
开发
从源码运行:
git clone <this-repo> image-recognition-mcp
cd image-recognition-mcp
npm install
npm run build本地调试:
npm run dev
# 或
npm run build && npm start如果从本地 clone 作为 MCP server 使用,配置里改用 "command": "node",args 指向 dist/index.js 的绝对路径。
服务通过 stdio 收发 MCP 消息:从 stdin 读 JSON-RPC,向 stdout 写回响应。
项目结构
clipboard-vision-mcp/
├── package.json
├── tsconfig.json
├── .env.example
└── src/
├── index.ts # MCP server 入口,注册工具和 stdio transport
├── config.ts # 加载和校验 env 配置
├── tools/
│ └── recognize.ts # 视觉工具定义和 handler
├── providers/
│ └── openai.ts # OpenAI-compatible 视觉调用
└── inputs/
├── index.ts # resolveImage() 分发器
├── types.ts
├── image.ts # 图片 MIME、大小、magic-byte 校验
├── file.ts # 本地路径转 base64
├── url.ts # HTTP(S) URL 透传
├── base64.ts # base64 / data URL
└── clipboard.ts # macOS / Windows / Linux 剪贴板图片读取License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables vision capabilities for any AI model by routing image analysis requests through OpenRouter's vision models. It provides tools to analyze images from URLs, local file paths, or base64 data.Last updated29117MIT
- AlicenseBqualityCmaintenanceEnables text-only AI models to understand clipboard images by describing them through a vision model, eliminating manual file saving.Last updated1230MIT
- Alicense-qualityDmaintenanceEnables text-only LLMs to analyze images by routing them to an OpenAI-compatible vision backend, supporting local files, URLs, and data URLs.Last updated53MIT
- AlicenseAqualityCmaintenanceProvides image/vision support for OpenCode by routing images to any OpenAI-compatible endpoint, enabling paste-and-ask screenshot workflows.Last updated1MIT
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
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/llt22/image-recognition-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server