Home / MCP / MCP Chroma MCP Server
Provides an MCP server to manage ChromaDB vector embeddings, collections, and documents.
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.
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.
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 --releaseCreate 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=8000If 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 8000To 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_dataList all collections in ChromaDB exposed by the MCP server.
Create a new collection within ChromaDB.
Preview documents inside a specific collection.
Retrieve metadata for a collection.
Count documents within a collection.
Update properties of an existing collection.
Delete a collection from ChromaDB.
Add documents to a collection.
Query for similar or relevant documents using vector embeddings.
Retrieve documents from a collection by IDs or queries.
Update existing documents within a collection.
Remove documents from a collection.
Process thoughts in an ongoing session to manage context and reasoning.