Skip to main content
Glama

vision-bridge-mcp

Verleihen Sie Ihrem reinen Text-OpenCode-Agenten Augen.

OpenCodes reine Textmodelle (z. B. DeepSeek V4) können keine Bilder lesen – wenn Sie also einen Screenshot einer Fehlermeldung, eine Whiteboard-Skizze oder ein Foto eines UI-Entwurfs anhängen, hat der Agent keine Ahnung, was darauf zu sehen ist. vision-bridge-mcp ist ein kleiner MCP-Server, der sich direkt in OpenCode einfügt und ihm zwei neue Werkzeuge zur Verfügung stellt: analyze_image (allgemeine Beschreibung / visuelle Fragen & Antworten) und ocr_image (exakte Texttranskription), beide unterstützt von der Gemini-API (gemini-3.6-flash standardmäßig – überschreibbar mit GEMINI_MODEL, falls Google es später einstellt; aktuelle Modell-IDs finden Sie unter https://ai.google.dev/gemini-api/docs/models).

Ist es erst einmal konfiguriert, brauchen Sie dem Agenten nur noch zu sagen, er solle sich eine Datei ansehen:

Look at ./screenshots/error.png and tell me what's failing.

und er ruft selbstständig analyze_image auf – kein manuelles Kopieren und Einfügen in ein Chat-Fenster, kein separater CLI-Schritt.

Voraussetzungen

  • Node.js 18 oder höher

  • Ein kostenloser Gemini-API-Schlüssel – einen erhalten Sie unter https://aistudio.google.com/apikey (kostenlose Stufe: 1.500 Anfragen/Tag, keine Kreditkarte erforderlich)

Related MCP server: Vision MCP Server

Installation

Kein Klonen erforderlich. Fügen Sie Folgendes zu Ihrer OpenCode-Konfiguration hinzu (opencode.json im Projektstamm oder ~/.config/opencode/opencode.json für eine globale Einrichtung):

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "vision-bridge": {
      "type": "local",
      "command": ["npx", "-y", "vision-bridge-mcp"],
      "environment": {
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Starten Sie OpenCode neu (oder führen Sie opencode mcp zum erneuten Verbinden aus), und die Werkzeuge analyze_image und ocr_image erscheinen automatisch. npx lädt das Paket beim ersten Ausführen herunter und speichert es zwischen – nichts muss von Hand erstellt oder installiert werden.

Ziehen Sie eine Umgebungsvariable vor, anstatt den Schlüssel in der Konfigurationsdatei fest zu kodieren? Setzen Sie stattdessen GEMINI_API_KEY in Ihrem Shell-Profil und entfernen Sie den Block "environment" – der Server liest ihn so oder so aus der Prozessumgebung.

Eigenständig ausführen (für Entwicklung oder Tests)

git clone https://github.com/YOUR_GITHUB_USERNAME/vision-bridge-mcp.git
cd vision-bridge-mcp
npm install
cp .env.example .env   # then fill in GEMINI_API_KEY
npm start

Der Server spricht MCP über stdio, also wartet er für sich allein nur darauf, dass sich ein Client (wie OpenCode) verbindet – das ist normal.

Werkzeuge

analyze_image

Allgemeines Bildverständnis. Geben Sie einen Pfad und optional eine benutzerdefinierte Eingabeaufforderung an.

Parameter

Erforderlich

Beschreibung

image_path

ja

Pfad zu einem lokalen Bild (absolut oder relativ zum Arbeitsverzeichnis von OpenCode)

prompt

nein

Benutzerdefinierte Anweisung. Standardmäßig eine entwicklerorientierte Beschreibung.

ocr_image

Transkribiert sichtbaren Text wörtlich – nützlich für Fehlerdialoge, Terminal-Screenshots oder abfotografierte Notizen.

Parameter

Erforderlich

Beschreibung

image_path

ja

Pfad zu einem lokalen Bild (absolut oder relativ zum Arbeitsverzeichnis von OpenCode)

Beide Werkzeuge unterstützen PNG, JPEG, WEBP, GIF und HEIC/HEIF, standardmäßig bis zu 20 MB.

Konfiguration

Die gesamte Konfiguration erfolgt über Umgebungsvariablen (setzen Sie sie direkt, in einer .env-Datei für den eigenständigen Gebrauch oder im Block "environment" Ihres opencode.json-MCP-Eintrags):

Variable

Erforderlich

Standard

Beschreibung

GEMINI_API_KEY

ja

—

Ihr Gemini-API-Schlüssel

GEMINI_MODEL

nein

gemini-3.6-flash

Ein beliebiges Gemini-Modell mit Vision-Unterstützung

VISION_BRIDGE_MAX_IMAGE_MB

nein

20

Bilder ablehnen, die größer sind als dieser Wert

Der Server startet auch ohne gesetztes GEMINI_API_KEY (damit opencode mcp die Werkzeuge weiterhin auflisten kann) – er meldet erst dann einen Fehler mit einer klaren Meldung, wenn ein Werkzeug tatsächlich ohne konfigurierten Schlüssel aufgerufen wird.

Fehlerbehandlung

Jeder Werkzeugaufruf endet entweder mit einem Textergebnis oder schlägt mit isError: true und einer spezifischen, umsetzbaren Meldung fehl – bei einer fehlenden Datei, einem nicht unterstützten Format, einer Datei über dem Größenlimit, einem fehlenden/ungültigen API-Schlüssel oder einem vorgelagerten Gemini-Fehler. Der Server stürzt bei einem fehlerhaften Aufruf nie ab.

Entwicklung

npm install
npm test    # unit tests (node's built-in test runner, no network needed)
npm run lint

Die Testsuite deckt Pfadauflösung, MIME-Typ-Erkennung und Dateivalidierung ab (fehlende Dateien, Verzeichnisse, leere Dateien, zu große Dateien) – also die Eingabeverarbeitungslogik, die im realen Einsatz am ehesten bricht. Der Gemini-API-Aufruf selbst wird hier nicht gemockt/getestet, da er einen echten Schlüssel erfordert; wenn Sie diesen Pfad überprüfen möchten, setzen Sie GEMINI_API_KEY und führen Sie npm start aus, und verbinden Sie sich dann mit einem beliebigen MCP-Client (oder dem MCP Inspector).

Veröffentlichung (Maintainer)

npm login
npm publish --access public

Erhöhen Sie zuerst die version in package.json – npx -y vision-bridge-mcp löst immer die neueste veröffentlichte Version auf.

Mitwirken

Siehe CONTRIBUTING.md.

Lizenz

MIT – siehe LICENSE.

Available Tools

2 tools
analyze_imageD
ParametersJSON Schema
NameRequiredDescriptionDefault
promptNoOptional custom instruction for what to look for or how to describe the image. If omitted, a general developer-focused description is returned.
image_pathYesPath to a local image file (absolute, or relative to the directory OpenCode was started in). Supports PNG, JPEG, WEBP, GIF, HEIC/HEIF.

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ocr_imageD
ParametersJSON Schema
NameRequiredDescriptionDefault
image_pathYesPath to a local image file to extract text from (absolute, or relative to the directory OpenCode was started in). Supports PNG, JPEG, WEBP, GIF, HEIC/HEIF.

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

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.

  1. 2 tool updatesv0.1.2
    • First observedanalyze_image
    • First observedocr_image

TDQS

D1.8/5.0

Scored across 2 tools

Disambiguation4/5

The tool names suggest distinct purposes — one for general image analysis and one for OCR. However, the complete lack of descriptions introduces some ambiguity about their exact boundaries.

Naming Consistency5/5

Both tools follow the same verb_noun pattern: analyze_image and ocr_image. The naming convention is clear, consistent, and predictable.

Tool Count3/5

With only two tools, the server feels minimal and borderline thin for an image-related service. The count is not excessive, but it is at the low edge of what could be considered a functional toolset.

Completeness2/5

A vision-bridge server with only image analysis and OCR lacks obvious capabilities like object detection, image comparison, or metadata extraction. The surface appears significantly incomplete for a general vision service.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    Not graded
    maintenance
    Enables AI agents to analyze images through vision AI providers (Gemini, OpenAI, Claude), performing tasks like image description, object detection with bounding boxes, region-specific analysis, and precise color extraction without consuming context window with raw pixels.
    4
    -
  • A
    license
    A
    quality
    A
    maintenance
    Enables text-only coding agents to analyze local images using a dedicated vision provider, returning markdown and structured JSON evidence for screenshots, diagrams, UI mockups, and error captures.
    11
    85 npm
    11
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to analyze images using any OpenAI-compatible vision API, providing tools for image analysis, OCR, error diagnosis, diagram understanding, and chart analysis.
    MIT