Skip to main content

Chroma MCP Server - Vector Database Integration for LLM Applications

Project description

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

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:
"chroma": {
    "command": "uvx",
    "args": [
        "chroma-mcp"
    ]
}
  1. To add a persistent client, add the following to your claude_desktop_config.json file:
"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.

  1. To connect to Chroma Cloud, add the following to your claude_desktop_config.json file:
"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.

  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:
"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:

# 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"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chroma_mcp-0.1.13.tar.gz (93.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chroma_mcp-0.1.13-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file chroma_mcp-0.1.13.tar.gz.

File metadata

  • Download URL: chroma_mcp-0.1.13.tar.gz
  • Upload date:
  • Size: 93.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for chroma_mcp-0.1.13.tar.gz
Algorithm Hash digest
SHA256 0a721de67d326d9e1ee6b299881604f50b5353bfd895b9199f29bf363f0e4788
MD5 066f9cd3ca89b1c572250a5b328f17cd
BLAKE2b-256 de93f2ce3b34bee36320ffead2a945b38fd46a07545d87f52459eb78e734ab22

See more details on using hashes here.

File details

Details for the file chroma_mcp-0.1.13-py3-none-any.whl.

File metadata

File hashes

Hashes for chroma_mcp-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 c3d715900f917ebf011c6891025e6035a028444eeaa3c0b0276fa53efe76f2ba
MD5 c2ca1dbe1e4ecb0eced603403bed840d
BLAKE2b-256 949de9b1ac813f1dec0efc00802c92ad9f5752f29653dbd97c724743fae67e81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page