ChromaDB MCP Server

Databasestdiov0.6.2
代码仓库

Connects AI agents to ChromaDB vector databases for semantic search and retrieval augmented generation (RAG) workflows. Supports creating collections, upserting documents with embeddings, querying by semantic similarity, and managing metadata filters. Ideal for knowledge base and document retrieval applications.

连接

将此配置添加到 .claude/mcp.json

{
  "mcpServers": {
    "chromadb": {
      "command": "uvx",
      "args": [
        "chroma-mcp-server@latest"
      ],
      "env": {
        "CHROMA_HOST": "<YOUR_CHROMA_HOST>",
        "CHROMA_PORT": "<YOUR_CHROMA_PORT>",
        "CHROMA_AUTH_TOKEN": "<YOUR_CHROMA_AUTH_TOKEN>"
      }
    }
  }
}

工具 (4)

create_collection

Create a new ChromaDB collection with optional embedding function configuration.

{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Collection name"
    },
    "metadata": {
      "type": "object",
      "description": "Optional collection metadata"
    },
    "embedding_function": {
      "type": "string",
      "description": "Embedding function to use (openai, cohere, sentence-transformers)"
    }
  }
}

upsert_documents

Add or update documents in a collection with automatic embedding generation.

{
  "type": "object",
  "required": [
    "collection",
    "documents",
    "ids"
  ],
  "properties": {
    "ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Unique IDs for each document"
    },
    "documents": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Text documents to embed and store"
    },
    "metadatas": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Metadata for each document"
    },
    "collection": {
      "type": "string",
      "description": "Collection name"
    }
  }
}

query

Query a collection by semantic similarity and return the most relevant documents.

{
  "type": "object",
  "required": [
    "collection",
    "query_text"
  ],
  "properties": {
    "where": {
      "type": "object",
      "description": "Metadata filter conditions"
    },
    "n_results": {
      "type": "integer",
      "description": "Number of results to return"
    },
    "collection": {
      "type": "string",
      "description": "Collection name"
    },
    "query_text": {
      "type": "string",
      "description": "Text to search for"
    }
  }
}

list_collections

List all collections in the ChromaDB instance with their metadata and document counts.

{
  "type": "object",
  "properties": {}
}

资源

此服务器未提供任何资源。

提示词

此服务器未提供任何提示词。

服务器信息

作者
Chroma (@chroma-core)
代码仓库
https://github.com/chroma-core/chroma-mcp-server
许可证
Apache-2.0
版本
0.6.2
星标
2,150
最后更新
2026年5月18日