Chroma MCP Server
Chroma MCP サーバー
Chroma を介してベクターデータベース機能を提供するモデルコンテキストプロトコル(MCP)サーバー実装。このサーバーは、セマンティックドキュメント検索、メタデータフィルタリング、そして永続ストレージによるドキュメント管理を可能にします。
要件
Python 3.8以上
Chroma 0.4.0以降
MCP SDK 0.1.0+
Related MCP server: Chroma MCP Server
コンポーネント
リソース
サーバーは、Chroma のベクター データベースを通じてドキュメントの保存と取得を提供します。
コンテンツとメタデータを含むドキュメントを保存します
src/chroma/dataディレクトリにデータを保存します意味的類似性検索をサポート
ツール
サーバーは CRUD 操作と検索機能を実装します。
ドキュメント管理
create_document: 新しいドキュメントを作成する必須:
document_id、contentオプション:
metadata(キーと値のペア)戻り値: 成功確認
エラー: すでに存在します。入力が無効です
read_document: IDでドキュメントを取得する必須:
document_id戻り値: ドキュメントのコンテンツとメタデータ
エラー: 見つかりません
update_document: 既存のドキュメントを更新する必須:
document_id、contentオプション:
metadata戻り値: 成功確認
エラー: 見つかりません、入力が無効です
delete_document: ドキュメントを削除する必須:
document_id戻り値: 成功確認
エラー: 見つかりません
list_documents: すべてのドキュメントを一覧表示するオプション:
limit、offset戻り値: コンテンツとメタデータを含むドキュメントのリスト
捜索活動
search_similar: 意味的に類似した文書を検索する必須:
queryオプション:
num_results、metadata_filter、content_filter返されるもの: 距離スコアによる類似文書のランク付けされたリスト
エラー: 無効なフィルター
特徴
セマンティック検索: Chroma の埋め込みを使用して意味に基づいてドキュメントを検索します
メタデータフィルタリング: メタデータフィールドで検索結果をフィルタリングする
コンテンツフィルタリング: ドキュメントコンテンツに基づく追加のフィルタリング
永続ストレージ: データはサーバーの再起動後もローカルディレクトリに保持されます
エラー処理: 明確なメッセージによる包括的なエラー処理
再試行ロジック: 一時的な障害に対する自動再試行
インストール
依存関係をインストールします:
uv venv
uv sync --dev --all-extras構成
クロードデスクトップ
Claude Desktop 構成にサーバー構成を追加します。
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"
]
}
}
}データストレージ
サーバーは次の場所にデータを保存します。
Windows:
src/chroma/dataMacOS/Linux:
src/chroma/data
使用法
サーバーを起動します。
uv run chromaMCP ツールを使用してサーバーと対話します。
# 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"
}
})エラー処理
サーバーは、一般的なシナリオに対して明確なエラー メッセージを提供します。
Document already exists [id=X]Document not found [id=X]Invalid input: Missing document_id or contentInvalid filterOperation failed: [details]
発達
テスト
対話型テストのために MCP Inspector を実行します。
npx @modelcontextprotocol/inspector uv --directory C:/MCP/server/community/chroma run chromaインスペクターの Web インターフェースを使用して次の操作を行います。
CRUD操作をテストする
検索機能を確認する
エラー処理を確認する
サーバーログを監視する
建物
依存関係を更新します:
uv compile pyproject.tomlビルドパッケージ:
uv build貢献
貢献を歓迎します!詳細については、貢献ガイドラインをご覧ください。
コードスタイル
テスト要件
プルリクエストプロセス
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
Available Tools
6 toolscreate_documentC
Create a new document in the Chroma vector database
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| metadata | No | ||
| document_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Create' implies a write operation, it doesn't disclose important behavioral traits like required permissions, whether the operation is idempotent, error handling for duplicate document_ids, or what happens if metadata is omitted. This leaves significant gaps for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a basic create operation and front-loads the essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain the return value, error conditions, or provide enough context about the parameters and their relationships to enable reliable tool invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage for all 3 parameters, the description provides no information about parameter meanings, formats, or constraints. It doesn't explain what 'document_id' should be, what 'content' represents, or how 'metadata' should be structured, failing to compensate for the schema's lack of documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Create a new document') and target resource ('in the Chroma vector database'), providing specific verb+resource information. However, it doesn't distinguish this tool from its sibling 'update_document' in terms of when to use create versus update operations, which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'update_document' or 'list_documents', nor does it mention prerequisites or constraints. It simply states what the tool does without contextual usage information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_documentB
Delete a document from the Chroma vector database by its ID
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool deletes a document, implying a destructive mutation, but fails to disclose critical traits like whether deletion is permanent, requires specific permissions, has side effects on related data, or includes confirmation prompts. This leaves significant gaps for a destructive operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste, front-loading the key action and resource. Every word earns its place, making it appropriately sized and easy to parse without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity as a destructive mutation with no annotations, no output schema, and low schema coverage, the description is incomplete. It lacks details on behavioral traits, error handling, return values, or usage context, making it inadequate for safe and effective tool invocation by an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds minimal meaning beyond the input schema, which has 0% description coverage. It mentions the parameter 'document_id' but does not explain its format, source, or constraints. Since schema coverage is low, the description should compensate more, but it only reiterates the parameter name without additional context, resulting in a baseline score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Delete') and target resource ('a document from the Chroma vector database by its ID'), distinguishing it from sibling tools like create_document, list_documents, read_document, search_similar, and update_document. It precisely communicates what the tool does without being vague or tautological.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, such as update_document for modifications or list_documents for verification before deletion. It lacks explicit context, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_documentsB
List all documents stored in the Chroma vector database with pagination
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'pagination' which is useful context, but fails to describe critical behaviors: whether this is a read-only operation (implied but not stated), what the return format looks like (e.g., list of document objects), or any limitations (e.g., performance with large datasets). For a tool with zero annotation coverage, this leaves significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose ('List all documents') and adds essential context ('stored in the Chroma vector database with pagination'). Every word earns its place with zero redundancy or wasted verbiage.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (list operation with pagination), no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose and pagination behavior but lacks details on return values, error conditions, or interaction with sibling tools. For a read operation in a database context, this leaves the agent with incomplete information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaningful context beyond the input schema. While the schema documents 'limit' and 'offset' parameters with technical details (type, defaults, constraints), the description explains their purpose ('pagination'), which the schema doesn't cover (0% description coverage). This compensates well for the schema's lack of semantic information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('List') and resource ('documents stored in the Chroma vector database'), making the purpose unambiguous. It distinguishes from siblings like 'read_document' (single document) and 'search_similar' (semantic search), but doesn't explicitly contrast with 'create_document' or 'update_document' which are write operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving all documents with pagination, but provides no explicit guidance on when to use this tool versus alternatives like 'search_similar' for filtered results or 'read_document' for a specific document. The mention of 'pagination' suggests it's for bulk retrieval, but this is only implied rather than stated as a guideline.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_documentC
Retrieve a document from the Chroma vector database by its ID
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the tool retrieves a document, implying a read operation, but doesn't disclose behavioral traits such as error handling (e.g., what happens if the ID doesn't exist), performance characteristics, or any rate limits. The description is minimal and lacks context beyond the basic action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the key action and resource. There is no wasted language, and it directly communicates the tool's purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't explain what is returned (e.g., document content, metadata), error cases, or how it fits into the broader context of sibling tools. For a retrieval tool in a database system, more detail is needed for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, but the description adds meaning by specifying that the parameter 'document_id' is used to retrieve a document. However, it doesn't provide details on the ID format, constraints, or examples. With only one parameter, the baseline is 4, but the lack of additional semantic context reduces it to 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Retrieve') and resource ('a document from the Chroma vector database'), specifying it's done by ID. It distinguishes from siblings like create_document (creation) and delete_document (deletion), but doesn't explicitly differentiate from list_documents or search_similar in terms of retrieval method.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like list_documents (for browsing) or search_similar (for similarity-based retrieval). The description implies usage when you have a specific document ID, but lacks explicit context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_similarC
Search for semantically similar documents in the Chroma vector database
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| num_results | No | ||
| content_filter | No | ||
| metadata_filter | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'semantically similar documents' and the database type, but fails to describe critical behaviors such as how similarity is measured, whether results are ranked, what happens with no matches, or any rate limits or permissions required. This leaves significant gaps for a search operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that gets straight to the point without unnecessary words. It's appropriately sized for a basic tool description, though it could benefit from additional context to improve completeness without sacrificing brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a similarity search tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is inadequate. It lacks details on parameter usage, behavioral traits, return values, and differentiation from siblings, making it insufficient for an agent to use the tool effectively without additional context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for undocumented parameters. It adds no information about the four parameters (query, content_filter, metadata_filter, num_results), their meanings, formats, or usage. The mention of 'semantically similar' hints at the query parameter's purpose but doesn't clarify semantics, leaving parameters largely unexplained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Search for') and target resource ('semantically similar documents in the Chroma vector database'), making the purpose immediately understandable. It distinguishes from siblings like 'list_documents' by specifying semantic similarity search rather than simple listing, though it doesn't explicitly contrast with all siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'list_documents' or 'read_document'. The description implies usage for similarity searches but doesn't specify scenarios, prerequisites, or exclusions, leaving the agent to infer context from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_documentC
Update an existing document in the Chroma vector database
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| metadata | No | ||
| document_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool updates a document, implying mutation, but fails to describe critical behaviors such as permission requirements, whether updates are idempotent or reversible, error handling, or what happens to unspecified metadata fields. This leaves significant gaps for an agent to understand the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a mutation tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on parameters, behavioral traits, return values, and usage context, making it inadequate for an agent to reliably invoke the tool without additional assumptions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the schema provides no parameter details. The description mentions 'update an existing document' but adds no meaning beyond the tool name—it doesn't explain what 'content', 'document_id', or 'metadata' represent, their formats, or how they interact. This fails to compensate for the lack of schema documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Update') and resource ('an existing document in the Chroma vector database'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'create_document' or 'read_document' beyond the implied distinction of updating versus creating or reading.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'create_document' or 'delete_document'. It lacks context about prerequisites (e.g., document must exist), exclusions, or specific scenarios where updating is appropriate over other operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v1.0.0- First observed
create_document - First observed
delete_document - First observed
list_documents - First observed
read_document - First observed
search_similar - First observed
update_document
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose with no overlap: create, delete, list, read, search, and update documents. The actions and targets are well-defined, making it easy for an agent to select the correct tool without confusion.
All tools follow a consistent verb_noun pattern (e.g., create_document, delete_document) using snake_case throughout. The naming is predictable and readable, with no deviations in style or convention.
With 6 tools, this server is well-scoped for managing documents in a vector database. Each tool earns its place by covering essential CRUD operations and semantic search, avoiding bloat or thinness for the domain.
The toolset provides complete CRUD/lifecycle coverage for documents (create, read, update, delete, list) and includes a semantic search function. There are no obvious gaps, enabling agents to handle all core workflows without dead ends.
Maintenance
Related MCP Connectors
Remote ChromaDB vector database MCP server with streamable HTTP transport
The Needle MCP server enables semantic search on documents stored in files like PDFs, DOCX, and XLSX by connecting AI applications to external data sources. It provides capabilities to create and manage document collections, perform natural language searches on stored content, and retrieve relevant information without requiring exact keyword matches.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables semantic search capabilities by providing tools to manage Qdrant vector database collections, process and embed documents using various embedding services, and perform semantic searches across vector embeddings.485 npm4MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server integration that creates a persistent, searchable working memory for AI-assisted development by enabling automated context recall and knowledge persistence in Chroma, the open-source embedding database.121 PyPI25MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables intelligent document search and retrieval from PDF collections, providing semantic search capabilities powered by OpenAI embeddings and ChromaDB vector storage.13MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that gives LLMs persistent, semantic memory using vector search with ChromaDB.MIT