What oss-search does
oss-search exposes seven MCP tools for researching open-source software rather than only returning repository links. oss_search_repos finds projects by topic, name, or description and ranks them with evidence such as stars, license class, release recency, maintenance and security signals, dependents, and archived status. Results also include short explanations of what a project does and potential drawbacks.
oss_search_code searches for concrete implementation evidence. It combines several literal or regular-expression probes, groups matches by repository, and favors projects matching multiple independent idioms. This makes it useful for locating API patterns, error messages, configuration keys, or peers of a known repository. It is deliberately different from broad category discovery: use repository search to ask whether a type of tool exists.
The remaining tools support investigation. A repository profile condenses metadata, health judgments, license compatibility, README content, file-tree architecture, release cadence, and runtime-support evidence. Tree, file, and documentation tools then let an agent inspect exact paths, source contents, and documentation with source-page breadcrumbs.
How it works
The local engine uses a positional trigram index over a hot-set corpus and updates only changed blobs during reindexing. A semantic layer can split code into function-level chunks for Rust, Python, JavaScript, TypeScript, Go, and C, create local embeddings, and combine semantic and lexical results with reciprocal-rank fusion. Identifier-oriented queries stay on the lexical path instead of incurring model latency.
For live searches, the production engine can query GitHub repository and code search, grep.app, Sourcegraph, deps.dev, ecosyste.ms, and npms.io. Repository candidates from npm and GitHub are deduplicated by owner and name before scoring. The service returns structured envelopes with totals, continuation status, partial-result status, and backend status.
Queries support structured JSON fields and a text syntax with filters for repositories, languages, paths, scope, hot-set membership, and match type. Arrays act as OR conditions, fields combine as AND conditions, and prefixed exclusions are supported. Invalid fields, malformed regular expressions, and unsupported searches produce typed errors instead of being silently ignored.
Setup and configuration
Install the MCP binary through the oss-search npm shim, Cargo, a prebuilt release archive, or a source checkout. The npm option downloads and caches a platform-specific binary; the cache location can be changed with OSS_SEARCH_CACHE_DIR. Cargo installation requires a Rust toolchain. Prebuilt archives are published for Apple Silicon macOS, Intel macOS, and the two listed Linux GNU targets.
Run oss-mcp with no arguments to serve MCP over stdio. Add --live to enable remote backends; without that flag, the server uses its offline stub engine. Claude Code and Claude Desktop can launch the binary directly or through npx, while an opencode.json configuration can define it as a local MCP process. Use an absolute binary path in client configurations where path expansion is unavailable.
GITHUB_TOKEN enables the GitHub backend and avoids its anonymous repository-search limit of 10 requests per minute. SOURCEGRAPH_TOKEN raises Sourcegraph rate limits; Sourcegraph also supports anonymous requests. The CLI mirrors the MCP tools and emits the same structured JSON envelope, making it useful for checking queries before wiring them into an agent.
Tools and capabilities
oss_search_repos: discover repositories by topic, name, or description and inspect ranked fitness evidence.
oss_search_code: find repositories containing distinctive literals or RE2-compatible regular expressions.
oss_repo_profile: obtain a compact assessment of one known repository.
oss_repo_tree: list repository paths with filtering, limits, and truncation metadata.
oss_fetch_file: retrieve exact file contents, optionally constrained to a line range.
oss_fetch_docs: resolve aggregate documentation such as llms.txt and return searchable passages with source URLs.
oss_guide: explain probe design, query syntax, backend behavior, license classes, and tool selection.
The agent-facing contract caps responses at roughly 25 KB, escapes terminal and bidirectional-control characters, applies file-admission checks, and uses linear-time regular-expression behavior. The repository also includes tests, end-to-end reports, evaluation data, and latency measurements.
Limitations and notes
Live coverage depends on remote backend availability and rate limits. GitHub repository search is especially constrained without a token, and a GitHub-only project lacks the dependents signal used for npm-backed candidates. Code search should use distinctive probes: searching broad concepts or idioms copied from the caller’s own code can return clones rather than establish that a category exists.
oss_repo_tree should precede file retrieval when a path is uncertain, because a guessed path can produce a 404 that says nothing about the repository’s contents. Large files are returned by range with their total line count, and tree results can be truncated when the repository exceeds the requested limit. The project is licensed under MIT.