Chroma Package Search
Search and explore source code from popular packages directly through MCP
Overview
kit-dev-mcp now integrates with Chroma's Package Search API to provide powerful source code exploration capabilities. Search through the actual source code of popular packages using regex patterns, semantic search, or read specific files directly.
Use regex patterns to find specific code patterns across package source files.
Semantic search with optional regex filtering for intelligent code exploration.
Read specific files or line ranges from package source code.
Configuration
To use Package Search features, you need a Chroma API key. Get one from the Chroma Cloud dashboard.
For Cursor/Windsurf/Claude Code
{
"mcpServers": {
"kit-dev-mcp": {
"command": "uvx",
"args": ["--from", "cased-kit", "kit-dev-mcp"],
"env": {
"CHROMA_PACKAGE_SEARCH_API_KEY": "your_api_key_here"
}
}
}
}For Command Line
export CHROMA_PACKAGE_SEARCH_API_KEY="your_api_key_here" # or export CHROMA_API_KEY="your_api_key_here" # Fallback
Usage Examples
Grep Search - Find Code Patterns
# Find all async functions in FastAPI
package_search_grep({
"package": "fastapi",
"pattern": "async def \\w+",
"max_results": 20,
"file_pattern": "*.py"
})
# Find class definitions extending BaseModel
package_search_grep({
"package": "pydantic",
"pattern": "class \\w+\\(BaseModel\\)",
"max_results": 10
})
# Search for specific decorators
package_search_grep({
"package": "flask",
"pattern": "@app\.route",
"case_sensitive": true
})Hybrid Search - Semantic + Pattern
# Find HTTP-related functionality
package_search_hybrid({
"package": "requests",
"query": "HTTP connection pooling and retry logic",
"max_results": 15
})
# Search with regex filter
package_search_hybrid({
"package": "numpy",
"query": "fast fourier transform implementation",
"regex_filter": "def .*fft",
"max_results": 10
})
# Explore specific functionality
package_search_hybrid({
"package": "tensorflow",
"query": "gradient computation and backpropagation",
"file_pattern": "*.py"
})Read Files - Get Full Context
# Read entire file
package_search_read_file({
"package": "requests",
"file_path": "requests/models.py"
})
# Read specific line range
package_search_read_file({
"package": "flask",
"file_path": "flask/app.py",
"start_line": 100,
"end_line": 200
})
# Read package initialization
package_search_read_file({
"package": "pandas",
"file_path": "pandas/__init__.py",
"start_line": 1,
"end_line": 50
})Integration with deep_research_package
When you have a Chroma API key configured, `deep_research_package` automatically combines results from both Chroma Package Search and Context7 documentation:
# Automatically uses both sources when available
deep_research_package({
"package_name": "numpy",
"query": "How does FFT work?"
})
# Returns combined results:
{
"package": "numpy",
"source": "multi_source+llm",
"providers": ["ChromaPackageSearch", "UpstashProvider"],
"chroma_results": [...], // Source code snippets
"documentation": {...}, // Context7 docs
"answer": "..." // LLM synthesis
}Available Packages
Chroma Package Search includes popular packages across multiple languages:
- • numpy
- • flask
- • fastapi
- • requests
- • pandas
- • tensorflow
- • pytorch
- • react
- • vue
- • express
- • next.js
- • node
- • @types/*
- • typescript
- • And many others...
💡 Pro Tips
- • Use
package_search_hybridfor exploring unfamiliar codebases - • Use
package_search_grepwhen you know exact patterns - • Combine with
deep_research_packagefor comprehensive understanding - • Results are cached for better performance on repeated searches