Visual Enhancement MCPのロゴ

Visual Enhancement MCP

コミュニティ
goehou

MCP stdio server for image recognition via an existng vision model 一个可以增强claude code/codex/opencode识图能力的MCP

公開者goehou
リポジトリVisual-Enhancement-mcp
言語TypeScript
フォーク
6
スター
97
利用可能なツール
0
通信方式stdio
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    Visual Enhancement MCPは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには97件のスターと6件のフォークがあります。

mcp-vision-server

English | 简体中文

mcp-vision-server is an MCP stdio server that lets MCP clients analyze images and run OCR through an existing OpenAI-compatible vision Chat Completions API.

This document focuses on how to configure and use the server from an MCP client.

What it provides

  • vision_analyze: general image understanding with a custom prompt.
  • vision_ocr: OCR extraction with optional language and output-format hints.
  • Image input through exactly one of:
    • imagePath: a local absolute image path available to the MCP server process.
    • imageUrl: http://, https://, data:, or file:// URL.
    • imageBase64 + imageMediaType: uploaded attachment bytes forwarded by the client.
    • images: an array (up to 8) of the fields above, for multi-image calls such as comparisons.
  • OpenAI-compatible upstream request shape: Chat Completions with text plus one or more image_url parts.
  • Automatic retry with backoff on upstream 429/5xx/network/timeout failures.
  • Size limits on local file, base64, and data-URL images to avoid excessive memory use.
  • Optional in-memory result cache for identical (tool + prompt + images + options) calls.
  • Structured MCP output in addition to plain text content.

Required configuration

The server needs an upstream vision model endpoint. At minimum configure:

SettingRequiredCLI optionEnvironment variableDescriptionExample
API base URLYes--api-base-urlVISION_API_BASE_URLRoot URL of the upstream OpenAI-compatible API. Prefer scheme + host only; keep the request path in api-path.https://api.openai.com
ModelYes--modelVISION_MODELDefault vision-capable model exposed by the upstream API. A tool call can override it with model.gpt-4o-mini
API keyUsually--api-keyVISION_API_KEYBearer token sent as Authorization: Bearer <key>. Omit only when your endpoint does not require authentication.sk-xxxx

The final upstream URL is built from:

text
<api-base-url><api-path>

Example:

text
VISION_API_BASE_URL=https://api.openai.com
VISION_API_PATH=/v1/chat/completions
=> https://api.openai.com/v1/chat/completions

Full configuration reference

Configuration priority:

text
CLI arguments > environment variables > defaults
PurposeCLI optionAliasEnvironment variableDefaultNotes
Upstream API base URL--api-base-url <url>--vision-api-base-urlVISION_API_BASE_URLnoneRequired. Use the API root such as https://api.openai.com.
Upstream API path--api-path <path>--vision-api-pathVISION_API_PATH/v1/chat/completionsChat Completions endpoint path.
Upstream API key--api-key <key>--vision-api-keyVISION_API_KEYnoneAdded as a Bearer token when set.
Default model--model <name>--vision-modelVISION_MODELnoneRequired. Must support image input.
Request timeout--timeout-ms <ms>--vision-timeout-msVISION_TIMEOUT_MS60000Invalid or non-positive environment values fall back to default.
Default output token limit--max-tokens <n>--vision-max-tokensVISION_MAX_TOKENS4096Sent upstream as max_tokens when a tool call omits maxTokens.
Max image size--max-image-bytes <n>--vision-max-image-bytesVISION_MAX_IMAGE_BYTES10485760 (10MB)Applies to imagePath, imageBase64, and file:/data: URLs before the payload is held in memory.
Upstream retry count--max-retries <n>--vision-max-retriesVISION_MAX_RETRIES2Retries on 429/5xx/network/timeout failures, with exponential backoff. 0 disables retries.
Result cache TTL--cache-ttl-ms <ms>--vision-cache-ttl-msVISION_CACHE_TTL_MS300000 (5 min)Caches identical (tool + prompt + images + options) results in memory. 0 or negative disables the cache.
MCP server name--server-name <name>--mcp-server-nameMCP_SERVER_NAMEmcp-vision-serverMetadata shown to the MCP client.
MCP server version--server-version <ver>--mcp-server-versionMCP_SERVER_VERSION0.2.0Metadata shown to the MCP client.

Environment-style configuration example:

bash
VISION_API_BASE_URL=https://api.openai.com
VISION_API_PATH=/v1/chat/completions
VISION_API_KEY=sk-xxxx
VISION_MODEL=gpt-4o-mini
VISION_TIMEOUT_MS=60000
VISION_MAX_TOKENS=4096
VISION_MAX_IMAGE_BYTES=10485760
VISION_MAX_RETRIES=2
VISION_CACHE_TTL_MS=300000
MCP_SERVER_NAME=mcp-vision-server
MCP_SERVER_VERSION=0.2.0

MCP client configuration

Most MCP clients should register this server as a stdio command. Replace the URL, key, and model with your provider values.

JSON config

Use this shape for clients that accept mcpServers JSON, such as Claude Desktop, Cursor, VS Code-compatible MCP configs, and similar clients:

json
{
  "mcpServers": {
    "vision": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-vision-server",
        "--api-base-url", "https://your-api.example.com",
        "--api-path", "/v1/chat/completions",
        "--api-key", "sk-xxxx",
        "--model", "your-vision-model",
        "--timeout-ms", "60000",
        "--max-tokens", "4096"
      ]
    }
  }
}

If your client supports an env block, you can keep secrets out of args:

json
{
  "mcpServers": {
    "vision": {
      "command": "npx",
      "args": ["-y", "mcp-vision-server"],
      "env": {
        "VISION_API_BASE_URL": "https://your-api.example.com",
        "VISION_API_PATH": "/v1/chat/completions",
        "VISION_API_KEY": "sk-xxxx",
        "VISION_MODEL": "your-vision-model",
        "VISION_TIMEOUT_MS": "60000",
        "VISION_MAX_TOKENS": "4096"
      }
    }
  }
}

Codex

powershell
codex mcp add vision -- `
  npx -y mcp-vision-server `
  --api-base-url https://your-api.example.com `
  --api-path /v1/chat/completions `
  --api-key sk-xxxx `
  --model your-vision-model `
  --timeout-ms 60000 `
  --max-tokens 4096

Claude Code

powershell
claude mcp add vision -- `
  npx -y mcp-vision-server `
  --api-base-url https://your-api.example.com `
  --api-path /v1/chat/completions `
  --api-key sk-xxxx `
  --model your-vision-model `
  --timeout-ms 60000 `
  --max-tokens 4096

Upstream API contract

The server sends a POST request to the configured Chat Completions URL:

json
{
  "model": "your-vision-model",
  "max_tokens": 4096,
  "messages": [
    {
      "role": "user",
      "content": [
        { "type": "text", "text": "Describe this image." },
        {
          "type": "image_url",
          "image_url": {
            "url": "data:image/png;base64,...",
            "detail": "auto"
          }
        }
      ]
    }
  ]
}

Response parsing supports:

  • choices[0].message.content as a string.
  • choices[0].message.content as an array of text parts.
  • choices[0].message.reasoning or reasoning_content as fallback text for compatible providers.

Image source behavior

Exactly one image source must be supplied per tool call, unless you use images for multiple images.

FieldUse whenHandling
imagePathThe MCP server process can read an absolute local file path.The file is read, MIME type is inferred from extension, and the image is sent upstream as a data: URL.
imageUrlThe image is already addressable as http(s)://, data:, or file://.file:// is read like imagePath; remote URLs are passed upstream as URLs.
imageBase64 + imageMediaTypeThe MCP client can pass uploaded attachment bytes directly.The payload is wrapped as data:<imageMediaType>;base64,<imageBase64>.
imagesThe call needs more than one image (e.g. comparisons, multi-page documents).An array (up to 8 entries) of objects using the same imagePath/imageUrl/imageBase64 rules as above. Mutually exclusive with the top-level single-image fields.

Supported local file extensions for MIME inference: .png, .jpg, .jpeg, .webp, .gif, .bmp.

Drag-and-drop support depends on the host MCP client. If the client does not forward attachment data as imagePath, imageUrl, or imageBase64, the server cannot access that image.

Size limits and resilience

  • Local file, base64, and data:/file: URL images are rejected if they exceed maxImageBytes (default 10MB) before being held in memory or sent upstream.
  • Remote http(s):// URLs are forwarded to the upstream API as-is and are not downloaded or size-checked by this server.
  • Upstream requests are retried automatically on 429, 5xx, and network/timeout failures, with exponential backoff (see --max-retries).
  • Identical calls (same tool, prompt, images, and options) can be served from an in-memory cache instead of calling the upstream API again (see --cache-ttl-ms).

Tools

vision_analyze

Use this tool for general image understanding.

Required:

  • prompt: instruction passed to the vision model.
  • Exactly one of imagePath, imageUrl, imageBase64, or images.

Required with imageBase64 (or with base64 entries inside images):

  • imageMediaType: for example image/png or image/jpeg.

Optional:

  • images: array of up to 8 images (each using the imagePath/imageUrl/imageBase64 rules) for multi-image calls such as comparisons.
  • model: override the configured default model for this call.
  • detail: auto, low, or high; forwarded to providers that support image detail.
  • maxTokens: positive integer up to 32768; overrides the configured default for this call.

Example:

json
{
  "name": "vision_analyze",
  "arguments": {
    "imageUrl": "https://example.com/cat.png",
    "prompt": "Describe the main subject and extract any visible text.",
    "detail": "high",
    "maxTokens": 2048
  }
}

Multi-image example:

json
{
  "name": "vision_analyze",
  "arguments": {
    "images": [
      { "imageUrl": "https://example.com/before.png" },
      { "imageUrl": "https://example.com/after.png" }
    ],
    "prompt": "Compare these two screenshots and describe what changed."
  }
}

vision_ocr

Use this tool for text extraction.

Required:

  • Exactly one of imagePath, imageUrl, imageBase64, or images.

Required with imageBase64 (or with base64 entries inside images):

  • imageMediaType.

Optional:

  • images: array of up to 8 images for multi-page or multi-image OCR calls.
  • languageHint: language hint such as en, zh-CN, or ja.
  • outputFormat: plain, markdown, or json; default is plain.
  • model: override the configured default model for this call.
  • detail: auto, low, or high.
  • maxTokens: positive integer up to 32768.

Example:

json
{
  "name": "vision_ocr",
  "arguments": {
    "imageBase64": "<base64-image>",
    "imageMediaType": "image/png",
    "languageHint": "en",
    "outputFormat": "markdown"
  }
}

Tool output

Both tools return plain text in MCP content and structured data in structuredContent:

json
{
  "text": "recognized or analyzed text",
  "model": "model-used",
  "images": [
    { "sourceLabel": "resolved image source", "mediaType": "image/png" }
  ],
  "cached": false
}

images lists each resolved image in call order (one entry for single-image calls). cached is true when the result was served from the in-memory result cache instead of calling the upstream API.

Provider notes

  • The upstream API must accept OpenAI-compatible Chat Completions image input.
  • Some providers ignore detail or max_tokens; behavior then follows the provider.
  • Large images may increase latency, token usage, and provider-side request size.
  • Up to 8 images are accepted per tool call via images.

Links

Visual Enhancement MCPのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Visual Enhancement MCPに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Visual Enhancement MCPをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Visual Enhancement MCPのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "visual-enhancement-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてVisual Enhancement MCPのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Visual Enhancement MCPのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Visual Enhancement MCPを使ってこのタスクを手伝ってもらえますか?
Visual Enhancement MCP
はい、読みました。
Visual Enhancement MCPで調べた結果をお伝えします。

よくある質問

Visual Enhancement MCP MCPサーバーは何に使いますか?

Visual Enhancement MCPは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでVisual Enhancement MCP MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでVisual Enhancement MCPを利用できます。

TypingMindでVisual Enhancement MCP MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Visual Enhancement MCPを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Visual Enhancement MCP MCPをTypingMindに接続するにはどうすればよいですか?

Visual Enhancement MCPはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでVisual Enhancement MCP MCPのどのようなツールを利用できますか?

Visual Enhancement MCPはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Visual Enhancement MCP MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Visual Enhancement MCPで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇