nomic / README.md
AkinyemiAra's picture
Upload 9 files
72cd7d2 verified
|
raw
history blame
1.99 kB
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:

  1. Web Interface: A Gradio UI that allows users to upload images and view the generated embeddings
  2. 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, OR
      • image_data: Base64-encoded image data
    • Output: JSON object containing the embedding vector and its dimension

Deployment

This application is designed to be deployed on Huggingface Spaces. To deploy:

  1. Create a new Space on Huggingface Spaces with the Gradio SDK
  2. Upload these files to your Space
  3. The Space will automatically build and deploy the application

Local Development

To run this application locally:

  1. Clone this repository
  2. Install the dependencies: pip install -r requirements.txt
  3. Run the application: python app.py
  4. 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.