Chroma Package Search

by chroma-core

251 downloads
Not rated
GitHub Website

About

Add to coding agents like Claude or Cursor to give them the ability to understand and better use thousands of dependencies.

Details

Author
chroma-core
Downloads
251
Categories
Developer Tools, Search

- Deterministic regex search over package source code
- Hybrid search combining semantic understanding and regex patterns
- Read exact lines from source files by line range
- Improves AI agent coding task performance
- Reduces hallucination with ground truth context

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Chroma Package Search
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Obtain an API key from Chroma, then invoke the server’s three tools: package_search_grep (regex grep), package_search_hybrid (semantic + regex), and package_search_read_file (read specific line ranges). The API key can be acquired at https://trychroma.com/package-search.

package_search_hybrid

## Description Searches package source code using semantic understanding AND optionally regex patterns. This allows for hybrid search, allowing for prefiltering with regex, and semantic ranking. Required Args: "registry", "package_name", "semantic_queries" Optional Args: "version", "filename_sha256", "pattern", "language" Best for: Understanding how packages implement specific features, finding usage patterns, or exploring code structure.

package_search_read_file

## Description Reads exact lines from a source file of a public package. Useful for fetching specific code regions by line range. Required Args: "registry", "package_name", "filename_sha256", "start_line", "end_line" Optional Args: "version" Best for: Inspecting exact code snippets when you already know the file and line numbers. Max 200 lines.

package_search_grep

## Description Executes a grep over the source code of a public package. This tool is useful for deterministically finding code in a package using regex. Use this tool before implementing solutions that use external packages. The regex pattern should be restrictive enough to only match code you're looking for, to limit overfetching. Required Args: "registry", "package_name", "pattern" Optional Args: "version", "language", "filename_sha256", "a", "b", "c", "head_limit", "output_mode" Best for: Deterministic code search, finding specific code patterns, or exploring code structure.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "chroma package search": {
            "package-search-mcp": {
                "type": "http",
                "url": "https://mcp.trychroma.com/package-search/v1",
                "headers": {
                    "x-chroma-token": "<CHROMA_API_TOKEN>"
                }
            }
        }
    }
}

McpServers

{
    "package-search-mcp": {
        "type": "http",
        "url": "https://mcp.trychroma.com/package-search/v1",
        "headers": {
            "x-chroma-token": "<CHROMA_API_TOKEN>"
        }
    }
}

The Package Search MCP Server adds ground truth context about code packages to AI agents. Our research demonstrates that by exposing the source code of a project's dependencies to a model, we improve its performance on coding tasks and reduce its potential for hallucination. Package Search achieves this by exposing regex and semantic query capabilities over popular open source code packages.

package_search_grep

Executes a grep over the source code of a public package. This tool is useful for deterministically finding code in a package using regex.

package_search_hybrid

Searches package source code using semantic understanding AND optionally regex patterns.
This allows for hybrid search, allowing for prefiltering with regex, and semantic ranking.

package_search_read_file

Reads exact lines from a source file of a public package. Useful for fetching specific code regions by line range.

Getting an API Key

Create a Chroma account and get an API key at https://trychroma.com/package-search. Receive $5 worth of free credits, roughly 1,000 semantic queries.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.