Skip to main content
Glama
zwczwczwc

Chroma MCP Server

by zwczwczwc

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CHROMA_SSLNoWhether to use SSL for self-hosted Chroma (true/false)
CHROMA_HOSTNoHost for self-hosted Chroma instance
CHROMA_PORTNoPort for self-hosted Chroma instance
CHROMA_TENANTNoTenant ID for Chroma Cloud
CHROMA_API_KEYNoAPI key for Chroma Cloud
CHROMA_DATABASENoDatabase name for Chroma Cloud
CHROMA_DATA_DIRNoData directory for persistent client
CHROMA_CLIENT_TYPENoType of Chroma client: ephemeral, persistent, http, or cloud
CHROMA_DOTENV_PATHNoPath to .env file
CHROMA_CUSTOM_AUTH_CREDENTIALSNoCustom auth credentials for self-hosted Chroma

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
chroma_list_collectionsA

List all collection names in the Chroma database with pagination support.

Args:
    limit: Optional maximum number of collections to return
    offset: Optional number of collections to skip before returning results

Returns:
    List of collection names or ["__NO_COLLECTIONS_FOUND__"] if database is empty
chroma_create_collectionC

Create a new Chroma collection with configurable HNSW parameters.

Args:
    collection_name: Name of the collection to create
    embedding_function_name: Name of the embedding function to use. Options: 'default', 'cohere', 'openai', 'jina', 'voyageai', 'ollama', 'roboflow'
    metadata: Optional metadata dict to add to the collection
chroma_peek_collectionB

Peek at documents in a Chroma collection.

Args:
    collection_name: Name of the collection to peek into
    limit: Number of documents to peek at
chroma_get_collection_infoC

Get information about a Chroma collection.

Args:
    collection_name: Name of the collection to get info about
chroma_get_collection_countC

Get the number of documents in a Chroma collection.

Args:
    collection_name: Name of the collection to count
chroma_modify_collectionB

Modify a Chroma collection's name or metadata.

Args:
    collection_name: Name of the collection to modify
    new_name: Optional new name for the collection
    new_metadata: Optional new metadata for the collection
chroma_fork_collectionC

Fork a Chroma collection.

Args:
    collection_name: Name of the collection to fork
    new_collection_name: Name of the new collection to create
    metadata: Optional metadata dict to add to the new collection
chroma_delete_collectionB

Delete a Chroma collection.

Args:
    collection_name: Name of the collection to delete
chroma_add_documentsC

Add documents to a Chroma collection.

Args:
    collection_name: Name of the collection to add documents to
    documents: List of text documents to add
    ids: List of IDs for the documents (required)
    metadatas: Optional list of metadata dictionaries for each document
chroma_query_documentsA

Query documents from a Chroma collection with advanced filtering.

Args:
    collection_name: Name of the collection to query
    query_texts: List of query texts to search for
    n_results: Number of results to return per query
    where: Optional metadata filters using Chroma's query operators
           Examples:
           - Simple equality: {"metadata_field": "value"}
           - Comparison: {"metadata_field": {"$gt": 5}}
           - Logical AND: {"$and": [{"field1": {"$eq": "value1"}}, {"field2": {"$gt": 5}}]}
           - Logical OR: {"$or": [{"field1": {"$eq": "value1"}}, {"field1": {"$eq": "value2"}}]}
    where_document: Optional document content filters
           Examples:
           - Contains: {"$contains": "value"}
           - Not contains: {"$not_contains": "value"}
           - Regex: {"$regex": "[a-z]+"}
           - Not regex: {"$not_regex": "[a-z]+"}
           - Logical AND: {"$and": [{"$contains": "value1"}, {"$not_regex": "[a-z]+"}]}
           - Logical OR: {"$or": [{"$regex": "[a-z]+"}, {"$not_contains": "value2"}]}
    include: List of what to include in response. By default, this will include documents, metadatas, and distances.
chroma_get_documentsA

Get documents from a Chroma collection with optional filtering.

Args:
    collection_name: Name of the collection to get documents from
    ids: Optional list of document IDs to retrieve
    where: Optional metadata filters using Chroma's query operators
           Examples:
           - Simple equality: {"metadata_field": "value"}
           - Comparison: {"metadata_field": {"$gt": 5}}
           - Logical AND: {"$and": [{"field1": {"$eq": "value1"}}, {"field2": {"$gt": 5}}]}
           - Logical OR: {"$or": [{"field1": {"$eq": "value1"}}, {"field1": {"$eq": "value2"}}]}
    where_document: Optional document content filters
           Examples:
           - Contains: {"$contains": "value"}
           - Not contains: {"$not_contains": "value"}
           - Regex: {"$regex": "[a-z]+"}
           - Not regex: {"$not_regex": "[a-z]+"}
           - Logical AND: {"$and": [{"$contains": "value1"}, {"$not_regex": "[a-z]+"}]}
           - Logical OR: {"$or": [{"$regex": "[a-z]+"}, {"$not_contains": "value2"}]}
    include: List of what to include in response. By default, this will include documents, and metadatas.
    limit: Optional maximum number of documents to return
    offset: Optional number of documents to skip before returning results

Returns:
    Dictionary containing the matching documents, their IDs, and requested includes
chroma_update_documentsA

Update documents in a Chroma collection.

Args:
    collection_name: Name of the collection to update documents in
    ids: List of document IDs to update (required)
    embeddings: Optional list of new embeddings for the documents.
                Must match length of ids if provided.
    metadatas: Optional list of new metadata dictionaries for the documents.
               Must match length of ids if provided.
    documents: Optional list of new text documents.
               Must match length of ids if provided.

Returns:
    A confirmation message indicating the number of documents updated.

Raises:
    ValueError: If 'ids' is empty or if none of 'embeddings', 'metadatas',
                or 'documents' are provided, or if the length of provided
                update lists does not match the length of 'ids'.
    Exception: If the collection does not exist or if the update operation fails.
chroma_delete_documentsA

Delete documents from a Chroma collection.

Args:
    collection_name: Name of the collection to delete documents from
    ids: List of document IDs to delete

Returns:
    A confirmation message indicating the number of documents deleted.

Raises:
    ValueError: If 'ids' is empty
    Exception: If the collection does not exist or if the delete operation fails.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zwczwczwc/chroma-mcp-ollama'

If you have feedback or need assistance with the MCP directory API, please join our Discord server