Glacier.Vector

mcp
Security Audit
Warn
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Pass
  • Code scan — Scanned 1 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

High-performance, SIMD-accelerated vector search engine and MCP server for .NET 10. Optimized for LLM embeddings and semantic search.

README.md

Glacier.Vector

DEV.to Story
NuGet Version
NuGet Downloads

📖 Read the Deep-Dive: I built a zero-dependency C# vector database that saturates DDR5 RAM bandwidth.

Glacier.Vector is a high-performance, SIMD-accelerated vector search engine and index for .NET 10. Built for speed and efficiency, it provides a zero-copy architecture for storing and querying high-dimensional embeddings, commonly used in LLM-powered applications and semantic search.


Key Features

  • 🚀 SIMD-Accelerated Search: Utilizes hardware intrinsics (AVX2, AVX-512) for lightning-fast brute-force vector comparisons (Cosine Similarity, Dot Product, Euclidean Distance).
  • 🧠 LLM Optimized: Specifically designed to handle standard embedding dimensions (e.g., 1536 for OpenAI text-embedding-3-small).
  • 📥 Zero-Copy Memory Model: Efficiently manages large vector datasets in-memory using Span<T> and Memory<T>, minimizing allocations and GC pressure.
  • 🤖 MCP Server Support: Built-in support for the Model Context Protocol, allowing seamless integration with AI agents and tools.
  • 🛠️ Extensible Storage: Pluggable storage backends, starting with high-performance InMemoryVectorStorage.

Installation

Glacier.Vector is available as a NuGet package. Install it using the .NET CLI:

dotnet add package Glacier.Vector

Quick Start

1. Initialize Index and Storage

using Glacier.Vector.Index;
using Glacier.Vector.Storage;

// Initialize storage for 1536-dimensional vectors
using var storage = new InMemoryVectorStorage(dimensions: 1536);
using var index = new VectorIndex(storage);

2. Add Vectors

float[] vector = GetEmbeddings("Hello, world!");
index.Add(vector, id: "doc_1", metadata: "Greeting message");

3. Search

float[] query = GetEmbeddings("Hi there");
var results = index.Search(query, topK: 5);

foreach (var hit in results)
{
    Console.WriteLine($"ID: {hit.Id}, Score: {hit.Score:F4}, Metadata: {hit.Metadata}");
}

MCP Server Setup

Glacier.Vector includes a built-in MCP (Model Context Protocol) server host, allowing you to use your vector database as a tool for AI agents (like Claude or Antigravity).

1. Build the Server

First, build the host application in Release mode:

dotnet build src/Glacier.Vector.Host/Glacier.Vector.Host.csproj -c Release

2. Configure Your Client

Add the following entry to your mcp_config.json (usually located in %AppData%\Roaming\Claude\claude_desktop_config.json or your agent's config directory):

{
  "mcpServers": {
    "glacier-vector": {
      "command": "dotnet",
      "args": [
        "ABS_PATH_TO_REPO/src/Glacier.Vector.Host/bin/Release/net10.0/Glacier.Vector.Host.dll"
      ]
    }
  }
}

3. Available Tools

  • add_vector: Adds a 1536-dimensional vector and associated metadata to the index.
  • search_vectors: Performs a semantic search for the closest matches to a query vector.
  • ping: Simple health check to verify the server is responding.

The server defaults to 1536 dimensions, optimized for modern LLM embedding models.


Performance

Glacier.Vector is designed to saturate your CPU's memory bandwidth during search operations. On modern hardware, it can scan millions of vectors per second using SIMD-optimized kernels.

Operation Performance
Vector Scan ~100M+ dimensions/sec (per core)
Index Load Near-instant (In-Memory)
Memory Overhead ~4 bytes per dimension (float32)

Architecture

  1. Compute Kernels: Static, SIMD-optimized methods for distance calculations.
  2. Vector Storage: Manages the raw memory layouts of vectors and metadata.
  3. Vector Index: Coordinates search operations and manages IDs/metadata mappings.
  4. MCP Integration: Exposes the vector search capabilities via a standard Model Context Protocol interface.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

Credits

Developed by Ian Cowley and Antigravity (Google DeepMind).

License

This project is licensed under the MIT License - see the LICENSE file for details.

Reviews (0)

No results found