docs/mintlify/integrations/frameworks/anthropic-mcp.mdx
The Model Context Protocol (MCP) is an open protocol that standardizes how AI applications communicate with data sources and tools. Think of MCP like a USB-C port for AI applications - it provides a universal way to connect AI models like Claude to different services and data sources.
MCP follows a client-server architecture:
The Chroma MCP server allows Claude to directly interact with Chroma's search capabilities through this standardized protocol. This enables powerful features like:
Before setting up the Chroma MCP server, ensure you have:
uvx installed (curl -LsSf https://astral.sh/uv/install.sh | sh)Add the following configuration:
{
"mcpServers": {
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp",
"--client-type",
"persistent",
"--data-dir",
"/path/to/your/data/directory"
]
}
}
}
Replace /path/to/your/data/directory with where you want Chroma to store its data, for example:
/Users/username/Documents/chroma-dataC:\\Users\\username\\Documents\\chroma-dataIf you don't see the tools, check the logs at:
~/Library/Logs/Claude/mcp*.log%APPDATA%\Claude\logs\mcp*.logThe Chroma MCP server supports multiple client types to suit different needs:
By default, the server will use the ephemeral client.
{
"mcpServers": {
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp",
]
}
}
}
{
"mcpServers": {
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp",
"--client-type",
"persistent",
"--data-dir",
"/path/to/your/data/directory"
]
}
}
}
{
"mcpServers": {
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp",
"--client-type",
"http",
"--host",
"http://localhost:8000",
"--port",
"8000",
"--custom-auth-credentials",
"username:password",
"--ssl",
"true"
]
}
}
}
{
"mcpServers": {
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp",
"--client-type",
"cloud",
"--tenant",
"your-tenant-id",
"--database",
"your-database-name",
"--api-key",
"your-api-key"
]
}
}
}
Let's say your team maintains a knowledge base of customer support interactions. By storing these in Chroma Cloud, team members can use Claude to quickly access and learn from past support cases.
First, set up your shared knowledge base:
import chromadb
from datetime import datetime
# Connect to Chroma Cloud
client = chromadb.HttpClient(
ssl=True,
host='api.trychroma.com',
tenant='your-tenant-id',
database='support-kb',
headers={
'x-chroma-token': 'YOUR_API_KEY'
}
)
# Create a collection for support cases
collection = client.create_collection("support_cases")
# Add some example support cases
support_cases = [
{
"case": "Customer reported issues connecting their IoT devices to the dashboard.",
"resolution": "Guided customer through firewall configuration and port forwarding setup.",
"category": "connectivity",
"date": "2024-03-15"
},
{
"case": "User couldn't access admin features after recent update.",
"resolution": "Discovered role permissions weren't migrated correctly. Applied fix and documented process.",
"category": "permissions",
"date": "2024-03-16"
}
]
# Add documents to collection
collection.add(
documents=[case["case"] + "\n" + case["resolution"] for case in support_cases],
metadatas=[{
"category": case["category"],
"date": case["date"]
} for case in support_cases],
ids=[f"case_{i}" for i in range(len(support_cases))]
)
Now team members can use Claude to access this knowledge.
In your claude config, add the following:
{
"mcpServers": {
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp",
"--client-type",
"cloud",
"--tenant",
"your-tenant-id",
"--database",
"support-kb",
"--api-key",
"YOUR_API_KEY"
]
}
}
}
Now you can use the knowledge base in your chats:
Claude, I'm having trouble helping a customer with IoT device connectivity.
Can you check our support knowledge base for similar cases and suggest a solution?
Claude will:
This setup is particularly powerful because:
Claude's context window has limits - long conversations eventually get truncated, and chats don't persist between sessions. Using Chroma as an external memory store solves these limitations, allowing Claude to reference past conversations and maintain context across multiple sessions.
First, tell Claude to use Chroma for memory as part of the project setup:
Remember, you have access to Chroma tools.
At any point if the user references previous chats or memory, check chroma for similar conversations.
Try to use retrieved information where possible.
This prompt instructs Claude to:
To store the current conversation:
Please chunk our conversation into small chunks and store it in Chroma for future reference.
Claude will:
Later, you can access past conversations naturally:
What did we discuss previously about the authentication system?
Claude will:
This setup is particularly useful for:
The Chroma MCP server supports:
If you encounter issues:
uvx with which uvx and using that path in the config