Sponsored by Deepsite.site

🧠 mcp.chroma

创建者
volteditora year ago
a mcp server for interacting with ChromaDB
内容

🧠 mcp.chroma

A ChromaDB MCP server for vector embeddings, collections, and document management.

Rust MCP ChromaDB

📋 Overview

This MCP server provides a interface for working with ChromaDB, a vector database for embeddings. It enables operations on collections and documents through a set of tools accessible via the MCP (Model-Controller-Protocol) interface.

✨ Features

  • 📊 Collection management (create, list, modify, delete)
  • 📄 Document operations (add, query, get, update, delete)
  • 🧠 Thought processing for session management
  • 🔌 Multiple client types (HTTP, Cloud, Persistent, Ephemeral)

🚀 Installation

Clone the repository and build with Cargo:

git clone https://github.com/yourusername/mcp-chroma.git
cd mcp-chroma
cargo build --release

🛠️ Usage

Setting Up Environment

Create a .chroma_env file in your project directory with the configuration parameters:

CHROMA_CLIENT_TYPE=ephemeral
CHROMA_HOST=localhost
CHROMA_PORT=8000

Running the Server

# Run with default configuration
./mcp-chroma

# Run with specific client type
./mcp-chroma --client-type http --host localhost --port 8000

# Run with persistent storage
./mcp-chroma --client-type persistent --data-dir ./chroma_data

Available Client Types

  1. Ephemeral: In-memory client (default)
  2. Persistent: Local storage client with persistence
  3. HTTP: Remote client via HTTP
  4. Cloud: Managed cloud client

⚙️ Configuration Options

OptionEnvironment VariableDescriptionDefault
--client-typeCHROMA_CLIENT_TYPEType of client (ephemeral, persistent, http, cloud)ephemeral
--data-dirCHROMA_DATA_DIRDirectory for persistent storageNone
--hostCHROMA_HOSTHost for HTTP clientNone
--portCHROMA_PORTPort for HTTP clientNone
--sslCHROMA_SSLUse SSL for HTTP clienttrue
--tenantCHROMA_TENANTTenant for cloud clientNone
--databaseCHROMA_DATABASEDatabase for cloud clientNone
--api-keyCHROMA_API_KEYAPI key for cloud clientNone
--dotenv-pathCHROMA_DOTENV_PATHPath to .env file.chroma_env

🧰 Tools

Collection Tools

  • chroma_list_collections: List all collections
  • chroma_create_collection: Create a new collection
  • chroma_peek_collection: Preview documents in a collection
  • chroma_get_collection_info: Get metadata about a collection
  • chroma_get_collection_count: Count documents in a collection
  • chroma_modify_collection: Update collection properties
  • chroma_delete_collection: Delete a collection

Document Tools

  • chroma_add_documents: Add documents to a collection
  • chroma_query_documents: Search for similar documents
  • chroma_get_documents: Retrieve documents from a collection
  • chroma_update_documents: Update existing documents
  • chroma_delete_documents: Delete documents from a collection

Thought Processing

  • process_thought: Process thoughts in an ongoing session

📝 Examples

Creating a Collection

{
  "collection_name": "my_documents",
  "metadata": {
    "description": "A collection of example documents"
  }
}

Querying Documents

{
  "collection_name": "my_documents",
  "query_texts": ["What are the benefits of vector databases?"],
  "n_results": 3
}

🔧 Integration with Claude

You can use MCP-Chroma with Claude by setting up a configuration like:

{
  "mcpServers": {
    "chroma": {
      "command": "mcp-chroma",
      "args": [
        "--client-type",
        "http",
        "--host",
        "localhost",
        "--port",
        "8000"
      ],
      "env": {
        "CHROMA_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

🖥️ Integration with Cursor

To use MCP-Chroma with Cursor, add the following to your .vscode/mcp.json file:

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "chroma_api_key",
        "description": "ChromaDB API Key",
        "password": true
      }
    ],
    "servers": {
      "chroma": {
        "command": "mcp-chroma",
        "args": [
          "--client-type",
          "http",
          "--host",
          "localhost",
          "--port",
          "8000"
        ],
        "env": {
          "CHROMA_API_KEY": "${input:chroma_api_key}"
        }
      }
    }
  }
}

📄 License

MIT License

推荐的 MCP Server
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
CursorThe AI Code Editor
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Tavily Mcp
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Serper MCP ServerA Serper MCP Server
Amap Maps高德地图官方 MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
ChatWiseThe second fastest AI chatbot™
DeepChatYour AI Partner on Desktop
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"