Chroma MCP Server

Chroma MCP servers enable AI models to interact with the Chroma embedding database for vector search, collection management, and document operations.

GitHub starsPyPI version

Overview

The Chroma MCP Server connects AI models to Chroma, the open-source embedding database for building Python or JavaScript LLM apps with memory. It provides standardized tools to create and manage collections, add/query documents via vector search and full-text search, and filter by metadata.

Created by:

Developed by Chroma

Key Features

🔌

Flexible Client Types

Ephemeral, persistent (file-based), HTTP for self-hosted, and Cloud client

🗂️

Collection Management

Create, modify, delete; list with pagination; HNSW configuration

📄

Document Operations

Add, query, get, update, delete; metadata filtering and full text search

🧠

Embedding Functions

Supports default, Cohere, OpenAI, Jina, VoyageAI, Roboflow; persists per-collection

Available Tools

Quick Reference

ToolPurposeCategory
chroma_list_collectionsList collections with paginationDiscovery
chroma_create_collectionCreate a new collectionSchema
chroma_modify_collectionUpdate name or metadataSchema
chroma_delete_collectionDelete a collectionSchema
chroma_add_documentsInsert documents with metadata/IDsWrite
chroma_query_documentsSemantic query with filtersRead
chroma_get_documentsRetrieve by IDs/filtersRead
chroma_update_documentsUpdate content/metadata/embeddingsWrite
chroma_delete_documentsRemove documentsWrite

Detailed Usage

chroma_list_collections

List all collections with optional pagination parameters.

use_mcp_tool({
  server_name: "chroma",
  tool_name: "chroma_list_collections",
  arguments: {
    offset: 0,
    limit: 20
  }
});
chroma_create_collection

Create a collection with optional metadata and HNSW configuration.

use_mcp_tool({
  server_name: "chroma",
  tool_name: "chroma_create_collection",
  arguments: {
    name: "my_collection",
    metadata: { project: "docs" },
    hnsw: { m: 16, efConstruction: 200 }
  }
});
chroma_add_documents

Add documents with optional metadata and custom IDs.

use_mcp_tool({
  server_name: "chroma",
  tool_name: "chroma_add_documents",
  arguments: {
    collection: "my_collection",
    ids: ["doc-1", "doc-2"],
    documents: [
      "First document text",
      "Second document text"
    ],
    metadatas: [
      { source: "notes" },
      { source: "manual" }
    ]
  }
});
chroma_query_documents

Query documents using semantic search with advanced metadata filtering.

use_mcp_tool({
  server_name: "chroma",
  tool_name: "chroma_query_documents",
  arguments: {
    collection: "my_collection",
    query_texts: ["pagination implementation"],
    n_results: 5,
    where: { source: "manual" }
  }
});
chroma_get_documents

Retrieve documents by IDs or metadata filters with pagination.

use_mcp_tool({
  server_name: "chroma",
  tool_name: "chroma_get_documents",
  arguments: {
    collection: "my_collection",
    ids: ["doc-1"],
    offset: 0,
    limit: 10
  }
});

Installation

{
  "mcpServers": {
    "chroma": {
      "command": "uvx",
      "args": [
        "chroma-mcp",
        "--client-type",
        "ephemeral"
      ]
    }
  }
}

Persistent / Cloud / HTTP:

Configure clients via arguments:


Persistent: "args": ["chroma-mcp", "--client-type", "persistent", "--data-dir", "/path/to/data"]
Cloud: "args": ["chroma-mcp", "--client-type", "cloud", "--tenant", "your-tenant", "--database", "your-db", "--api-key", "your-api-key"]
HTTP: "args": ["chroma-mcp", "--client-type", "http", "--host", "your-host", "--port", "your-port", "--custom-auth-credentials", "your-credentials", "--ssl", "true"]

Embedding Function API Keys:

When using external embedding providers (Cohere, OpenAI, Jina, VoyageAI, Roboflow), set the corresponding API key environment variables per provider. Embedding function persistence requires Chroma v1.0.0+.


For secure local setup, pass --dotenv-path to load keys from a custom .env file.


Example: "args": ["chroma-mcp", "--dotenv-path", "/custom/path/.env"]

Sources