oss-search

io.github.sblattj由 GitHub 帳號 sblattj 發布v0.3.2更新於 Oct 30, 2026

Fast local and federated OSS code search and repo discovery for AI agents

概覽

AI 產生的概覽

本機 MCP 伺服器,用於開源專案探索:依主題或程式寫法搜尋儲存庫,並檢視檔案、目錄樹與文件。

可以做什麼
  • 依主題、名稱或描述搜尋開源儲存庫,回傳含星數、授權類別與發行資訊的排序結果
  • 以特徵程式寫法或正規表示式探針尋找儲存庫,並依命中探針數量排序
  • 取得單一已知儲存庫的預先整理簡報:中繼資料、健康判定、授權類別、README 摘要與架構
  • 一次呼叫列出整個儲存庫的檔案樹,可依路徑篩選
  • 依行範圍讀取檔案精確內容,並透過 llms.txt 彙整取得專案文件及來源標註
  • 視需要回傳探針撰寫、查詢語法、速率限制陷阱與工具選擇的說明手冊
適用情境
適合回答「有沒有做 X 的工具」、比較候選開源專案,或在採用某個函式庫前確認它如何實作某種 API 寫法。主要用於對公開儲存庫的調查與查核,而非修改程式碼。
執行需求
透過 npx 以本機 stdio 程序執行(Node.js 18 以上僅用於啟動二進位檔);支援 macOS 或 Linux 的 x64、arm64。首次執行會從 GitHub Releases 下載預先編譯的 Rust 二進位檔並快取,需要網路連線。遠端後端(如 GitHub 程式碼搜尋)需加 --live 參數啟用,可能用到 GITHUB_TOKEN;快取位置可用 OSS_SEARCH_CACHE_DIR 變更。
安裝前請注意
首次執行會下載並執行來自 GitHub Releases 的二進位檔,僅在存在 checksums.txt 時進行校驗。live 模式會把查詢送往 GitHub 程式碼搜尋、grep.app、deps.dev 等第三方服務,並可能因速率限制需要 GITHUB_TOKEN。工具僅讀取公開儲存庫資料,未描述寫入操作。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 oss-search,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

oss-mcp (npm distribution)

npm/npx distribution of oss-search — fast local + federated OSS code search and repo discovery, exposing 7 MCP tools over stdio plus a byte-identical CLI.

This package contains no compiled code and has zero runtime dependencies. On first run, the oss-mcp shim downloads the prebuilt Rust binary for your platform from GitHub Releases, verifies it against the release's checksums.txt (when present), and caches it. Subsequent runs start instantly from the cache.

Requirements

  • Node.js >= 18 (only to bootstrap the binary)
  • macOS (x64, arm64) or Linux (x64, arm64)
  • A published release v<version> with assets named oss-search-<version>-<target>.tar.gz (containing the oss-mcp binary) and, optionally, checksums.txt

Run once

sh
npx oss-search            # speaks MCP over stdionpx oss-search --live     # enable remote backends (GitHub code search, grep.app, deps.dev, ...)

Install globally

sh
npm install -g oss-searchoss-mcp

Use with an MCP client

json
{  "mcpServers": {    "oss-search": {      "command": "npx",      "args": ["oss-mcp"]    }  }}

Or point directly at the cached binary (~/.cache/oss-search/bin/<version>-<target>/oss-mcp) to skip the Node shim entirely.

Cache

Binaries are cached at ~/.cache/oss-search/bin/<version>-<target>/oss-mcp. Override the location with the OSS_SEARCH_CACHE_DIR environment variable. Delete the cache to force a re-download.

For GITHUB_TOKEN-backed live search and other options, see the repository README.

License

MIT — see LICENSE.

來源:npm/oss-search/README.md,提交 ef7cbc0

工具

7

oss_search_repos

Find open-source repositories by topic, name, or description. Returns a ranked shortlist with pre-computed fitness evidence (stars, license class, last release, archived flag, one-line what-it-is, one-line the-catch) — not a link dump. Lead with this for 'is there a tool for X' questions; use oss_search_code when the capability is an implementation detail no README advertises.

輸入參數sortlimitquery必填topiccursorfieldslanguagemin_starsresponse_format

oss_search_code

Find repos by distinctive code idioms, not marketing. Fires 2-5 orthogonal literal or /regex/ probes, aggregates hits PER REPO, and ranks by probe breadth (repos hitting several independent idioms outrank any star count). Use for: implementations of an API idiom, error string, or config key; finding peers of a known-good repo (steal its identifiers as probes). Do NOT use to test whether a category exists — probing your own idioms finds only clones; lead with oss_search_repos instead.

輸入參數modepathlimitcursorprobes必填languagerepo_filterexclude_knownresponse_formatsnippets_per_repo

oss_repo_profile

Pre-digested brief for ONE known repo: metadata, computed health verdicts, license compatibility class, README digest (<=1200 chars), top-level architecture from the file tree, release cadence, runtime-support evidence. Use instead of 5+ raw metadata calls; use oss_fetch_docs / oss_fetch_file to drill in.

輸入參數repo必填deep_docs

oss_repo_tree

Whole-repo file list in ONE call, path-filtered. ALWAYS call this before fetching any file whose path you are guessing — a 404 from a guessed path proves nothing. Response declares the total file count and returns up to `limit` paths with truncated/has_more set beyond.

輸入參數refglobrepo必填limitpath_prefix

oss_fetch_file

Read one file's exact contents — byte-exact, never via a summarizer for opaque tokens, paths, or config keys. Prefer a line_range to keep payloads small; large files return the range plus total_lines.

輸入參數refpath必填repo必填line_range

oss_fetch_docs

Fetch a project's docs the reliable way: resolve llms.txt / llms-full.txt aggregates, then return search hits WITH their 'Source: <url>' breadcrumbs so each hit maps back to its page. Falls back to raw docs/*.md and flags redirect-stub pages. One aggregate fetch replaces a dozen lossy page fetches.

輸入參數repo必填pattern必填docs_host

oss_guide

Returns the probe-writing and query-syntax playbook on demand: good vs bad probes, the backend regex support matrix, rate-limit traps, license-class meanings, and which tool answers which question (discovery vs vetting vs drill-down). Call once when unsure which oss_ tool to use.

無需輸入參數。

版本歷史

3
  1. v0.3.2最新Oct 21, 2026
  2. v0.3.1Oct 20, 2026
  3. v0.2.0Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分