Chroma MCP Server
OfficialThe Chroma MCP Server is an open-source embedding database that enables AI models and LLM applications to perform comprehensive data storage, retrieval, and management using vector search, full text search, and metadata filtering.
Client Management: Connect using ephemeral (in-memory), persistent (file-based), HTTP (self-hosted), or Cloud (Chroma Cloud) client types for flexible deployment options.
Collection Management: Create, list, retrieve, modify, fork, and delete collections with configurable HNSW parameters, pagination support, and document count tracking.
Document Operations: Add, query, retrieve, update, delete, and peek at documents with optional metadata, custom IDs, and advanced filtering capabilities using logical operators (AND/OR) for both metadata and content.
Query Capabilities: Perform semantic search and full text search with sophisticated filtering options including equality, comparison,
$contains,$not_contains, and$regexoperations.Embedding Functions: Support for multiple embedding functions (
default,cohere,openai,jina,voyageai,ollama,roboflow) with API key configuration via environment variables for external services.
Supports building JavaScript LLM applications with vector database memory capabilities powered by Chroma, enabling embedding-based retrieval for context augmentation.
Supports building Python LLM applications with vector database memory capabilities powered by Chroma, enabling embedding-based retrieval for context augmentation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Chroma MCP Server search my notes collection for information about machine learning models"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Chroma MCP Server
The Model Context Protocol (MCP) is an open protocol designed for effortless integration between LLM applications and external data sources or tools, offering a standardized framework to seamlessly provide LLMs with the context they require.
This server provides data retrieval capabilities powered by Chroma, enabling AI models to create collections over generated data and user inputs, and retrieve that data using vector search, full text search, metadata filtering, and more.
This is a MCP server for self-hosting your access to Chroma. If you are looking for Package Search you can find the repository for that here.
Features
Flexible Client Types
Ephemeral (in-memory) for testing and development
Persistent for file-based storage
HTTP client for self-hosted Chroma instances
Cloud client for Chroma Cloud integration (automatically connects to api.trychroma.com)
Collection Management
Create, modify, and delete collections
List all collections with pagination support
Get collection information and statistics
Configure HNSW parameters for optimized vector search
Select embedding functions when creating collections
Document Operations
Add documents with optional metadata and custom IDs
Query documents using semantic search
Advanced filtering using metadata and document content
Retrieve documents by IDs or filters
Full text search capabilities
Supported Tools
chroma_list_collections- List all collections with pagination supportchroma_create_collection- Create a new collection with optional HNSW configurationchroma_peek_collection- View a sample of documents in a collectionchroma_get_collection_info- Get detailed information about a collectionchroma_get_collection_count- Get the number of documents in a collectionchroma_modify_collection- Update a collection's name or metadatachroma_delete_collection- Delete a collectionchroma_add_documents- Add documents with optional metadata and custom IDschroma_query_documents- Query documents using semantic search with advanced filteringchroma_get_documents- Retrieve documents by IDs or filters with paginationchroma_update_documents- Update existing documents' content, metadata, or embeddingschroma_delete_documents- Delete specific documents from a collection
Embedding Functions
Chroma MCP supports several embedding functions: default, cohere, openai, jina, voyageai, and roboflow.
The embedding functions utilize Chroma's collection configuration, which persists the selected embedding function of a collection for retrieval. Once a collection is created using the collection configuration, on retrieval for future queries and inserts, the same embedding function will be used, without needing to specify the embedding function again. Embedding function persistance was added in v1.0.0 of Chroma, so if you created a collection using version <=0.6.3, this feature is not supported.
When accessing embedding functions that utilize external APIs, please be sure to add the environment variable for the API key with the correct format, found in Embedding Function Environment Variables
Related MCP server: PDF Knowledgebase MCP Server
Usage with Claude Desktop
To add an ephemeral client, add the following to your
claude_desktop_config.jsonfile:
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp"
]
}To add a persistent client, add the following to your
claude_desktop_config.jsonfile:
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp",
"--client-type",
"persistent",
"--data-dir",
"/full/path/to/your/data/directory"
]
}This will create a persistent client that will use the data directory specified.
To connect to Chroma Cloud, add the following to your
claude_desktop_config.jsonfile:
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp",
"--client-type",
"cloud",
"--tenant",
"your-tenant-id",
"--database",
"your-database-name",
"--api-key",
"your-api-key"
]
}This will create a cloud client that automatically connects to api.trychroma.com using SSL.
Note: Adding API keys in arguments is fine on local devices, but for safety, you can also specify a custom path for your environment configuration file using the --dotenv-path argument within the args list, for example: "args": ["chroma-mcp", "--dotenv-path", "/custom/path/.env"].
To connect to a [self-hosted Chroma instance on your own cloud provider](https://docs.trychroma.com/ production/deployment), add the following to your
claude_desktop_config.jsonfile:
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp",
"--client-type",
"http",
"--host",
"your-host",
"--port",
"your-port",
"--custom-auth-credentials",
"your-custom-auth-credentials",
"--ssl",
"true"
]
}This will create an HTTP client that connects to your self-hosted Chroma instance.
Demos
Find reference usages, such as shared knowledge bases & adding memory to context windows in the Chroma MCP Docs
Using Environment Variables
You can also use environment variables to configure the client. The server will automatically load variables from a .env file located at the path specified by --dotenv-path (defaults to .chroma_env in the working directory) or from system environment variables. Command-line arguments take precedence over environment variables.
# Common variables
export CHROMA_CLIENT_TYPE="http" # or "cloud", "persistent", "ephemeral"
# For persistent client
export CHROMA_DATA_DIR="/full/path/to/your/data/directory"
# For cloud client (Chroma Cloud)
export CHROMA_TENANT="your-tenant-id"
export CHROMA_DATABASE="your-database-name"
export CHROMA_API_KEY="your-api-key"
# For HTTP client (self-hosted)
export CHROMA_HOST="your-host"
export CHROMA_PORT="your-port"
export CHROMA_CUSTOM_AUTH_CREDENTIALS="your-custom-auth-credentials"
export CHROMA_SSL="true"
# Optional: Specify path to .env file (defaults to .chroma_env)
export CHROMA_DOTENV_PATH="/path/to/your/.env" Embedding Function Environment Variables
When using external embedding functions that access an API key, follow the naming convention
CHROMA_<>_API_KEY="<key>".
So to set a Cohere API key, set the environment variable CHROMA_COHERE_API_KEY="". We recommend adding this to a .env file somewhere and using the CHROMA_DOTENV_PATH environment variable or --dotenv-path flag to set that location for safekeeping.
Available Tools
13 toolschroma_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
Inputs: collection_name (required), documents (required), ids (required), metadatas.
chroma_create_collectionB
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
Inputs: collection_name (required), embedding_function_name, metadata.
chroma_delete_collectionB
Delete a Chroma collection.
Args:
collection_name: Name of the collection to delete
Inputs: collection_name (required).
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.
Inputs: collection_name (required), ids (required).
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
Inputs: collection_name (required), new_collection_name (required).
chroma_get_collection_countC
Get the number of documents in a Chroma collection.
Args:
collection_name: Name of the collection to count
Inputs: collection_name (required).
chroma_get_collection_infoC
Get information about a Chroma collection.
Args:
collection_name: Name of the collection to get info about
Inputs: collection_name (required).
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
Inputs: collection_name (required), ids, include, limit, +3 more.
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
Inputs: limit, offset.
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
Inputs: collection_name (required), new_metadata, new_name.
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
Inputs: collection_name (required), limit.
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.
Inputs: collection_name (required), query_texts (required), include, n_results, +2 more.
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.
Inputs: collection_name (required), ids (required), documents, embeddings, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool has a clearly distinct purpose targeting specific Chroma operations. For example, chroma_get_documents retrieves documents with filtering, while chroma_query_documents performs semantic search; chroma_peek_collection provides a quick preview, and chroma_get_collection_info returns metadata. No tools appear to overlap in functionality.
All tools follow a consistent 'chroma_verb_noun' pattern with snake_case throughout. The naming convention is perfectly uniform, making it easy to predict tool names and understand their functions at a glance.
With 13 tools, this server provides comprehensive coverage for Chroma vector database operations without being overwhelming. The count aligns well with the domain scope, offering complete collection management and document CRUD operations.
The toolset provides complete coverage for Chroma operations: collection lifecycle (create, list, get info, modify, fork, delete), document lifecycle (add, get, update, delete, query), and utility functions (count, peek). No obvious gaps exist for typical vector database workflows.
Maintenance
Related MCP Connectors
The Needle MCP server enables semantic search on documents stored in files like PDFs, DOCX, and XLSX by connecting AI applications to external data sources. It provides capabilities to create and manage document collections, perform natural language searches on stored content, and retrieve relevant information without requiring exact keyword matches.
Ingest, manage, and retrieve documents for RAG-powered AI applications
The CustomGPT.ai MCP server is a fully managed, RAG-powered endpoint that connects large language models with private knowledge bases and external data sources. It provides tools for retrieval-augmented generation queries (send_message), data ingestion (upload_file), and source listing, enabling AI agents to query private documents like PDFs with high accuracy and real-time citations.
Store, query, and update structured data from any AI agent
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server providing vector database capabilities through Chroma, enabling semantic document search, metadata filtering, and document management with persistent storage.641MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables intelligent document search and retrieval from PDF collections, providing semantic search capabilities powered by OpenAI embeddings and ChromaDB vector storage.13MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that exposes ChromaDB vector database operations, enabling AI assistants to perform collection management and semantic document searches. It supports HTTP, persistent, and in-memory connection modes along with various embedding providers including OpenAI and HuggingFace.MIT
- FlicenseNot gradedqualityDmaintenanceA fully offline local RAG server that utilizes ChromaDB and Ollama to index and query PDF, text, and Markdown documents. It allows users to manage local knowledge bases and perform semantic searches with AI-generated responses.-