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.
Screen.Recording.2026-01-18.at.00.39.17.mov
Screen.Recording.2026-01-18.at.00.40.12.mov
Many models — open-weight ones especially — have no vision capability. They are text-only and simply cannot process image input. For some of these models (like MiniMax), a workaround exists: an MCP tool that reads the image externally using a vision service and returns the analysis as text the model can use. But this workaround itself has a catch, which creates two problems:
1. No vision capability — The model cannot process images. Paste one into the chat and it's silently ignored.
2. The MCP workaround needs a file path — The MCP image tool requires a local file path or URL to read from — not a clipboard paste. Without automation, every time you want to share a screenshot you have to save it manually, find the path, and type it into your message.
This plugin automates the entire workaround. It intercepts pasted images, saves them to disk automatically, 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.
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 example — openrouter-image-mcp:
This 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-nano-12b-v2-vl:free"
}
}
}
}Tip
nvidia/nemotron-nano-12b-v2-vl:free is a free vision model on OpenRouter that requires no credits.
Note
Any MCP server with an image analysis tool will work — the above are just examples. For a different tool, add it to opencode.json the same way, then point the plugin to it using imageAnalysisTool — see Image Analysis Tool.
Add opencode-minimax-easy-vision to the plugin array in your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-minimax-easy-vision"]
}Important
By default, this plugin only activates for MiniMax models. If you're using a different model and nothing is happening, configure the plugin to activate for that model — see Model Patterns below.
Config files are loaded in priority order:
- Project level:
.opencode/opencode-minimax-easy-vision.json - User level:
~/.config/opencode/opencode-minimax-easy-vision.json
Control which models the plugin activates for:
{
"models": ["z-ai/*", "*/some-model"]
}| Pattern | Matches |
|---|---|
* |
All models |
z-ai/* |
All models from a specific provider |
*/some-model |
A specific model from any provider |
z-ai/glm-4.7 |
Exact match |
If no config file exists, the plugin defaults to MiniMax models.
By default the plugin uses mcp_minimax_understand_image from the MiniMax Coding Plan MCP. To use a different tool, set imageAnalysisTool to the tool name. The name follows the format mcp_<server-key>_<tool>, where <server-key> is the key you used when adding the server to the mcp object in opencode.json:
{
"models": ["z-ai/*"],
"imageAnalysisTool": "mcp_openrouter_image_analyze_image"
}Override the default injection prompt with a custom template:
{
"promptTemplate": "I'm attaching {imageCount} image(s) for you to analyze.\n\nImages:\n{imageList}\n\nUse the `{toolName}` tool on each one.\n\nMy question: {userText}"
}| Variable | Description |
|---|---|
{imageList} |
Newline-separated list: - Image 1: /path/to/file |
{imageCount} |
Number of images, e.g. 1, 3 |
{toolName} |
The configured MCP tool name |
{userText} |
The user's original message text (may be empty) |
The template must include at least one variable — if none are present, the plugin falls back to the default prompt.
PNG, JPEG, WebP — exact formats depend on the image analysis tool you've configured.
- Select a configured model in OpenCode.
- Paste an image (
Cmd+V/Ctrl+V). - Ask your question — just like you would with Claude or GPT.
See CONTRIBUTING.md for local development setup.
AGPL-3.0. See LICENSE.