Chroma MCP Server

Chroma MCP Server

A Model Context Protocol server providing vector database capabilities through Chroma, enabling semantic document search, metadata filtering, and document management with persistent storage.

privetin

Knowledge & Memory
Databases
Local
Python
Visit Server

README

Chroma MCP Server

A Model Context Protocol (MCP) server implementation that provides vector database capabilities through Chroma. This server enables semantic document search, metadata filtering, and document management with persistent storage.

Requirements

  • Python 3.8+
  • Chroma 0.4.0+
  • MCP SDK 0.1.0+

Components

Resources

The server provides document storage and retrieval through Chroma's vector database:

  • Stores documents with content and metadata
  • Persists data in src/chroma/data directory
  • Supports semantic similarity search

Tools

The server implements CRUD operations and search functionality:

Document Management

  • create_document: Create a new document

    • Required: document_id, content
    • Optional: metadata (key-value pairs)
    • Returns: Success confirmation
    • Error: Already exists, Invalid input
  • read_document: Retrieve a document by ID

    • Required: document_id
    • Returns: Document content and metadata
    • Error: Not found
  • update_document: Update an existing document

    • Required: document_id, content
    • Optional: metadata
    • Returns: Success confirmation
    • Error: Not found, Invalid input
  • delete_document: Remove a document

    • Required: document_id
    • Returns: Success confirmation
    • Error: Not found
  • list_documents: List all documents

    • Optional: limit, offset
    • Returns: List of documents with content and metadata

Search Operations

  • search_similar: Find semantically similar documents
    • Required: query
    • Optional: num_results, metadata_filter, content_filter
    • Returns: Ranked list of similar documents with distance scores
    • Error: Invalid filter

Features

  • Semantic Search: Find documents based on meaning using Chroma's embeddings
  • Metadata Filtering: Filter search results by metadata fields
  • Content Filtering: Additional filtering based on document content
  • Persistent Storage: Data persists in local directory between server restarts
  • Error Handling: Comprehensive error handling with clear messages
  • Retry Logic: Automatic retries for transient failures

Installation

  1. Install dependencies:
uv venv
uv sync --dev --all-extras

Configuration

Claude Desktop

Add the server configuration to your Claude Desktop config:

Windows: C:\Users\<username>\AppData\Roaming\Claude\claude_desktop_config.json

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "chroma": {
      "command": "uv",
      "args": [
        "--directory",
        "C:/MCP/server/community/chroma",
        "run",
        "chroma"
      ]
    }
  }
}

Data Storage

The server stores data in:

  • Windows: src/chroma/data
  • MacOS/Linux: src/chroma/data

Usage

  1. Start the server:
uv run chroma
  1. Use MCP tools to interact with the server:
# Create a document
create_document({
    "document_id": "ml_paper1",
    "content": "Convolutional neural networks improve image recognition accuracy.",
    "metadata": {
        "year": 2020,
        "field": "computer vision",
        "complexity": "advanced"
    }
})

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

Error Handling

The server provides clear error messages for common scenarios:

  • Document already exists [id=X]
  • Document not found [id=X]
  • Invalid input: Missing document_id or content
  • Invalid filter
  • Operation failed: [details]

Development

Testing

  1. Run the MCP Inspector for interactive testing:
npx @modelcontextprotocol/inspector uv --directory C:/MCP/server/community/chroma run chroma
  1. Use the inspector's web interface to:
    • Test CRUD operations
    • Verify search functionality
    • Check error handling
    • Monitor server logs

Building

  1. Update dependencies:
uv compile pyproject.toml
  1. Build package:
uv build

Contributing

Contributions are welcome! Please read our Contributing Guidelines for details on:

  • Code style
  • Testing requirements
  • Pull request process

License

This project is licensed under the MIT License - see the LICENSE file for details.

Recommended Servers

Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Excel MCP Server

Excel MCP Server

A Model Context Protocol server that enables AI assistants to read from and write to Microsoft Excel files, supporting formats like xlsx, xlsm, xltx, and xltm.

Featured
Local
Go
Playwright MCP Server

Playwright MCP Server

Provides a server utilizing Model Context Protocol to enable human-like browser automation with Playwright, allowing control over browser actions such as navigation, element interaction, and scrolling.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
Apple MCP Server

Apple MCP Server

Enables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.

Featured
Local
TypeScript
DuckDuckGo MCP Server

DuckDuckGo MCP Server

A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.

Featured
Python
Supabase MCP Server

Supabase MCP Server

A Model Context Protocol (MCP) server that provides programmatic access to the Supabase Management API. This server allows AI models and other clients to manage Supabase projects and organizations through a standardized interface.

Featured
JavaScript
YouTube Transcript MCP Server

YouTube Transcript MCP Server

This server retrieves transcripts for given YouTube video URLs, enabling integration with Goose CLI or Goose Desktop for transcript extraction and processing.

Featured
Python
MCP DuckDB Knowledge Graph Memory Server

MCP DuckDB Knowledge Graph Memory Server

A memory server for Claude that stores and retrieves knowledge graph data in DuckDB, enhancing performance and query capabilities for conversations with persistent user information.

Featured
TypeScript