Skip to main content

FGCLIP-MCP

MCP (Model Context Protocol) server for FG-CLIP embedding services. To obtain and configure an API key, please apply at https://research.360.cn/sass.

Features

This MCP server provides the following tools and resources:

Tools

  • text_embedding: Generate embedding vectors for text
  • image_embedding: Generate embedding vectors for images
  • cosine_similarity: Compute cosine similarity between two lists of vectors

Use Cases

This MCP server helps users achieve the following capabilities:

  • Image Feature Extraction: Convert images into high-dimensional vector representations for machine learning and similarity computation
  • Text Feature Extraction: Transform text into semantic vector representations with multi-language support
  • Multi-modal Similarity Computation:
    • Image-to-Image Similarity: Compare visual similarity between different images
    • Image-to-Text Similarity: Enable cross-modal retrieval, such as finding relevant images based on text descriptions
    • Text-to-Text Similarity: Calculate semantic similarity between texts

Through these capabilities, users can build powerful search engines, recommendation systems, content classification, and multi-modal AI applications.

Tool Details

text_embedding

Generate embedding vectors for input texts.

Parameters:

  • texts: A list of text strings to embed
  • model: The model to use (default: "fg-clip")

Returns:

  • saved_uris: A list of URIs where the embeddings are stored
  • success: Whether the operation succeeded
  • error_msg: Error message, if any

image_embedding

Generate embedding vectors for images.

Parameters:

  • images: A list of image URLs or base64-encoded images
  • model: The model to use (default: "fg-clip")

Returns:

  • saved_uris: A list of URIs where the embeddings are stored
  • success: Whether the operation succeeded
  • error_msg: Error message, if any

cosine_similarity

Compute cosine similarity between two lists of vectors.

Parameters:

  • uris_a: A list of URIs for the first set of embeddings
  • uris_b: A list of URIs for the second set of embeddings
  • mode: Calculation mode (default: "pairwise")
    • "pairwise": Compute similarity for vectors at corresponding positions
    • "matrix": Compute a full similarity matrix for all vector pairs

Returns:

  • similarities: Similarity values or a similarity matrix
  • shape: Shape information of the result
  • success: Whether the operation succeeded

Dev && Test

git clone https://github.com/360CVGroup/FGCLIP-MCP 
cd FGCLIP-MCP
uv venv
uv sync
source .venv/bin/activate
export MCP_API_KEY=your_api_key 
pytest -q

MCP Host Configuration

From pypi

{
  "mcpServers": {  
    "fgclip-mcp": {
      "command": "uvx",
      "args": [
        "fgclip-mcp"
      ],
      "env": {
        "MCP_API_KEY": "your_api_key"
      }
    }
  }
}

From local

{
  "mcpServers": {  
    "fgclip-mcp-local": {
      "command": "uv",
      "args": [
        "--directory",
        "/path_to_fgclip-mcp/src/fgclip_mcp",
        "run",
        "/path_to_fgclip-mcp/src/fgclip_mcp/__main__.py"
      ],
      "env": {
        "MCP_API_KEY": "your_api_key"
      }    
    }
  }
}

License

Apache License 2.0

Metadata

Release files for fgclip-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fgclip-mcp 0.1.2
File Size Uploaded Provenance
fgclip_mcp-0.1.2.tar.gz 97.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fgclip-mcp 0.1.2
File Interpreter ABI Platform
fgclip_mcp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 116.2 kB

Release files / fgclip_mcp-0.1.2.tar.gz

Download URL fgclip_mcp-0.1.2.tar.gz
Size 97.9 kB
Tags Source
SHA-256 checksum
How to use checksums
12ea5d3053ca6408dac324e2cea5c8ea3870827b011a6118fb096b34c743102d
BLAKE2b-256 checksum
How to use checksums
bbcecbea2be70f2c2664a79496931129b068e33682307bfd0bc936ec4d17e7cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / fgclip_mcp-0.1.2-py3-none-any.whl

Download URL fgclip_mcp-0.1.2-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73204f701f6c7ee1e0506ac4cf2f30352381818ab25b5dc75221650155a3eafa
BLAKE2b-256 checksum
How to use checksums
dc416d466043605187d94ec2eefba9fea8ab744fa3d3e3fabd6a44334c541301
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Security for fgclip-mcp 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page