Skip to main content
Glama
DeepSeek Vision MCP
by groxaxo

DeepSeek Vision MCP

CI Python License: MIT

안전하고 가벼운 MCP v2 서버로, 모든 MCP 호환 에이전트에 DeepSeek V4 Flash Vision(이미지 분석, 충실한 설명, OCR, 비교, UI/객체 위치 파악, 재사용 가능한 Files API 업로드)을 제공합니다.

이 서버는 공급자별 이미지 페이로드를 각 에이전트 통합에 내장하지 않고 정확한 모델 deepseek-v4-flash-vision-exp를 노출합니다.

도구

도구

용도

vision_analyze

사용자 정의 프롬프트를 사용한 일반적인 단일/다중 이미지 분석

vision_describe

충실한 장면/UI 설명

vision_ocr

스크린샷/문서 OCR

vision_compare

두 개 이상의 이미지 비교

vision_locate

정규화된 좌표로의 best-effort UI/객체 위치 파악

vision_upload

로컬 이미지를 DeepSeek Files API에 업로드

vision_files_list

재사용 가능한 업로드된 이미지 나열

vision_files_delete

업로드된 이미지 삭제

허용되는 이미지 참조:

  • 로컬 서버 측 경로

  • 공개 http:// 또는 https:// URL

  • data: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-mcp

MCP Inspector로 개발할 때:

DEEPSEEK_API_KEY="..." uv run mcp dev src/deepseek_vision_mcp/server.py

MCP 호스트 구성

일반적인 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는 여러 로컬 에이전트가 하나의 설치를 공유할 때 유용합니다. 이 스크립트는:

  • 프로세스 또는 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.py

Hermes 구성:

mcp_servers:
  deepseek-vision:
    command: "/absolute/path/to/deepseek-vision-mcp/run-mcp.py"
    args: []
    enabled: true

OpenCode 구성:

{
  "mcp": {
    "deepseek-vision": {
      "type": "local",
      "command": ["/absolute/path/to/deepseek-vision-mcp/run-mcp.py"],
      "enabled": true
    }
  }
}

OMP 및 기타 표준 MCP 호스트는 위의 mcpServers 예제에서 명령으로 run-mcp.py를 사용할 수 있습니다.

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-mcp

MCP 엔드포인트는 다음과 같습니다:

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"
}

Best-effort UI 그라운딩

{
  "image": "/home/you/Pictures/screen.png",
  "target": "the blue Save button"
}

vision_locate는 0..1000으로 정규화된 좌표를 반환합니다. 의도적으로 best-effort로 설명됩니다: 생성형 VLM은 결정적 탐지기가 아닙니다. 영향력이 큰 클릭 전에 대상을 검증하세요.

보안 모델

이 MCP로 분석되는 이미지는 DeepSeek의 외부 API로 전송됩니다. 정보에 입각한 사용자 의도 없이 개인 또는 민감한 이미지를 보내지 마세요.

로컬 경로는 DEEPSEEK_VISION_ALLOWED_ROOTS로 제한됩니다. 루트가 구성되지 않은 경우 서버는 현재 작업 디렉터리 아래의 이미지만 허용합니다.

이것은 중요합니다: 제한되지 않은 vision_analyze("/etc/...") 스타일 도구는 MCP 호스트가 이미지 분석을 임의의 로컬 파일 유출로 바꿀 수 있게 합니다.

서버는 또한 명백한 localhost/사설 IP 외부 URL을 거부합니다.

공유 실행기는 기본 프로세스 변수, XDG_*, 그리고 승인된 네 가지 DeepSeek 설정만 자식 프로세스에 전달합니다. 전체 자격 증명 파일을 소싱하지 않습니다.

이 서버에 반영된 DeepSeek 이미지 동작

  • JPEG, PNG, GIF, WebP

  • 로컬/base64 인라인 이미지: 각 최대 32 MiB

  • DeepSeek Files API 이미지: 최대 64 MiB

  • 요청당 최대 600개 이미지

  • 외부 URL 길이: 최대 8192자

  • 최대 크기: 한 변 8192px, 15개 이상 이미지의 경우 한 변 4096px

  • 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-mcp

Docker에서 로컬 이미지 경로를 사용하려면 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 pytest

CI는 Python 3.11과 3.13에서 동일한 검사를 실행합니다. 기여와 구체적인 버그 보고를 환영합니다.

Available Tools

8 tools
vision_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

    B3.4/5.0

    Scored across 8 tools

    Disambiguation5/5

    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.

    Naming Consistency3/5

    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.

    Tool Count5/5

    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.

    Completeness5/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers