Back to MCP Catalog

Chroma Vector Database MCP Server

DatabasesPython
Vector database for AI applications with semantic search capabilities
Available Tools

chroma_list_collections

List all collections with pagination support

chroma_create_collection

Create a new collection with optional HNSW configuration

chroma_peek_collection

View a sample of documents in a collection

chroma_get_collection_info

Get detailed information about a collection

chroma_get_collection_count

Get the number of documents in a collection

chroma_modify_collection

Update a collection's name or metadata

chroma_delete_collection

Delete a collection

chroma_add_documents

Add documents with optional metadata and custom IDs

chroma_query_documents

Query documents using semantic search with advanced filtering

chroma_get_documents

Retrieve documents by IDs or filters with pagination

chroma_update_documents

Update existing documents' content, metadata, or embeddings

chroma_delete_documents

Delete specific documents from a collection

Chroma MCP provides a powerful vector database implementation for AI applications, enabling efficient storage and retrieval of embeddings. It allows models to create collections over generated data and user inputs, and retrieve that data using vector search, full text search, and metadata filtering. With support for multiple client types (ephemeral, persistent, HTTP, and Cloud), Chroma MCP offers flexible deployment options for different use cases. The server implements the Model Context Protocol (MCP) to seamlessly integrate with LLM applications, providing the context they require through standardized interfaces.

Overview

Chroma MCP is a Model Context Protocol server implementation that provides vector database capabilities powered by Chroma. It enables AI models to store, organize, and retrieve data using vector search, full text search, and metadata filtering.

Installation

Using with Claude Desktop

To add Chroma MCP to Claude Desktop, add the following to your claude_desktop_config.json file:

"mcpServers": {
  "chroma": {
    "url": "https://smithery.ai/server/@chroma-core/chroma-mcp"
  }
}

Self-Hosting

To self-host Chroma MCP:

  1. Clone the repository:

    git clone https://github.com/chroma-core/chroma-mcp.git
    cd chroma-mcp
    
  2. Install dependencies:

    pip install -e .
    
  3. Run the server:

    python -m chroma_mcp.server
    
  4. Configure your LLM client to connect to the server at http://localhost:8000

Docker Deployment

You can also run Chroma MCP using Docker:

docker pull ghcr.io/chroma-core/chroma-mcp:latest
docker run -p 8000:8000 ghcr.io/chroma-core/chroma-mcp:latest

Configuration

Chroma MCP supports several client types:

  • Ephemeral: In-memory storage for testing and development
  • Persistent: File-based storage for persistent data
  • HTTP: Connect to a self-hosted Chroma instance
  • Cloud: Connect to Chroma Cloud (api.trychroma.com)

Environment Variables

For embedding functions that use external APIs, set the appropriate environment variables:

  • OPENAI_API_KEY: For OpenAI embeddings
  • COHERE_API_KEY: For Cohere embeddings
  • JINA_API_KEY: For Jina embeddings
  • VOYAGE_API_KEY: For VoyageAI embeddings
  • ROBOFLOW_API_KEY: For Roboflow embeddings

Usage Examples

Creating a Collection

# Create a new collection with OpenAI embeddings
chroma_create_collection(
  name="my_documents",
  metadata={"description": "My important documents"},
  embedding_function="openai"
)

Adding Documents

# Add documents to a collection
chroma_add_documents(
  collection_name="my_documents",
  documents=["Document 1 content", "Document 2 content"],
  metadatas=[{"source": "file1"}, {"source": "file2"}],
  ids=["doc1", "doc2"]
)

Querying Documents

# Query documents using semantic search
results = chroma_query_documents(
  collection_name="my_documents",
  query_texts=["Find similar content to this"],
  n_results=5,
  where={"source": "file1"}
)

Retrieving Documents

# Get documents by IDs
documents = chroma_get_documents(
  collection_name="my_documents",
  ids=["doc1", "doc2"],
  include=["documents", "metadatas", "embeddings"]
)

Advanced Features

  • HNSW Configuration: Optimize vector search performance by configuring HNSW parameters when creating collections
  • Metadata Filtering: Use complex filters to narrow down search results
  • Full Text Search: Search document content using keywords
  • Collection Management: Create, modify, delete, and list collections
  • Document Operations: Add, update, query, and delete documents

For more detailed information, refer to the Chroma documentation.

Related MCPs

Milvus Vector Database
DatabasesPython

Connect to Milvus vector database for semantic search and vector operations

MotherDuck DuckDB
DatabasesPython

SQL analytics with DuckDB and MotherDuck for AI assistants

Alibaba Cloud Tablestore
DatabasesJava, Python

Connect to Alibaba Cloud Tablestore for vector search and RAG applications

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.