Distance Metrics Engine

Distance Metrics Engine MCP Connector for Claude

A+

Calculate mathematically perfect Cosine, Euclidean, Manhattan, and Chebyshev distances between high-dimensional vectors local. Essential for embedding comparisons.

1 tools Official Updated Jun 28, 2026 Official Vinkius Partner

When working with embeddings in machine learning, calculating the Cosine Similarity between two 1024-dimensional vectors is a fundamental task. LLMs cannot perform this calculation accurately — they will approximate and get it wrong.

This MCP delegates the vector math to ml-distance locally, allowing the AI to perfectly compute similarity and distance metrics without cloud-API dependencies or math hallucinations.

The Superpowers

  • Zero Hallucination: Exact vector distances computed locally by your CPU.
  • Full Metric Suite: Cosine, Euclidean, Manhattan, and Chebyshev distances with both distance and similarity values.
  • High-Dimensional Support: Handles 1536-dimensional OpenAI embeddings in milliseconds.
  • Data Privacy: Your embedding vectors and model weights never leave your machine.
vector-mathcosine-similarityeuclidean-distanceembeddingsmachine-learningdata-processing

1 tools expose this connector's capabilities to your AI agent.

distance_metrics_calculate

Calculate exact distances (Cosine, Euclidean, Manhattan) between high-dimensional vectors/embeddings offline

See how to talk to your AI agent using Distance Metrics Engine.

Calculate the Cosine similarity between these two embedding vectors.

The exact cosine similarity is 0.9412, meaning the two documents are highly semantically similar. The cosine distance is 0.0588.

What is the Euclidean distance between [1, 2, 3] and [4, 5, 6]?

The exact Euclidean distance is 5.196152. The corresponding similarity score (1/(1+d)) is 0.161290.

Measure the Manhattan distance between the user's feature vector and the cluster centroid.

The Manhattan distance computation returned exactly 12.0. This positions the user in the outer boundary of Cluster 3.

No, Cosine Distance equals 1 minus Cosine Similarity. The engine returns both exact values in the JSON response so you always have the complete picture.

Related Connectors