Florence-2 MCP Server

Florence-2 MCP Server

mcp-florence2•byjkawamoto

An MCP server that runs Microsoft's Florence-2 vision model locally to inspect, caption, and extract text from images and PDFs.

License: MIT License•Runtime: Awaiting documentation review•Category: media design

WHAT IT DOES

  • •Extracts visible text from images or multi-page PDFs through an OCR tool.
  • •Generates detailed captions describing objects, spatial relationships, colors, and scenery in images.
  • •Runs custom Florence-2 task prompts such as object detection and region captioning against inputs.
  • •Processes inputs from local file paths or HTTP/HTTPS URLs, operating fully offline on the local machine.

BEST FOR

  • •Extracting text from invoices or other multi-page PDFs.
  • •Describing the contents of local or remote images.
  • •Detecting objects and their bounding boxes in an image.

ABOUT MCP-FLORENCE2

Florence-2 MCP Server is cataloged as an MCP server attributed to jkawamoto. An MCP server that runs Microsoft's Florence-2 vision model locally to inspect, caption, and extract text from images and PDFs. It is categorized under media design. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Florence-2 MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does image and document processing require an external cloud service?

No; processing runs entirely on the local machine without external vision API fees or data sharing.

Can the model be kept in memory for faster repeated calls?

Yes; a cache-model flag keeps the model in VRAM instead of releasing it after each call.

Does it use hardware acceleration?

It automatically detects and uses Apple Silicon, NVIDIA GPU, or CPU.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 4a930038e445 · 采集于 2026-11-13 10:24:20 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

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-model flag 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 .mcpb bundle for Claude Desktop, 1-click deeplink for LM Studio, and extension support for Goose.

🚀 Quick Installation

Choose your preferred MCP client below:

Claude Desktop

  1. Download the latest mcp-florence2.mcpb bundle from the Releases page.
  2. Double-click the downloaded .mcpb file, 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:

{
  "mcpServers": {
    "florence-2": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/jkawamoto/mcp-florence2",
        "mcp-florence2"
      ]
    }
  }
}

[!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:

goose://extension?cmd=uvx&arg=--from&arg=git%2Bhttps%3A%2F%2Fgithub.com%2Fjkawamoto%2Fmcp-florence2&arg=mcp-florence2&id=florence2&name=Florence-2&description=An%20MCP%20server%20for%20processing%20images%20using%20Florence-2

Option 2: Manual Configuration

Add the following to ~/.config/goose/config.yaml:

extensions:
  florence2:
    name: Florence-2
    cmd: uvx
    args: [ --from, git+https://github.com/jkawamoto/mcp-florence2, mcp-florence2 ]
    enabled: true
    type: stdio

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:

uvx --from git+https://github.com/jkawamoto/mcp-florence2 mcp-florence2

🛠️ 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
ParameterTypeRequiredDescription
srcstringYesLocal file path or HTTP/HTTPS URL of an image or PDF file.

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
ParameterTypeRequiredDescription
srcstringYesLocal file path or HTTP/HTTPS URL of an image or PDF file.

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

ParameterTypeRequiredDescription
srcstringYesLocal file path or HTTP/HTTPS URL of an image or PDF file.
promptstringYesTask prompt specifying the operation to perform.

Supported Florence-2 Task Prompts

Task PromptDescription
<CAPTION>Concise one-sentence summary of the image.
<DETAILED_CAPTION>Moderate-length description of the image content.
<MORE_DETAILED_CAPTION>Highly detailed and exhaustive scene description.
<OCR>Plain text extraction from the image.
<OCR_WITH_REGION>Text extraction along with bounding box coordinates.
<OD>Object detection (identifies objects and their bounding boxes).
<DENSE_REGION_CAPTION>Generates descriptions for multiple distinct regions.
<REGION_PROPOSAL>Identifies candidate bounding boxes for prominent visual regions.

⚙️ Configuration & CLI Options

The server can be customized using command-line arguments:

mcp-florence2 [OPTIONS]
OptionTypeDefaultDescription
--modelstringflorence-community/Florence-2-largeHugging Face model identifier to load.
--cache-modelflagfalseKeeps the model in VRAM for faster repeated calls (by default, models run in subprocesses to free memory when idle).
--versionflag-Show version information.
--helpflag-Show help message and exit.

Using a Smaller / Faster Model

If you have limited GPU memory or want faster execution, switch to Florence-2-base:

{
  "mcpServers": {
    "florence-2": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/jkawamoto/mcp-florence2",
        "mcp-florence2",
        "--model",
        "florence-community/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:

{
  "mcpServers": {
    "florence-2": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/jkawamoto/mcp-florence2",
        "mcp-florence2"
      ],
      "env": {
        "HTTP_PROXY": "http://proxy.example.com:8080",
        "HTTPS_PROXY": "http://proxy.example.com:8080"
      }
    }
  }
}

Goose

Add the env block to ~/.config/goose/config.yaml:

extensions:
  florence2:
    name: Florence-2
    cmd: uvx
    args: [ --from, git+https://github.com/jkawamoto/mcp-florence2, mcp-florence2 ]
    env:
      HTTP_PROXY: "http://proxy.example.com:8080"
      HTTPS_PROXY: "http://proxy.example.com:8080"
    enabled: true
    type: stdio

💻 Development

Setup & Run Tests

This project uses uv for fast, reliable dependency management.

# Clone the repository
git clone https://github.com/jkawamoto/mcp-florence2.git
cd mcp-florence2

# Install dependencies and run tests
uv run pytest

# Run pre-commit checks
uv run pre-commit run --all-files

📄 License

This application is released under the MIT License.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Florence-2 MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-florence2)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related media design MCP Servers

Alternative and complementary servers in the same category

View all in media design →

A Rust CAD application with an MCP server for creating, inspecting and rendering drawings, either headlessly or through a connection to the desktop app.

8K
Media & Design
Liquid Composer
liquid-composer•frontedu

Liquid Composer is a browser-based Liquid Glass icon design tool that offers a local MCP server for agent-driven icon workflows.

69
Media & Design

agent-media makes short drama series and other short vertical videos from Claude, ChatGPT or Codex through one MCP connection, with OAuth sign-in and no API keys.

1
Media & Design