ChromaDB Vector Database
STDIOChromaDB MCP server for vector embeddings, collections, and document management.
ChromaDB MCP server for vector embeddings, collections, and document management.
A ChromaDB MCP server for vector embeddings, collections, and document management.
This MCP server provides a interface for working with ChromaDB, a vector database for embeddings. It enables operations on collections and documents through a set of tools accessible via the MCP (Model-Controller-Protocol) interface.
Clone the repository and build with Cargo:
git clone https://github.com/yourusername/mcp-chroma.git cd mcp-chroma cargo build --release
Create a .chroma_env
file in your project directory with the configuration parameters:
CHROMA_CLIENT_TYPE=ephemeral
CHROMA_HOST=localhost
CHROMA_PORT=8000
# Run with default configuration ./mcp-chroma # Run with specific client type ./mcp-chroma --client-type http --host localhost --port 8000 # Run with persistent storage ./mcp-chroma --client-type persistent --data-dir ./chroma_data
Option | Environment Variable | Description | Default |
---|---|---|---|
--client-type | CHROMA_CLIENT_TYPE | Type of client (ephemeral, persistent, http, cloud) | ephemeral |
--data-dir | CHROMA_DATA_DIR | Directory for persistent storage | None |
--host | CHROMA_HOST | Host for HTTP client | None |
--port | CHROMA_PORT | Port for HTTP client | None |
--ssl | CHROMA_SSL | Use SSL for HTTP client | true |
--tenant | CHROMA_TENANT | Tenant for cloud client | None |
--database | CHROMA_DATABASE | Database for cloud client | None |
--api-key | CHROMA_API_KEY | API key for cloud client | None |
--dotenv-path | CHROMA_DOTENV_PATH | Path to .env file | .chroma_env |
chroma_list_collections
: List all collectionschroma_create_collection
: Create a new collectionchroma_peek_collection
: Preview documents in a collectionchroma_get_collection_info
: Get metadata about a collectionchroma_get_collection_count
: Count documents in a collectionchroma_modify_collection
: Update collection propertieschroma_delete_collection
: Delete a collectionchroma_add_documents
: Add documents to a collectionchroma_query_documents
: Search for similar documentschroma_get_documents
: Retrieve documents from a collectionchroma_update_documents
: Update existing documentschroma_delete_documents
: Delete documents from a collectionprocess_thought
: Process thoughts in an ongoing session{ "collection_name": "my_documents", "metadata": { "description": "A collection of example documents" } }
{ "collection_name": "my_documents", "query_texts": ["What are the benefits of vector databases?"], "n_results": 3 }
You can use MCP-Chroma with Claude by setting up a configuration like:
{ "mcpServers": { "chroma": { "command": "mcp-chroma", "args": [ "--client-type", "http", "--host", "localhost", "--port", "8000" ], "env": { "CHROMA_API_KEY": "<YOUR_API_KEY>" } } } }
To use MCP-Chroma with Cursor, add the following to your .vscode/mcp.json
file:
{ "mcp": { "inputs": [ { "type": "promptString", "id": "chroma_api_key", "description": "ChromaDB API Key", "password": true } ], "servers": { "chroma": { "command": "mcp-chroma", "args": [ "--client-type", "http", "--host", "localhost", "--port", "8000" ], "env": { "CHROMA_API_KEY": "${input:chroma_api_key}" } } } } }