Back to MCP Catalog

Chroma Vector Database MCP Server

DatabasesPython
Vector database for semantic document search and management
Available Tools

create_document

Create a new document with content and optional metadata

document_idcontentmetadata

read_document

Retrieve a document by ID

document_id

update_document

Update an existing document's content and/or metadata

document_idcontentmetadata

delete_document

Remove a document from the database

document_id

list_documents

List all documents with optional pagination

limitoffset

search_similar

Find semantically similar documents based on a query

querynum_resultsmetadata_filtercontent_filter

Chroma Vector Database provides powerful vector database capabilities through a Model Context Protocol server. It enables semantic document search, metadata filtering, and comprehensive document management with persistent storage. With this MCP, you can store, retrieve, and search documents based on semantic similarity rather than just keyword matching. The server maintains document content and metadata in a persistent database, allowing for complex queries across your document collection.

Overview

Chroma Vector Database is a Model Context Protocol (MCP) server that provides vector database capabilities for semantic document search and management. It allows you to store documents with content and metadata, and then search them based on semantic similarity rather than just keyword matching.

Requirements

  • Python 3.8 or higher
  • Chroma 0.4.0 or higher
  • MCP SDK 0.1.0 or higher

Installation

  1. Install the required dependencies:
uv venv
uv sync --dev --all-extras
  1. Configure your Claude Desktop by adding the server configuration to your config file:

Windows: C:\Users\<username>\AppData\Roaming\Claude\claude_desktop_config.json MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Add the following configuration (adjust the path as needed):

{
  "mcpServers": {
    "chroma": {
      "command": "uv",
      "args": [
        "--directory",
        "PATH_TO_YOUR_PROJECT_DIRECTORY",
        "run",
        "chroma"
      ]
    }
  }
}
  1. Start the server:
uv run chroma

Data Storage

The server stores data in the src/chroma/data directory. This ensures that your documents persist between server restarts.

Usage Examples

Creating Documents

You can create documents with content and optional metadata:

create_document({
    "document_id": "ml_paper1",
    "content": "Convolutional neural networks improve image recognition accuracy.",
    "metadata": {
        "year": 2020,
        "field": "computer vision",
        "complexity": "advanced"
    }
})

Searching Documents

Find semantically similar documents:

search_similar({
    "query": "machine learning models",
    "num_results": 2,
    "metadata_filter": {
        "year": 2020,
        "field": "computer vision"
    }
})

Managing Documents

You can retrieve, update, and delete documents using their IDs:

read_document({
    "document_id": "ml_paper1"
})

update_document({
    "document_id": "ml_paper1",
    "content": "Updated content about convolutional neural networks.",
    "metadata": {
        "year": 2021,
        "field": "computer vision",
        "complexity": "intermediate"
    }
})

delete_document({
    "document_id": "ml_paper1"
})

Listing Documents

List all documents with optional pagination:

list_documents({
    "limit": 10,
    "offset": 0
})

Testing

For interactive testing, you can use the MCP Inspector:

npx @modelcontextprotocol/inspector uv --directory PATH_TO_YOUR_PROJECT_DIRECTORY run chroma

This provides a web interface to test operations, verify functionality, and monitor server logs.

Troubleshooting

The server provides clear error messages for common scenarios:

  • Document already exists [id=X]: You're trying to create a document with an ID that already exists
  • Document not found [id=X]: The requested document doesn't exist
  • Invalid input: Missing document_id or content: Required parameters are missing
  • Invalid filter: The metadata or content filter format is incorrect
  • Operation failed: [details]: General operation failure with specific details

Related MCPs

Milvus Vector Database
DatabasesPython

Connect to Milvus vector database for semantic search and vector operations

MotherDuck DuckDB
DatabasesPython

SQL analytics with DuckDB and MotherDuck for AI assistants

Alibaba Cloud Tablestore
DatabasesJava, Python

Connect to Alibaba Cloud Tablestore for vector search and RAG applications

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.