MCP Now
Chroma

Chroma

by chroma-core
GitHub

Embeddings, vector search, document storage, and full-text search with the open-source AI application database

chroma
client
cloud
export
persistent

Chroma logo

Chroma - the open-source embedding database.
The fastest way to build Python or JavaScript LLM apps with memory!

Discord | License | Docs | Homepage

Chroma MCP Server

smithery badge

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.

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
  • 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

  • create_collection
  • peek_collection
  • list_collections
  • get_collection_info
  • get_collection_count
  • modify_collection
  • delete_collection
  • add_documents
  • query_documents
  • get_documents

Usage with Claude Desktop

  1. To add an ephemeral client, add the following to your claude_desktop_config.json file:
1"chroma": { 2 "command": "uvx", 3 "args": [ 4 "chroma-mcp" 5 ] 6}
  1. To add a persistent client, add the following to your claude_desktop_config.json file:
1"chroma": { 2 "command": "uvx", 3 "args": [ 4 "chroma-mcp", 5 "--client-type", 6 "persistent", 7 "--data-dir", 8 "/full/path/to/your/data/directory" 9 ] 10}

This will create a persistent client that will use the data directory specified.

  1. To connect to Chroma Cloud, add the following to your claude_desktop_config.json file:
1"chroma": { 2 "command": "uvx", 3 "args": [ 4 "chroma-mcp", 5 "--client-type", 6 "cloud", 7 "--tenant", 8 "your-tenant-id", 9 "--database", 10 "your-database-name", 11 "--api-key", 12 "your-api-key" 13 ] 14}

This will create a cloud client that automatically connects to api.trychroma.com using SSL.

  1. 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.json file:
1"chroma": { 2 "command": "uvx", 3 "args": [ 4 "chroma-mcp", 5 "--client-type", 6 "http", 7 "--host", 8 "your-host", 9 "--port", 10 "your-port", 11 "--custom-auth-credentials", 12 "your-custom-auth-credentials", 13 "--ssl", 14 "true" 15 ] 16}

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:

1# Common variables 2export CHROMA_CLIENT_TYPE="http" # or "cloud", "persistent", "ephemeral" 3 4# For persistent client 5export CHROMA_DATA_DIR="/full/path/to/your/data/directory" 6 7# For cloud client (Chroma Cloud) 8export CHROMA_TENANT="your-tenant-id" 9export CHROMA_DATABASE="your-database-name" 10export CHROMA_API_KEY="your-api-key" 11 12# For HTTP client (self-hosted) 13export CHROMA_HOST="your-host" 14export CHROMA_PORT="your-port" 15export CHROMA_CUSTOM_AUTH_CREDENTIALS="your-custom-auth-credentials" 16export CHROMA_SSL="true"