Home / MCP / MCP Chroma MCP Server

MCP Chroma MCP Server

Provides an MCP server to manage ChromaDB vector embeddings, collections, and documents.

rust
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "chroma_http": {
            "command": "mcp-chroma",
            "args": [
                "--client-type",
                "http",
                "--host",
                "localhost",
                "--port",
                "8000"
            ],
            "env": {
                "CHROMA_API_KEY": "<YOUR_API_KEY>"
            }
        }
    }
}

You set up this MCP server to interact with ChromaDB, enabling you to manage vector embeddings, collections, and documents through a consistent Model-Controller-Protocol interface. This makes it easy to integrate with various clients and orchestrate document workflows across sessions.

How to use

To use the MCP server, launch the local Chroma MCP instance and connect a compatible MCP client. Start by starting the server with the appropriate mode, then point your client at the host and port you configured. Once connected, you can create and manage collections, add and query documents, and process thoughts for session continuity. Use the client to perform collection operations such as create, list, modify, and delete, and perform document operations like add, query, get, update, and delete. This setup supports multiple client types, including HTTP, persistent local storage, and in-memory ephemeral modes, allowing you to tailor performance and persistence to your needs.

How to install

Prerequisites: ensure you have Rust and Cargo installed on your system to build the server from source.

Clone the project repository and build the server in release mode.

git clone https://github.com/yourusername/mcp-chroma.git
cd mcp-chroma
cargo build --release

Additional setup and usage notes

Create a configuration file to specify how the server connects to ChromaDB and how clients should reach it. The example below demonstrates setting the client type to HTTP for remote access, and listening on localhost:8000. You will also provide an API key for authenticated cloud access when needed.

# Example environment file for the Chroma MCP server
CHROMA_CLIENT_TYPE=ephemeral
CHROMA_HOST=localhost
CHROMA_PORT=8000

Starting with HTTP client type

If you want to expose the MCP server via HTTP, run the MCP server with the HTTP client type and specify host and port. This enables a remote MCP client to connect over HTTP.

./mcp-chroma --client-type http --host localhost --port 8000

Starting with persistent storage

To enable persistent storage, start the server with the persistent client type and provide a data directory for the storage.

./mcp-chroma --client-type persistent --data-dir ./chroma_data

Available tools

chroma_list_collections

List all collections in ChromaDB exposed by the MCP server.

chroma_create_collection

Create a new collection within ChromaDB.

chroma_peek_collection

Preview documents inside a specific collection.

chroma_get_collection_info

Retrieve metadata for a collection.

chroma_get_collection_count

Count documents within a collection.

chroma_modify_collection

Update properties of an existing collection.

chroma_delete_collection

Delete a collection from ChromaDB.

chroma_add_documents

Add documents to a collection.

chroma_query_documents

Query for similar or relevant documents using vector embeddings.

chroma_get_documents

Retrieve documents from a collection by IDs or queries.

chroma_update_documents

Update existing documents within a collection.

chroma_delete_documents

Remove documents from a collection.

process_thought

Process thoughts in an ongoing session to manage context and reasoning.