MCP Integration

Dupify is available as an MCP (Model Context Protocol) server. Add it to Claude Desktop and your AI assistant can extract embeddings, analyze colors, detect attributes, and help you build visual search.

Quick Start

Add the Dupify MCP server to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "dupify": {
      "command": "npx",
      "args": ["-y", "@dupify/mcp-server"],
      "env": {
        "DUPIFY_API_KEY": "fe_live_your_api_key_here"
      }
    }
  }
}

Restart Claude Desktop after saving the config. The Dupify tools will be available immediately.

Available Tools

extract_embedding

Generate a 768-dimensional CLIP embedding vector for visual similarity search.

ParameterTypeDescription
image_urlstringURL of an image to process
image_base64stringBase64-encoded image data
include_qualitybooleanInclude image quality scores (default: false)

extract_colors

Extract dominant colors from an image with perceptual weighting.

ParameterTypeDescription
image_urlstringURL of an image to process
image_base64stringBase64-encoded image data
num_colorsnumberNumber of colors to extract (1-10, default: 5)

extract_silhouette

Generate a shape-based embedding by removing the background and analyzing the silhouette. Perfect for matching products by form regardless of color.

ParameterTypeDescription
image_urlstringURL of an image to process
image_base64stringBase64-encoded image data

extract_attributes

Extract structured attributes from product title and description text.

ParameterTypeDescription
titlestring (required)Product title
descriptionstringProduct description (improves accuracy)
category_hintstringCategory hint (fashion, beauty, home)

Example Conversations

Once configured, you can ask Claude things like:

"Generate a CLIP embedding for this product image"

(with an image URL)

"What are the dominant colors in this dress?"

(with a product image URL)

"Extract the silhouette embedding for this furniture image"

"What attributes can you detect from: Women's Cotton V-Neck T-Shirt"

Environment Variables

VariableRequiredDescription
DUPIFY_API_KEYYesYour Dupify API key
DUPIFY_API_URLNoAPI base URL (default: https://dupifyapp.com)

Programmatic Usage

You can also use the MCP server package programmatically in your own applications:

import { DupifyApiClient } from '@dupify/mcp-server';

const client = new DupifyApiClient({
  apiKey: 'fe_live_xxx',
});

// Generate embedding
const embedding = await client.extractEmbedding({
  image_url: 'https://example.com/product.jpg',
});
console.log(embedding.embedding); // [0.1, 0.2, ...]

// Extract colors
const colors = await client.extractColors({
  image_url: 'https://example.com/product.jpg',
});
console.log(colors.colors); // [{ hex: '#ff0000', weight: 0.3 }, ...]

Rate Limits

MCP usage counts against your API rate limits. See Rate Limits for details on limits per tier.

Troubleshooting

Tools not appearing in Claude

  • Make sure Claude Desktop is fully restarted after editing the config
  • Check that the JSON syntax is valid (no trailing commas, proper quotes)
  • Verify your API key is correct and starts with fe_live_

"API key invalid" errors

  • Double-check your API key in the dashboard
  • Make sure there are no extra spaces or newlines in the key
  • Verify the key has the appropriate scopes enabled (embed, colors, silhouette, attributes)