
Mcp Florence2
io.github.jkawamoto由 GitHub 账号 jkawamoto 发布v0.5.4更新于 Nov 14, 2026
An MCP server for processing images using Florence-2
概览
在本地运行微软 Florence-2 视觉模型,让助手对图片和多页 PDF 做 OCR、生成描述并执行自定义视觉任务。
- 可以做什么
- 从图片或多页 PDF 中逐页提取全部可见文字
- 生成详细描述,涵盖物体、空间关系、颜色与背景
- 执行自定义 Florence-2 任务提示,如目标检测、区域描述与边界框
- 输入源可以是本地文件路径或 HTTP/HTTPS 网址
- 适用场景
- 适合需要从扫描件、发票或截图中读取文字,或描述图片内容,又不希望把文件发送到外部视觉 API 的场景。配有 GPU 或 Apple Silicon 的桌面环境可获得更快推理速度。
- 运行要求
- 以本地 stdio 进程运行,通常用 uvx 启动或在 Claude Desktop 中安装 .mcpb 包;仅支持桌面端。需下载 Hugging Face 上的 Florence-2 模型(默认 large,可选 base),需要 Python 与 uv,以及足够的磁盘、内存或 GPU;仅在处理网址时需要对外 HTTP 访问。可通过 HTTP_PROXY、HTTPS_PROXY、NO_PROXY 配置代理。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Florence2,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
English | 日本語
Florence-2 MCP Server
[uv] [Python Version] [Python Application] [pre-commit] [GitHub License]
[MseeP.ai Security Assessment Badge]
Florence-2 MCP Server brings local vision intelligence and Optical Character Recognition (OCR) to your AI assistants via the Model Context Protocol (MCP). Powered by Microsoft's Florence-2 foundation model, it lets your LLMs inspect, caption, and extract text from local images, web URLs, and multi-page PDF documents — entirely offline and on your own machine.
✨ Key Features
- 🔒 100% Local & Private: All image and document processing runs on your local machine. No external vision API fees, token limits, or data sharing.
- 📄 Multi-Page PDF & Image Support: Process common image formats (JPEG, PNG, WebP, etc.) as well as multi-page PDF documents page-by-page.
- ⚡ Native Hardware Acceleration: Automatically detects and leverages Apple Silicon (MPS), NVIDIA GPU (CUDA), or CPU.
- 🧹 Zero VRAM Waste: By default, inference runs in an on-demand subprocess to release VRAM immediately after completion. A
--cache-modelflag is available for low-latency continuous usage. - 🎯 Rich Vision Tasks: Perform high-precision text OCR, detailed descriptive captioning, and open-ended visual queries using native Florence-2 prompt tokens (e.g. object detection, region descriptions).
- 📦 One-Click Installs: Ready-to-use
.mcpbbundle for Claude Desktop, 1-click deeplink for LM Studio, and extension support for Goose.
🚀 Quick Installation
Choose your preferred MCP client below:
Claude Desktop
Option 1: One-Click Extension Bundle (Recommended)
- Download the latest
mcp-florence2.mcpbbundle from the Releases page. - Double-click the downloaded
.mcpbfile, or drag-and-drop it into Claude Desktop's Settings window.
Option 2: Manual Configuration
Add the following configuration to your claude_desktop_config.json:
[!NOTE] Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json- Windows:
%APPDATA%\Claude\claude_desktop_config.json
For more details, see Connect to local MCP servers.
Goose
Option 1: One-Click URL
Click the link below to launch the Goose extension installer:
Option 2: Manual Configuration
Add the following to ~/.config/goose/config.yaml:
For more details, refer to Using Extensions | goose.
LM Studio
Click the button below to install directly into LM Studio:
[Add MCP Server florence-2 to LM Studio]
Claude Code, Cursor, Cline & Other MCP Clients
You can connect any client that supports stdio MCP servers using uvx:
🛠️ Tools
The server automatically equips your AI assistant with the following vision capabilities. You can interact with them using natural language:
1. ocr
Extracts all visible text from images or multi-page PDF documents.
- Example user request: "Please extract all text from
/path/to/invoice.pdf." - Multi-page support: Automatically iterates through every page in a PDF document.
Tool schema & parameters
2. caption
Generates comprehensive, detailed captions describing what is depicted in the image.
- Example user request: "Describe what is shown in
https://example.com/photo.jpg." - Returns granular descriptions of objects, spatial relationships, colors, and background scenery.
Tool schema & parameters
3. process
Executes custom Florence-2 task prompts directly against the input image or PDF for advanced computer vision workflows (such as object detection or region captioning).
- Example user request: "Detect all objects in this image and return their bounding boxes."
Tool schema & supported task prompts
Parameters
Supported Florence-2 Task Prompts
⚙️ Configuration & CLI Options
The server can be customized using command-line arguments:
Using a Smaller / Faster Model
If you have limited GPU memory or want faster execution, switch to Florence-2-base:
🛡️ Security Considerations
When processing URLs starting with http:// or https://, outbound HTTP requests are initiated directly from the server process. In environments where untrusted users or prompts may supply URLs, this could potentially expose the server to Server-Side Request Forgery (SSRF) targeting internal network services or cloud metadata endpoints.
[!WARNING] In multi-tenant or untrusted environments, route outgoing HTTP(S) traffic through an SSRF-safe forward proxy (such as Smokescreen or Squid configured to block private/internal IP ranges).
Since Python's requests library automatically respects standard environment variables, proxy settings can be configured directly in your client configuration:
HTTP_PROXY/http_proxy: Proxy URL for HTTP requests.HTTPS_PROXY/https_proxy: Proxy URL for HTTPS requests.NO_PROXY/no_proxy: Comma-separated list of hosts to bypass the proxy.
Proxy Configuration Examples
Claude Desktop
Add the env block to claude_desktop_config.json:
Goose
Add the env block to ~/.config/goose/config.yaml:
💻 Development
Setup & Run Tests
This project uses uv for fast, reliable dependency management.
📄 License
This application is released under the MIT License.
来源:README.md,提交 335b6df
工具
0版本历史
5- v0.5.4最新Nov 14, 2026
- v0.5.3Oct 29, 2026
- v0.5.2Oct 21, 2026
- v0.5.1Oct 1, 2026
- v0.5.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分