DeepSeek Vision MCP
DeepSeek Vision MCP
あらゆるMCP互換エージェントにDeepSeek V4 Flash Vision(画像分析、忠実な説明、OCR、比較、UI/オブジェクト位置特定、再利用可能なFiles APIアップロード)を提供する、セキュアで軽量なMCP v2サーバーです。
このサーバーは、プロバイダ固有の画像ペイロードを各エージェント統合に埋め込むことなく、正確なモデル deepseek-v4-flash-vision-exp を公開します。
ツール
ツール | 目的 |
| カスタムプロンプトによる一般的な単一/複数画像分析 |
| 忠実なシーン/UI説明 |
| スクリーンショット/ドキュメントのOCR |
| 2つ以上の画像の比較 |
| 正規化座標へのベストエフォート型UI/オブジェクト位置特定 |
| ローカル画像をDeepSeek Files APIにアップロード |
| 再利用可能なアップロード済み画像の一覧表示 |
| アップロード済み画像の削除 |
受け入れ可能な画像参照:
ローカルサーバー側パス
公開
http://またはhttps://URLdata:image/...;base64,...DeepSeek
file-api-...ファイルID
Related MCP server: vision-mcp
このサーバーが薄い理由
MCPサーバーはローカルのビジョンモデルを実行しません。画像入力を検証・正規化し、推論をDeepSeekに委任するだけです。そのためCPU/RAM使用量はわずかで、MCP対応エージェントはDeepSeek固有のペイロード形式をエージェント自体に埋め込むことなくビジョン機能を獲得できます。
uvでのインストール
git clone https://github.com/groxaxo/deepseek-vision-mcp.git
cd deepseek-vision-mcp
uv sync --locked
cp .env.example .env
# Set DEEPSEEK_API_KEY and allowed roots in .envローカルMCPホストでは、stdioが推奨トランスポートです:
DEEPSEEK_API_KEY="..." \
DEEPSEEK_VISION_ALLOWED_ROOTS="/home/you/Pictures:/tmp/vision" \
uv run deepseek-vision-mcpMCP Inspectorでの開発用:
DEEPSEEK_API_KEY="..." uv run mcp dev src/deepseek_vision_mcp/server.pyMCPホスト設定
一般的なstdio設定:
{
"mcpServers": {
"deepseek-vision": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/deepseek-vision-mcp",
"run",
"deepseek-vision-mcp"
],
"env": {
"DEEPSEEK_API_KEY": "YOUR_KEY",
"DEEPSEEK_VISION_ALLOWED_ROOTS": "/home/you/Pictures:/tmp/vision"
}
}
}
}APIキーをコミットしないでください。ホストが環境変数を継承できる場合は、シークレットマネージャーまたはシェルからDEEPSEEK_API_KEYを注入することを推奨します。
安全な共有ランチャー
run-mcp.pyは、複数のローカルエージェントが1つのインストールを共有する場合に便利です。このスクリプトは:
プロセスまたはenvファイルから承認済みのDeepSeek変数のみを読み取ります;
MCP起動前に無関係な継承シークレットをフィルタリングします;
stdioトランスポートを強制します;ローカル画像を明示的なルートに制限します。
デフォルトでは~/.hermes/.envを読み取り、現在のホームディレクトリ配下の通常の画像作業ディレクトリと/tmpを許可します。スクリプトを編集せずにこれらの選択を上書きするには:
export DEEPSEEK_VISION_ENV_FILE="$HOME/.config/deepseek-vision.env"
export DEEPSEEK_VISION_ALLOWED_ROOTS="$HOME/Pictures:/tmp/vision"
./run-mcp.pyHermes設定:
mcp_servers:
deepseek-vision:
command: "/absolute/path/to/deepseek-vision-mcp/run-mcp.py"
args: []
enabled: trueOpenCode設定:
{
"mcp": {
"deepseek-vision": {
"type": "local",
"command": ["/absolute/path/to/deepseek-vision-mcp/run-mcp.py"],
"enabled": true
}
}
}OMPおよびその他の標準MCPホストは、run-mcp.pyをコマンドとして上記のmcpServersの例を使用できます。
Streamable HTTP
export DEEPSEEK_API_KEY="..."
export MCP_TRANSPORT=streamable-http
export MCP_HOST=127.0.0.1
export MCP_PORT=8000
uv run deepseek-vision-mcpMCPエンドポイントは:
http://127.0.0.1:8000/mcp信頼できるマシン/ネットワークの外部に公開する前に、サーバーの前段でTLSと認証を使用してください。
ツール呼び出しの例
スクリーンショットの分析
{
"images": ["/home/you/Pictures/screen.png"],
"prompt": "What application is open, what is the current state, and what should I click next?",
"detail": "original"
}高速な大まかな画面読み取り
{
"images": ["/home/you/Pictures/screen.png"],
"prompt": "Is a modal dialog visible? Answer briefly.",
"detail": "low"
}OCR
{
"image": "/home/you/Pictures/error.png",
"detail": "original"
}ベストエフォート型UIグラウンディング
{
"image": "/home/you/Pictures/screen.png",
"target": "the blue Save button"
}vision_locateは0〜1000に正規化された座標を返します。これは意図的にベストエフォート型として説明されています。生成型VLMは決定的な検出器ではありません。影響の大きいクリックの前に、そのターゲットを検証してください。
セキュリティモデル
このMCPで分析された画像はDeepSeekの外部APIに送信されます。ユーザーの明確な意図なしに、プライベートまたは機密性の高い画像を送信しないでください。
ローカルパスはDEEPSEEK_VISION_ALLOWED_ROOTSに制限されます。ルートが設定されていない場合、サーバーは現在の作業ディレクトリ配下の画像のみを許可します。
これは重要です: 無制限のvision_analyze("/etc/...")スタイルのツールは、MCPホストが画像分析を任意のローカルファイルの外部送信に変えることを可能にします。
サーバーはまた、明らかなlocalhost/プライベートIPの外部URLを拒否します。
共有ランチャーは、ベースラインのプロセス変数、XDG_*、および4つの承認済みDeepSeek設定のみを子プロセスに渡します。資格情報ファイル全体をソースすることは決してありません。
このサーバーが反映するDeepSeek画像動作
JPEG、PNG、GIF、WebP
ローカル/base64インライン画像: 各最大32 MiB
DeepSeek Files API画像: 最大64 MiB
1リクエストあたり最大600画像
外部URL長: 最大8192文字
最大寸法: 1辺8192 px、または15枚以上の画像では1辺4096 px
detail=low: DeepSeekは512x512にダウンサンプリングdetail=original/high: 元の詳細を保持画像はユーザーメッセージでのみ送信されます
大きな/再利用される画像
一度アップロード:
{
"local_path": "/home/you/Pictures/large.png",
"expires_seconds": 86400
}その後、返されたfile-api-... IDをvision_analyzeに渡します。意図的にDeepSeekの永続ストレージを希望する場合のみ、expires_secondsにnullを使用してください。
Docker
docker build -t deepseek-vision-mcp .
docker run --rm \
-p 127.0.0.1:8000:8000 \
-e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
deepseek-vision-mcpDockerでローカル画像パスを使用する場合、MCPが必要とするディレクトリのみをマウントし、DEEPSEEK_VISION_ALLOWED_ROOTSをコンテナ側のパスに設定してください。
アーキテクチャ
MCP host / agent
|
| MCP tool call
v
DeepSeek Vision MCP
- validates source
- restricts local paths
- encodes local files
- shapes DeepSeek payload
|
| HTTPS
v
api.deepseek.com
deepseek-v4-flash-vision-exp
|
v
structured MCP result開発
uv sync --locked --extra dev
uv run ruff check .
uv run pytestCIはPython 3.11と3.13で同じゲートを実行します。コントリビューションと焦点を絞ったバグ報告を歓迎します。
Available Tools
8 toolsvision_analyzeB
Analyze one or more images with a custom prompt.
Image sources may be:
local server-side paths under DEEPSEEK_VISION_ALLOWED_ROOTS
public http(s) URLs
base64 data:image/... URLs
DeepSeek Files API IDs beginning with file-api-
Use detail="low" for cheap/fast coarse inspection, or "original" for screenshots, OCR, charts, and other fine-detail tasks.
Inputs: images (required), prompt (required), detail, json_mode, +1 more.
vision_compareB
Compare 2+ images in the order provided.
Inputs: images (required), detail, question, max_tokens.
vision_describeC
Describe the visible content of an image faithfully and concisely.
Inputs: image (required), detail, max_tokens.
vision_files_deleteC
Delete an uploaded DeepSeek Files API image.
Inputs: file_id (required).
vision_files_listA
List uploaded DeepSeek user_data image files, newest first.
Inputs: limit.
vision_locateA
Best-effort semantic localization of a visible target.
Coordinates are model-estimated and MUST be validated before destructive or high-impact UI actions. This is useful for agent grounding but is not a deterministic object detector.
Inputs: image (required), target (required), detail.
vision_ocrA
Read visible text from a screenshot/document image.
Returns the transcription as model text. Prefer detail="original".
Inputs: image (required), detail, max_tokens.
vision_uploadA
Upload a local image to DeepSeek Files API and return its reusable file_id.
Local paths must be inside DEEPSEEK_VISION_ALLOWED_ROOTS. expires_seconds: 3600..2592000 (1h..30d), or null for permanent storage.
Inputs: local_path (required), expires_seconds.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct visual task: custom analysis, faithful description, OCR, comparison, semantic localization, upload, listing, and deletion. The overlaps between analyze and describe are minor and clearly differentiated by purpose and usage notes.
Most tools follow a vision_<verb> pattern (analyze, describe, compare, locate, upload), but vision_files_list and vision_files_delete reverse the noun-verb order, and vision_ocr is an abbreviation noun. The shared prefix provides some consistency, but the mixed conventions prevent a higher score.
Eight tools is a well-scoped number for a vision MCP server, covering both image analysis and file lifecycle management without unnecessary bloat. Each tool serves a clear purpose.
The tool surface covers the major vision tasks (analysis, description, OCR, comparison, localization) and includes full file management via upload, list, and delete. There are no obvious dead ends; images are immutable so update/delete semantics are appropriately handled.
Maintenance
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
MCP server exposing the YourImageShare upload API (upload/list/delete) as tools for AI agents.
Image & PDF tools for AI agents: compress, convert, resize, PDF, AI vision, pipeline.
Generate images and videos with Seedance, Veo, Wan, Grok, GPT-Image and Nano Banana via one MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceBridges a vision model to enable text-only models like DeepSeek to describe images, extract text, and compare images via MCP tools.531 npm9MIT
- AlicenseAqualityCmaintenanceGive MCP-compatible AI agents image analysis, metadata inspection, cropping, OCR, and image comparison through any OpenAI-compatible vision model.6MIT
- AlicenseNot gradedqualityCmaintenanceProvides multimodal vision MCP tools for image analysis, OCR, object detection, text-to-image generation, and image similarity, integrating OpenAI, Qwen, and Gemini.131 npmMIT
- AlicenseAqualityNot gradedmaintenanceEnables any MCP-capable agent to perform vision tasks like describing images, answering questions, OCR, and comparing images using supported vision backends.5MIT