Back to MCP directory
publicPublicdnsLocal runtime

mcp-florence2

基于Florence-2的MCP图像处理服务

article

README

🚀 Florence-2 MCP 服务器

Florence-2 MCP 服务器可借助 Florence-2 处理图像。它支持处理本地或网络服务器上存储的图像或 PDF 文件,能够提取文本(OCR,光学字符识别),还可生成描述性字幕,总结图像内容。

Python 应用 GitHub 许可证 pre-commit Ruff smithery badge

🚀 快速开始

本服务器可在不同环境中进行配置使用,以下是详细的安装步骤。

📦 安装指南

对于 Claude Desktop

要在 Claude Desktop 中配置此服务器,请编辑 claude_desktop_config.json 文件,在 mcpServers 下添加以下条目:

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

编辑完成后,重启应用程序。有关更多详细信息,请参阅:Claude Desktop 用户 - 模型上下文协议

对于 Goose CLI

要在 Goose CLI 中启用 Bear 扩展,请编辑配置文件 ~/.config/goose/config.yaml,添加以下条目:

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

对于 Goose Desktop

添加一个新扩展,设置如下:

  • 类型:标准 IO
  • ID:florence-2
  • 名称:Florence-2
  • 描述:用于处理图像的 Florence-2 MCP 服务器
  • 命令uvx --from git+https://github.com/jkawamoto/mcp-florence2 mcp-florence2

有关在 Goose Desktop 中配置 MCP 服务器的更多详细信息,请参阅文档:使用扩展 - MCP 服务器

📚 详细文档

工具

ocr

使用 OCR 处理图像文件或 URL 以提取文本。

  • 参数
    • src:需要处理的图像文件路径或 URL。

caption

处理图像文件并生成图像的文字字幕。

  • 参数
    • src:需要处理的图像文件路径或 URL。

📄 许可证

此应用程序根据 MIT 许可证发布。更多详细信息,请参阅 LICENSE 文件。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client