# Chroma (Vector DB) MCP MCP

> Chroma (Vector DB) connects your AI client directly to a semantic vector database, allowing natural language queries against high-dimensional embeddings. You can list collections, query specific document segments, and audit the total volume of stored data without writing complex Python code. It gives your agent full control over context retrieval.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Tags:** embeddings, semantic-search, llm-infrastructure, vector-search, data-retrieval, machine-learning

## Description

This connector lets you bring unstructured knowledge—like internal documents or massive datasets—into conversation with your AI client. Instead of asking an LLM to guess based on its training data, you query the actual source material stored in Chroma. Your agent can perform deep semantic searches, finding relevant context even when a user doesn't use specific keywords.

Need to know what’s available? You can list all collections and check their metadata. Want to verify how many records you have? A quick count gives you the total document volume. If you need to inspect a small sample of data, you can peek at documents directly or retrieve entire physical records by ID.

This capability is crucial for building reliable RAG systems. When you build multi-platform automation—say, chaining this MCP with a billing system and a messaging MCP—the power comes from knowing that the AI agent is referencing real, audited data every time. This reliability across multiple services is managed by Vinkius's zero-trust proxy, ensuring your keys are used only in transit, never stored on disk.

## Tools

### check_heartbeat
Checks if the Chroma API connection is alive and responsive to basic network pings.

### count_documents
Gets an explicit count of how many total documents are stored in a given collection.

### get_collection
Reads the specific, bounded configuration details for one vector collection.

### get_documents
Retrieves the full content and context of documents from specified arrays.

### list_collections
Lists every defined vector collection available within your database tenant.

### peek_documents
Extracts a limited, visible preview of the data stored in a specified database segment.

### query_embeddings
Finds documents by matching high-dimensional semantic vectors to user input context.

## Prompt Examples

**Prompt:** 
```
List all vector collections
```

**Response:** 
```
I found 3 collections: 'knowledge-base', 'user-embeddings', and 'staging-docs'. Would you like to check the document count for any of them?
```

**Prompt:** 
```
Peek at the first 5 documents in 'knowledge-base'
```

**Response:** 
```
Peeking into 'knowledge-base'... Here are the first 5 documents. They contain technical documentation about our API endpoints and authentication flows. Each has metadata like 'source' and 'last_updated'.
```

**Prompt:** 
```
Is the Chroma server alive?
```

**Response:** 
```
Checking heartbeat... Connection successful! The Chroma instance responded in 12ms and is fully operational.
```

## Capabilities

### Check System Status
Validate the fundamental network availability of your Chroma API nodes.

### Audit Document Counts
Get an exact count of total documents stored within a collection.

### Inspect Collection Metadata
List and check the detailed configuration settings for all vector collections.

### Retrieve Specific Context
Search high-dimensional vectors to find context relevant to a natural language query.

### View Sample Records
Extract and display a preview of the data stored within defined database limits.

### Fetch Full Documents
Retrieve complete physical documents, including their semantic context, from known arrays.

## Use Cases

### Onboarding a new knowledge source
A data engineer needs to verify if all staging documents have been indexed. They ask their agent: 'First, run `list_collections` to see the names, then use `count_documents` on the 'staging-docs' collection to confirm the volume.' The agent runs both tools and reports back.

### Finding obscure documentation
A product manager asks: 'Find me articles that discuss authentication flows for API v2.' The agent uses `query_embeddings`, which bypasses keyword limitations, pulling up relevant segments from the correct collection.

### Checking data integrity before launch
A developer wants to confirm if a production database is connected. They ask their agent: 'Is the Chroma instance healthy?' The agent runs `check_heartbeat`, confirming connectivity in milliseconds, allowing development to proceed.

### Debugging context limits
A user thinks an AI response is wrong because it missed a detail. They instruct their agent: 'Show me five examples from the knowledge base.' The agent uses `peek_documents` and displays the raw, visible sample for review.

## Benefits

- You gain full visibility into your data assets. Use `list_collections` to see every defined vector collection and `get_collection` to understand its specific settings.
- Stop relying on simple keyword matches. The `query_embeddings` tool performs high-dimensional searches, pulling context that actually relates semantically to the query.
- Auditing data volume is fast. Running `count_documents` gives you a single number for total document capacity without running a full read operation.
- Debug context retrieval easily. Instead of writing code, use `peek_documents` to pull small, visible samples and check if the right metadata is attached.
- Validate your setup instantly. The `check_heartbeat` tool confirms that the entire Chroma instance is up and running before you start any complex queries.

## How It Works

The bottom line is: you get direct, conversational access to deep knowledge retrieval without writing boilerplate code.

1. Subscribe to this MCP and enter your Chroma URL (Cloud or self-hosted) along with your API Key.
2. Your agent uses natural language instructions to call the relevant tool, like asking for a document count or requesting semantic searches.
3. The MCP executes the query against Chroma and returns structured data containing the requested documents or metadata directly to your client.

## Frequently Asked Questions

**How do I list all available vector collections using Chroma (Vector DB)?**
Use `list_collections`. This tool runs against your database tenant and returns a clean list of every defined collection name, letting you see what data sources are accessible.

**Does count_documents give the true total volume?**
Yes, `count_documents` provides an explicit structural enumeration of the total documents within a specific collection. This is faster than attempting to retrieve every single record for counting purposes.

**What's the difference between peek_documents and get_documents?**
Use `peek_documents` when you just need a quick, visible sample of data without the overhead. Use `get_documents` when you need the full, complete physical document content for processing.

**I need to check if my Chroma connection is working; should I use check_heartbeat?**
Yes, run `check_heartbeat`. It's the fastest way to validate network availability against your API nodes, confirming the service is operational before you try running any complex queries.

**How do I use `query_embeddings` to find relevant context for my application?**
You provide the agent with a query vector, and it executes high-dimensional semantic searches against your database. This tool finds the most conceptually similar documents stored in your collections.

**When should I use `get_collection` versus just listing all available data structures?**
`get_collection` lets you inspect a collection's specific structure, metadata, and configuration settings. Use it when you need to verify the boundaries or rules of one particular collection before querying it.

**If I know an exact document ID, how do I retrieve just that record using `get_documents`?**
You can target specific records by their unique IDs. This is useful for precise auditing because you don't have to sift through large arrays of data to find one piece.

**Do I need to worry about separating my production and staging environments when using this MCP?**
Yes, it’s critical. You should use the collection management tools, like `get_collection`, to ensure your agent interacts only with the intended tenant or environment.