Skip to main content

Chroma MCP Server - Vector Database Integration for LLM Applications

Project description

Chroma MCP Server

CI codecov PyPI - Version

A Model Context Protocol (MCP) server integration for Chroma, the open-source embedding database.

Motivation: AI Development Working Memory

In AI-assisted development workflows, particularly when using tools like Cursor or GitHub Copilot over multiple sessions, maintaining context from previous interactions is crucial but often manual. Developers frequently resort to creating temporary markdown files or other artifacts simply to capture and reload context into a new chat session.

The Chroma MCP Server aims to streamline this process by providing a persistent, searchable "working memory":

  • Automated Context Recall: Instead of manual context loading, AI assistants (guided by specific rules or instructions) can query this MCP server to retrieve relevant information from past sessions based on the current development task.
  • Developer-Managed Persistence: Developers can actively summarize key decisions, code snippets, or insights from the current session and store them in ChromaDB via the MCP interface. This allows building a rich, task-relevant knowledge base over time.
  • Separation of Concerns: This "working memory" is distinct from final user-facing documentation or committed code artifacts, focusing specifically on capturing the transient but valuable context of the development process itself.

By integrating ChromaDB through MCP, this server facilitates more seamless and context-aware AI-assisted development, reducing manual overhead and improving the continuity of complex tasks across multiple sessions.

Overview

The Chroma MCP Server allows you to connect AI applications with Chroma through the Model Context Protocol. This enables AI models to:

  • Store and retrieve embeddings
  • Perform semantic search on vector data
  • Manage collections of embeddings
  • Support RAG (Retrieval Augmented Generation) workflows

See the API Reference for a detailed list of available tools and their parameters.

Installation

Choose your preferred installation method:

Standard Installation

# Using pip
pip install chroma-mcp-server

# Using UVX (recommended for Cursor)
uv pip install chroma-mcp-server

Full Installation (with embedding models)

# Using pip
pip install chroma-mcp-server[full]

# Using UVX
uv pip install "chroma-mcp-server[full]"

Usage

Starting the server

# Using the command-line executable
chroma-mcp-server

# Or using the Python module
python -m chroma_mcp.server

Checking the Version

chroma-mcp-server --version

Configuration

The server can be configured with command-line options or environment variables:

Command-line Options

chroma-mcp-server --client-type persistent --data-dir ./my_data --log-dir ./logs

Environment Variables

export CHROMA_CLIENT_TYPE=persistent
export CHROMA_DATA_DIR=./my_data
export CHROMA_LOG_DIR=./logs
chroma-mcp-server

Available Configuration Options

  • --client-type: Type of Chroma client (ephemeral, persistent, http, cloud)
  • --data-dir: Path to data directory for persistent client
  • --log-dir: Path to log directory
  • --host: Host address for HTTP client
  • --port: Port for HTTP client
  • --ssl: Whether to use SSL for HTTP client
  • --tenant: Tenant ID for Cloud client
  • --database: Database name for Cloud client
  • --api-key: API key for Cloud client
  • --cpu-execution-provider: Force CPU execution provider for embedding functions (auto, true, false)

See Getting Started for more setup details.

Cursor Integration

To use with Cursor, add the following to your .cursor/mcp.json:

{
  "mcpServers": {
    "chroma": {
      "command": "uvx",
      "args": [
        "chroma-mcp-server"
      ],
      "env": {
        "CHROMA_CLIENT_TYPE": "persistent",
        "CHROMA_DATA_DIR": "/path/to/data/dir",
        "CHROMA_LOG_DIR": "/path/to/logs/dir",
        "LOG_LEVEL": "INFO",
        "MCP_LOG_LEVEL": "INFO"
      }
    }
  }
}

See Cursor Integration for more details.

Development

For instructions on how to set up the development environment, run tests, build the package, and contribute, please see the Developer Guide.

Testing the Tools

A simulated workflow using the MCP tools is available in the MCP Test Flow document.

License

MIT License (see LICENSE)

Project details


Release history Release notifications | RSS feed

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_server-0.1.46.tar.gz (58.7 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_server-0.1.46-py3-none-any.whl (40.0 kB view details)

Uploaded Python 3

File details

Details for the file chroma_mcp_server-0.1.46.tar.gz.

File metadata

  • Download URL: chroma_mcp_server-0.1.46.tar.gz
  • Upload date:
  • Size: 58.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for chroma_mcp_server-0.1.46.tar.gz
Algorithm Hash digest
SHA256 f1631a16bd8390b78384bc34711d533b69e086de42a6c264d69cb6b646203b84
MD5 7a457c596e22fc72f5de5627e8153ea0
BLAKE2b-256 488dd35ba8d05748497997451cf8d3480943b61db18f5295bd4132b0e10bc45d

See more details on using hashes here.

File details

Details for the file chroma_mcp_server-0.1.46-py3-none-any.whl.

File metadata

File hashes

Hashes for chroma_mcp_server-0.1.46-py3-none-any.whl
Algorithm Hash digest
SHA256 ffaa1a2215505b4e388f8d5d00efc1ef0fb1a8e283b0300601a79aba44e3060c
MD5 a69c29b45bdfe19418051ffc28c7f8c5
BLAKE2b-256 72314efd791e282c53069cccf323b5d2fd88f9013d17256175009be0a1f1ad40

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