In the DeepSeek Harness (DSH) plugin ecosystem, handling visual data usually requires converting local files, web links, or encoded data into a format that the model can process. xby-extract-image addresses this need by providing a standardized interface for image extraction and transformation.
What is this¶
This is a DeepSeek Harness (DSH) plugin, essentially an MCP server. It supports extracting images from local files, web URLs, and Base64-encoded data, and converting them into Base64 format so that an LLM can perform subsequent visual content understanding, OCR text extraction, or object recognition.
Core features¶
This plugin provides the following four core operations:
- set_xby_apikey: Set the API key in chat. The key is automatically persisted and remains valid after process restarts.
- extract_image_from_file: Extract an image from a local file path. Supports visual content understanding, OCR text extraction, and object recognition for screenshots, photos, charts, and documents.
- extract_image_from_url: Extract an image from a web URL. Suitable for analyzing web page screenshots, online photos, charts, and more; supports visual content analysis and text extraction over HTTP/HTTPS.
- extract_image_from_base64: Extract an image from Base64-encoded data. Suitable for handling clipboard screenshots, dynamically generated images, or images embedded in an application that do not require filesystem access.
Installation and enablement¶
Installing this plugin requires specifying a profile. The command to install it from GitHub is as follows:
dsh plugin --profile web add github:xby_skill/xby-extract-image
If local development or debugging is needed, you can use the following methods:
# 从本地目录安装
dsh plugin --profile web add /absolute/path/to/xby-extract-image
# 通过 cordis.patch.yml 进行开发调试
dsh web --profile web --patch /absolute/path/to/dsh-ocr-plugin/cordis.patch.yml
Typical usage¶
After installation, in DSH conversations or tool calls, you can operate on images through the four interfaces described above. Typical scenarios include:
- File analysis: Pass the local file path of a saved screenshot or PDF page into
extract_image_from_file; after the image is extracted, the LLM can summarize the content or extract structured data. - Web image retrieval: Pass the URL of the target web page into
extract_image_from_urlto obtain the visual content of the page for analysis. - Dynamic data processing: Pass the Base64-encoded image data returned by an application into
extract_image_from_base64for direct model processing.
Use cases and notes¶
- API key requirement: Before use, register on the Xiaobenyang official website and obtain an API key, then configure it with
set_xby_apikey. - Permission dependencies: The plugin runs with the permissions of the current DSH process. When calling
extract_image_from_file, the DSH process must have read permissions for the relevant file system; when callingextract_image_from_url, network connection permission is required. - License: This plugin follows the MIT license.
Summary¶
xby-extract-image provides DSH with basic image-processing capabilities, filling the gap in converting multi-source data into model input. Through standard MCP interfaces, it enables agents to conveniently integrate visual analysis capabilities. For more details, refer to the project repository: github.com/xby-skill/xby-extract-image.