Glacier.Vector
1.0.3
dotnet add package Glacier.Vector --version 1.0.3
NuGet\Install-Package Glacier.Vector -Version 1.0.3
<PackageReference Include="Glacier.Vector" Version="1.0.3" />
<PackageVersion Include="Glacier.Vector" Version="1.0.3" />
<PackageReference Include="Glacier.Vector" />
paket add Glacier.Vector --version 1.0.3
#r "nuget: Glacier.Vector, 1.0.3"
#:package Glacier.Vector@1.0.3
#addin nuget:?package=Glacier.Vector&version=1.0.3
#tool nuget:?package=Glacier.Vector&version=1.0.3
Glacier.Vector
📖 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>andMemory<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
- Compute Kernels: Static, SIMD-optimized methods for distance calculations.
- Vector Storage: Manages the raw memory layouts of vectors and metadata.
- Vector Index: Coordinates search operations and manages IDs/metadata mappings.
- 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.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Glacier.Vector:
| Package | Downloads |
|---|---|
|
Glacier.Bundle
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.