opencode-easy-visionOpenCode plugin that restores the paste-and-ask workflow for text-only models by saving pasted images and injecting MCP tool instructions
33
418
近 7 天 112
47.1
生态多维模型
1 个月前
2026-07-18
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-easy-vision@1.6.1"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-easy-vision@1.6.1"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-easy-visionopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
An OpenCode plugin that adds vision support to models that lack it — paste images directly into the chat and ask questions, just like you would with Claude or GPT.
[!IMPORTANT]
Renamed from
opencode-minimax-easy-vision: Existing users only need to replace the old package name in thepluginarray withopencode-easy-vision. Existing plugin configuration continues to work; no other migration is required.
Table of Contents
- The Problem
- Demo
- Setup
- Usage
- Configuration
- Supported Image Formats
- Troubleshooting
- Uninstallation
- Contributing
- License
- References
The Problem
Many models — open-weight ones especially — have no vision capability. They are text-only and simply cannot process image input. For some (like MiniMax), a workaround exists: an MCP tool that reads the image externally using a vision service and returns the analysis as text. But that tool requires a local file path, not a clipboard paste — meaning you'd have to save every screenshot manually, find the path, and type it in.
This plugin automates the entire workaround. It intercepts pasted images, saves them to disk, and injects the right instructions for the model to call the MCP tool with the correct path. You paste, you ask — the plugin handles the rest.
Demo
| Without the plugin | With the plugin |
|---|---|
| The image is silently ignored by the model. | The model analyzes the attached image correctly before answering. |
https://github.com/user-attachments/assets/da7d8618-5de1-4a00-9250-a91493e3ea16
https://github.com/user-attachments/assets/fdb68339-b95b-46eb-90d4-ac2dbc0f436e
Setup
For Humans
1. Configure an MCP image analysis tool
The plugin works with any MCP server that can read an image and return its analysis as text. Add one to your opencode.json.
Default — MiniMax Coding Plan MCP:
{
"mcp": {
"MiniMax": {
"type": "local",
"command": ["uvx", "minimax-coding-plan-mcp"],
"environment": {
"MINIMAX_API_KEY": "your-api-key-here",
"MINIMAX_API_HOST": "https://api.minimax.io"
}
}
}
}
Alternative — openrouter-image-mcp:
Routes image analysis through OpenRouter, giving you access to any vision-capable model including free ones.
{
"mcp": {
"openrouter_image": {
"type": "local",
"command": ["npx", "openrouter-image-mcp"],
"environment": {
"OPENROUTER_API_KEY": "your-api-key-here",
"OPENROUTER_MODEL": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free"
}
}
}
}
[!TIP]
nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:freeis a free multimodal model designed for image perception and reasoning. Free model availability changes over time, so check OpenRouter's free models for current alternatives. Free endpoints use shared capacity and may respond more slowly or time out under load. When using this server, setimageAnalysisTooltoopenrouter_image_analyze_imagein the plugin config.
[!NOTE]
Any MCP server with an image analysis tool will work — the above are just examples. For a different tool, point the plugin to it using
imageAnalysisTool— see Configuration.
2. Install the plugin
With the OpenCode CLI (v1.3.4+):
Global (all projects):
opencode plugin opencode-easy-vision --global
Project-level (current directory only):
opencode plugin opencode-easy-vision
Or manually, add it to the plugin array in your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-easy-vision"]
}
For LLM Agents
Paste this into OpenCode and let your agent handle the rest:
Set up opencode-easy-vision by following https://raw.githubusercontent.com/devadathanmb/opencode-easy-vision/main/AGENT_SETUP.md
What the agent will do
The agent follows the instructions in AGENT_SETUP.md. It will:
- Pre-fetch your existing config and the full configuration reference before asking anything
- Ask which MCP image analysis tool you want (MiniMax, OpenRouter, or something else) and collect the relevant API key
- Ask which models the plugin should activate for
- Apply all changes — updating existing files in place rather than replacing them
- Walk you through verifying the setup after a restart
Usage
- Select a configured model in OpenCode.
- Paste an image (
Cmd+V/Ctrl+V). - Ask your question — just like you would with Claude or GPT.
Configuration
[!IMPORTANT]
By default, this plugin only activates for MiniMax provider models — i.e. models where MiniMax is the direct provider in OpenCode (IDs matching
minimax/*,minimax-cn/*, etc.). If you're accessing a MiniMax model through a third-party provider like OpenRouter, or using a completely different model, the plugin won't activate until you add that model's pattern to themodelsconfig — see CONFIGURATION.md.
Config files are loaded in priority order:
- Project level:
.opencode/opencode-easy-vision.json(or.jsonc) - User level:
~/.config/opencode/opencode-easy-vision.json(or.jsonc)
On first load, an example config is created at ~/.config/opencode/opencode-easy-vision.jsonc. See CONFIGURATION.md for the full reference.
Supported Image Formats
PNG, JPEG, WebP — exact formats depend on the image analysis tool you've configured.
Troubleshooting
Plugin not updating after a new release?
OpenCode caches plugins under ~/.cache/opencode/packages/. If it's still running an old version after a release, clear the cache entry and restart:
rm -rf ~/.cache/opencode/packages/opencode-easy-vision@latest
Plugin not activating?
By default the plugin only fires for MiniMax provider models (IDs matching minimax/*, minimax-cn/*, etc.). It will not activate for a MiniMax model accessed through OpenRouter or any other provider. To use the plugin with a different model or provider, add the model's ID pattern to models in your config — see CONFIGURATION.md.
Uninstallation
Remove
opencode-easy-visionfrom thepluginarray in youropencode.jsonfile.Delete the config files the plugin created:
rm -f ~/.config/opencode/opencode-easy-vision.{json,jsonc}
Contributing
See CONTRIBUTING.md for local development setup.
License
AGPL-3.0. See LICENSE.