Get the FREE Ultimate OpenClaw Setup Guide →

chroma

A Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio chroma-core-chroma-mcp uvx chroma-mcp \
  --env CHROMA_SSL="true|false - enable SSL for HTTP client" \
  --env CHROMA_HOST="host for self-hosted HTTP client" \
  --env CHROMA_PORT="port for self-hosted HTTP client" \
  --env CHROMA_TENANT="Chroma Cloud tenant ID (for cloud client)" \
  --env CHROMA_API_KEY="API key for embedding functions or cloud access (for cloud or external APIs)" \
  --env CHROMA_DATABASE="Chroma Cloud database name (for cloud client)" \
  --env CHROMA_DATA_DIR="path to data directory for persistent client" \
  --env CHROMA_CLIENT_TYPE="http | cloud | persistent | ephemeral (default: http) - selects client type" \
  --env CHROMA_DOTENV_PATH="path to a .env-like file (default: .chroma_env)" \
  --env CHROMA_CUSTOM_AUTH_CREDENTIALS="custom credentials for HTTP access"

How to use

Chroma MCP Server provides data retrieval capabilities powered by Chroma, exposing a set of CLI tools to manage collections, documents, and embeddings. With this MCP server you can create, list, and inspect collections; add, query, update, and delete documents; and configure embedding functions that persist per-collection. Tools available include chroma_list_collections, chroma_create_collection, chroma_peek_collection, chroma_get_collection_info, chroma_get_collection_count, chroma_modify_collection, chroma_delete_collection, chroma_add_documents, chroma_query_documents, chroma_get_documents, chroma_update_documents, and chroma_delete_documents. Embedding functions supported include default, cohere, openai, jina, voyageai, and roboflow, with environment variables available to supply their API keys. When using embedding functions that rely on external APIs, set the corresponding CHROMA_<EMBEDDING>_API_KEY environment variable. The MCP server can be driven via the Claude Desktop configuration style demonstrated in the README, using uvx to invoke chroma-mcp, enabling ephemeral, persistent, cloud, or http client configurations as needed.

How to install

Prerequisites:

  • Python 3.8+ (recommended)
  • Access to install Python packages and run commands in your environment
  • Optional: Docker if you prefer containerized deployment

Install via uvx (preferred workflow shown):

  1. Install uvx (required to run chroma-mcp). Depending on your environment, install via pipx or your preferred method as per uvx documentation.

    • If using pipx: pipx install uvx

    • If you already have Python tooling set up, you can install uvx directly via pip and ensure the uvx executable is on your PATH.

  2. Run the MCP server:

    uvx chroma-mcp

  3. (Optional) Run with a specific client configuration (ephemeral, persistent, http, or cloud) by setting environment variables from the guide and/or providing a custom data directory:

    CHROMA_CLIENT_TYPE="persistent" CHROMA_DATA_DIR="/path/to/data" uvx chroma-mcp

Docker alternative (if you have a prebuilt image):

  1. Ensure you have Docker installed and running.

  2. Run a container image that exposes the chroma-mcp entrypoint, for example:

    docker run -i --env CHROMA_CLIENT_TYPE="http" --env CHROMA_HOST="your-host" --env CHROMA_PORT="your-port" chroma-mcp-image

Prerequisite notes:

  • If you plan to use embedding services that require API keys, prepare the API keys and set them as environment variables per embedding function requirements.

Additional notes

Environment variable management: command-line arguments take precedence over environment variables. If you need to keep API keys and sensitive data out of your shell history or repo, use a .env file and point CHROMA_DOTENV_PATH to that file. For self-hosted deployments, ensure CHROMA_HOST and CHROMA_PORT are configured correctly and consider enabling CHROMA_SSL for encrypted connections. Embedding function keys should be provided via CHROMA_<EMBEDDING>_API_KEY format, for example CHROMA_COHERE_API_KEY. If you created older collections with older versions, embedding function persistence might differ; upgrade as needed to take advantage of per-collection embedding function persistence introduced in v1.0.0.

Related MCP Servers

Sponsor this space

Reach thousands of developers