Spaces:
Sleeping
Sleeping
metadata
title: Nomic MCP Tool
emoji: 🗂️
colorFrom: indigo
colorTo: pink
sdk: gradio
sdk_version: 5.26.0
app_file: app.py
pinned: false
Nomic Vision Embedding MCP Server
This is a Model Context Protocol (MCP) server for the nomic-ai/nomic-embed-vision-v1.5 image embedding model, deployed on Huggingface Spaces using Gradio.
Features
- Generate embeddings for images using the nomic-ai/nomic-embed-vision-v1.5 model
- Expose embedding functionality through a Gradio web interface
- Implement the Model Context Protocol (MCP) to allow integration with MCP clients
How It Works
This application provides two interfaces:
- Web Interface: A Gradio UI that allows users to upload images and view the generated embeddings
- MCP Interface: An implementation of the Model Context Protocol that exposes the embedding functionality as a tool
MCP Tool
The server exposes the following MCP tool:
- embed_image: Generate embeddings for an image
- Input:
image_url: URL of the image to embed, ORimage_data: Base64-encoded image data
- Output: JSON object containing the embedding vector and its dimension
- Input:
Deployment
This application is designed to be deployed on Huggingface Spaces. To deploy:
- Create a new Space on Huggingface Spaces with the Gradio SDK
- Upload these files to your Space
- The Space will automatically build and deploy the application
Local Development
To run this application locally:
- Clone this repository
- Install the dependencies:
pip install -r requirements.txt - Run the application:
python app.py - Open your browser at http://localhost:7860
Requirements
- Python 3.7+
- Gradio 4.0+
- Transformers
- PyTorch
- Pillow
- NumPy
- Model Context Protocol library
License
This project is licensed under the MIT License - see the LICENSE file for details.