FGCLIP-MCP
MCP server for FG-CLIP embedding services enabling multi-modal similarity computation for text and images.
README
FGCLIP-MCP
MCP (Model Context Protocol) server for FG-CLIP embedding services. To obtain and configure the 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 embedmodel: The model to use (default: "fg-clip")
Returns:
saved_uris: A list of URIs where the embeddings are storedsuccess: Whether the operation succeedederror_msg: Error message, if any
image_embedding
Generate embedding vectors for images.
Parameters:
images: A list of image URLs or base64-encoded imagesmodel: The model to use (default: "fg-clip")
Returns:
saved_uris: A list of URIs where the embeddings are storedsuccess: Whether the operation succeedederror_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 embeddingsuris_b: A list of URIs for the second set of embeddingsmode: 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 matrixshape: Shape information of the resultsuccess: Whether the operation succeeded
Development & Testing
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"
}
}
}
}
Use Case in Cursor IDE
Locate MCP Setting

Config MCP Setting

Enable MCP

Chat with MCP
Example: Searching for images based on given text

<div style="display: flex; gap: 10px;"> <img src="https://p0.qhimg.com/t11098f6bcd000b4fb05d7bf627.jpg" alt="Image 1" title="https://p0.qhimg.com/t11098f6bcd000b4fb05d7bf627.jpg" style="width: 45%;"> <img src="https://p0.qhimg.com/t11098f6bcdc3c5f3e99a1dbfad.jpg" alt="Image 2" title="https://p0.qhimg.com/t11098f6bcdc3c5f3e99a1dbfad.jpg" style="width: 45%;"> </div>
Image URLs:
- https://p0.qhimg.com/t11098f6bcd000b4fb05d7bf627.jpg
- https://p0.qhimg.com/t11098f6bcdc3c5f3e99a1dbfad.jpg
License
Apache License 2.0
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.