About Florence-2 MCP Server
An MCP server that uses Florence-2 to process local or web-hosted images and PDFs. It offers OCR, image captions, and custom-prompt processing for MCP clients.
Key features
- 01Extracts text from images with OCR
- 02Generates image captions
- 03Processes images with a custom prompt
- 04Accepts local paths or URLs
- 05Supports image and PDF processing
Use cases
- 01Extract text from a scanned image
- 02Create a caption for an image
- 03Process an image with a tailored prompt
- 04Work with image or PDF files hosted locally or online
MCP support
Exposes the `ocr`, `caption`, and `process` tools to MCP clients. The tools accept an image path or URL; `process` also takes a custom prompt.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEFlorence-2 MCP Server
An MCP server for processing images using Florence-2.
You can process images or PDF files stored on a local or web server to extract text using OCR (Optical Character Recognition) or generate descriptive captions summarizing the content of the images.
Installation
Claude
Download the latest MCP bundle mcp-florence2.mcpb from
the Releases page,
then open the downloaded .mcpb file or drag it into the Claude Desktop's Settings window.
Manually configuration
You can also manually configure this server for Claude Desktop.
Edit the claude_desktop_config.json file by adding the following entry under mcpServers:
{
"mcpServers": {
"florence-2": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/jkawamoto/mcp-florence2",
"mcp-florence2"
]
}
}
}
After editing, restart the application.
For more information, see: Connect to local MCP servers - Model Context Protocol.
goose
Open this link
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
to launch the installer, then click "Yes" to confirm the installation.
Manually configuration
You can also directly edit the config file (~/.config/goose/config.yaml) to include the following entry:
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 on configuring MCP servers in Goose, refer to the documentation: Using Extensions | goose.
LM Studio
To configure this server for LM Studio, click the button below.
Tools
ocr
Process an image file or URL using OCR to extract text.
Arguments:
- src: A file path or URL to the image file that needs to be processed.
caption
Processes an image file and generates captions for the image.
Arguments:
- src: A file path or URL to the image file that needs to be processed.
process
Processes an image file with a custom prompt using the Florence-2 model.
Arguments:
- src: A file path or URL to the image file that needs to be processed.
- prompt: A custom prompt for the Florence-2 model.
Security Considerations
When processing image files from URLs (src parameter starting with http:// or https://), outbound HTTP requests are initiated directly from the server process using Python's requests library. 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.
To mitigate SSRF risks, it is strongly recommended to route all outgoing HTTP(S) traffic through an SSRF-safe forward proxy (such as Smokescreen or Squid configured to block internal IP ranges).
Since requests automatically respects standard environment variables, proxy settings can be configured without modifying the application code:
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.
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
License
This application is licensed under the MIT License. See the LICENSE file for more details.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.
