Use the following steps to run the agent and toolkit in the cloud with Meshagent Rooms:

Prerequisites

Required Environment Variables

  • CHROMA_API_KEY: Your Chroma API key

Steps

  1. Install the Meshagent CLI and tool dependencies:

    pip install "meshagent[all]"
    
  2. Sign up and authenticate with Meshagent: Sign up & authenticate instructions

  3. Start the MCP Chroma server as a Meshagent Room service:

    meshagent service test \
      --room=test \
      --role=agent \
      --image=meshagent/mcp-chroma:latest \
      --env MESHAGENT_PORT=8001 \
      --env CHROMA_API_KEY=your-api-key \
      --port="num=8001 path=/webhook liveness=/ type=meshagent.callable" \
      --name=mcp-chroma-service
    
    • This command will start a Meshagent Room with the MCP Chroma server running inside. The room will automatically close if it goes inactive.
  4. Start a chatbot agent in the room with the Chroma toolkit:

    meshagent chatbot join --room=test --agent-name=sample --name=sample --toolkit=mcp-chroma
    
    • This starts a chatbot in the Meshagent Room that can use the Chroma toolkit. Multiple toolkits and agents can be used in the same room.
    • A link to the interactive room will be provided in the output of this command.

Tools Available

Tools provided by this ServerShort Description
chroma_add_documentsAdd documents to a Chroma collection.
chroma_create_collectionCreate a new Chroma collection with configurable HNSW parameters.
chroma_delete_collectionDelete a Chroma collection.
chroma_delete_documentsDelete documents from a Chroma collection.
chroma_get_collection_countGet the number of documents in a Chroma collection.
chroma_get_collection_infoGet information about a Chroma collection.
chroma_get_documentsGet documents from a Chroma collection with optional filtering.
chroma_list_collectionsList all collection names in the Chroma database with pagination support.
chroma_modify_collectionModify a Chroma collection’s name or metadata.
chroma_peek_collectionPeek at documents in a Chroma collection.
chroma_query_documentsQuery documents from a Chroma collection with advanced filtering.
chroma_update_documentsUpdate documents in a Chroma collection.

Tool Details

chroma_add_documents

Add documents to a Chroma collection.

ParameterTypeDescription
collection_namestringName of the collection to add documents to
documentsarrayList of text documents to add
idsstring optionalOptional list of IDs for the documents
metadatasstring optionalOptional list of metadata dictionaries for each document

chroma_create_collection

Create a new Chroma collection with configurable HNSW parameters.

ParameterTypeDescription
collection_namestringName of the collection to create
batch_sizestring optionalNumber of elements to batch together during index construction
ef_constructionstring optionalSize of the candidate list for HNSW graph construction
ef_searchstring optionalSize of the candidate list for HNSW graph search
embedding_function_namestring optionalEmbedding function to use. Options: ‘default’, ‘cohere’, ‘openai’, ‘jina’, ‘voyageai’, ‘ollama’, ‘roboflow’
max_neighborsstring optionalMaximum neighbors during HNSW construction
metadatastring optionalOptional metadata dict for the collection
num_threadsstring optionalNumber of threads for HNSW construction
resize_factorstring optionalFactor to resize the index
spacestring optionalDistance function: ‘l2’, ‘ip’, ‘cosine’
sync_thresholdstring optionalElements to process before syncing to disk

chroma_delete_collection

Delete a Chroma collection.

ParameterTypeDescription
collection_namestringName of the collection to delete

chroma_delete_documents

Delete documents from a Chroma collection.

ParameterTypeDescription
collection_namestringName of the collection to delete documents from
idsarrayList of document IDs to delete

chroma_get_collection_count

Get the number of documents in a Chroma collection.

ParameterTypeDescription
collection_namestringName of the collection to count

chroma_get_collection_info

Get information about a Chroma collection.

ParameterTypeDescription
collection_namestringName of the collection to get info about

chroma_get_documents

Get documents from a Chroma collection with optional filtering.

ParameterTypeDescription
collection_namestringName of the collection to get documents from
idsstring optionalOptional list of document IDs to retrieve
includearray optionalWhat to include in the response. By default, includes documents and metadatas
limitstring optionalOptional max number of documents to return
offsetstring optionalNumber of documents to skip
wherestring optionalMetadata filters
where_documentstring optionalDocument content filters

chroma_list_collections

List all collection names in the Chroma database with pagination.

ParameterTypeDescription
limitstring optionalMax number of collections to return
offsetstring optionalNumber of collections to skip

chroma_modify_collection

Modify a Chroma collection’s name or metadata.

ParameterTypeDescription
collection_namestringName of the collection to modify
batch_sizestring optionalBatch size during index construction
ef_searchstring optionalCandidate list size for HNSW search
new_metadatastring optionalNew metadata for the collection
new_namestring optionalNew name for the collection
num_threadsstring optionalNumber of threads for HNSW
resize_factorstring optionalResize factor for index
sync_thresholdstring optionalElements processed before syncing to disk

chroma_peek_collection

Peek at documents in a Chroma collection.

ParameterTypeDescription
collection_namestringName of the collection to peek
limitinteger optionalNumber of documents to peek at

chroma_query_documents

Query documents from a Chroma collection with advanced filtering.

ParameterTypeDescription
collection_namestringName of the collection to query
query_textsarrayQuery texts to search for
includearray optionalWhat to include in the response (by default: documents, metadatas, distances)
n_resultsinteger optionalNumber of results to return per query
wherestring optionalMetadata filters
where_documentstring optionalDocument content filters

chroma_update_documents

Update documents in a Chroma collection.

ParameterTypeDescription
collection_namestringName of the collection to update
idsarrayList of document IDs
documentsstring optionalNew text documents
embeddingsstring optionalNew embeddings for the documents
metadatasstring optionalNew metadata dictionaries