
dep-rank
io.github.j7an由 GitHub 帳號 j7an 發布v0.10.2更新於 Nov 3, 2026
Rank a GitHub repo's dependents by stars or trust heuristic, and search their code
發布方自己的服務:Rank Fast
概覽
依星標數或信任啟發式為依賴某個 GitHub 儲存庫的專案排名,並可在這些依賴方中搜尋程式碼。
- 可以做什麼
- 依星標數為某儲存庫的依賴方排名,可限制列數、最低星標、套件名稱與抓取頁數
- 以綜合星標、fork、issue 與 PR、近期活動的啟發式信任分重新排序,並可附上提示訊號
- 在排名前段的依賴方中搜尋程式碼,了解真實專案如何使用某個 API
- 可選擇附上套件下載量統計與儲存庫描述
- 適用情境
- 適合想了解某個套件究竟被誰使用、評估其實際採用程度,或在採用、撰寫文件前查找下游專案中的實際用法範例時使用。
- 執行需求
- 以 stdio 在本機執行,通常透過帶 mcp 擴充的 uvx 或 Docker 映像啟動。需在 DEP_RANK_TOKEN 環境變數提供 GitHub 個人存取權杖,缺少時兩個工具都會失敗。需要連線至 GitHub,查詢下載量統計時還需連線至套件登錄庫。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 dep-rank,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
dep-rank
Rank GitHub dependents by stars or trust.
[PyPI] [License: MIT] [Python 3.11+] [GHCR]
dep-rank finds the most popular repositories that depend on a given GitHub project. It scrapes GitHub's dependents page, enriches results via the GraphQL API, and works as a command-line tool and as an MCP server for AI agents (see MCP server).
- Rank dependents by stars — find the most popular projects that use a repository.
- Trust ranking — a heuristic, pool-relative re-rank that weighs forks, issues and pull requests, and recent activity alongside stars. Not a fraud verdict.
- Search code across dependents — see how real projects use an API.
- MCP server — the same ranking and search as tools for AI agents, via
uvxor theghcr.io/j7an/dep-rankDocker image.
Also: JSON output, package download stats, choosing among multiple packages, local cache, Docker image, Python API.
Quick Start
A token is effectively required; see Authentication. Example output (numbers change over time). dep-rank also prints a scrape summary on stderr; this run stopped early, so the count is a lower bound, not a total (see Partial results):
CLI Reference
dep-rank deps — List top dependents
In table output (deps, search, and the live progress table), repository names are clickable links to their GitHub pages in terminals that support OSC 8 hyperlinks; piped or redirected output stays plain text.
dep-rank search — Search code in dependents
search always runs a bounded non-adaptive top-K scrape (--no-adaptive-stop is not exposed; adaptive early-stop is permanently disabled for this command).
Rate-limited code searches are retried up to twice, honoring GitHub's wait headers; if GitHub keeps limiting, the remaining repositories are reported as not searched (rate limited).
Partial results
A scrape result (deps, and the search pre-pass) reports whether it finished: results include a complete flag and a reason. complete: false means the scrape stopped early — max_pages_reached (raise --max-pages), trend_converged (the adaptive heuristic judged the top-K stable; use --no-adaptive-stop to scrape until exhaustion or --max-pages), network_failure, or rate_limited. total_count/filtered_count are then lower bounds across the pages actually scraped, not population totals.
Repositories with several packages
Some repositories publish several packages, and GitHub's dependents page lists them in a dropdown (at most 100). Without --package-name, GitHub picks the package, and dep-rank names it and the others in a hint. JSON output then also carries package (the one scraped) and packages (every listed name).
dep-rank cache — Manage cache
MCP server
dep-rank mcp runs an MCP server over stdio so AI agents can call dep-rank directly. It needs the optional mcp extra:
Client configuration (the command works with any MCP client that launches stdio servers):
DEP_RANK_TOKEN is required: both tools fail without it. The token is read from the server's environment only, never from a tool argument.
Tools:
get_dependents— rank a repository's dependents by stars or trust (thedep-rank depspipeline). Parameters mirror the CLI:url,rows,min_stars,dependent_type,descriptions,rank_by,trust_check,downloads,max_pages,adaptive_stop,package_name.search_dependents— search code across the top dependents (thedep-rank searchpipeline):url,query,max_repos,min_stars,max_pages,package_name.
Caveats:
- Results can be partial. Check
completeandreasonbefore treating counts as totals; see Partial results. - Trust scores are pool-relative heuristics, not quality or fraud verdicts; see Trust Ranking.
- Calls run one at a time; a call that arrives while another is running waits for it.
- Long calls report progress, including GitHub rate-limit waits. Claude Code moves MCP calls that run longer than two minutes into the background.
- The server honors
HTTP_PROXY,HTTPS_PROXY, andNO_PROXYfrom its environment. A SOCKS proxy (for exampleALL_PROXY=socks5://...) is not supported: tool calls fail with an error until it is removed from the server's environment.
Run the MCP server in Docker (MCP Toolkit)
The ghcr.io/j7an/dep-rank image runs the MCP server under Docker MCP Toolkit. You get:
- container isolation, with no host filesystem access;
- network access limited to GitHub when the gateway runs with
--block-network; - one profile shared by every agent harness you connect.
It does not change prompt-injection risk: tool results still contain text from third-party repositories, and your agent reads it.
Prerequisites: Docker Desktop with MCP Toolkit, and profiles enabled (the MCPWorkingSets feature flag in Docker Desktop, or docker mcp feature enable profiles).
-
Save this server definition as
~/.docker/mcp/catalogs/dep-rank.yaml. The gateway only readsfile://definitions from that directory.get_dependentswithdownloadsalso needspackages.ecosyste.ms:443,api.npmjs.org:443, andapi.deps.dev:443inallowHosts; without them, download stats are reported as unavailable. -
Create the profile. Keep
--id dep-rank: without it the ID becomesdep_rank, which won't match the harness config below. -
Store your GitHub token:
If the secret is missing, the gateway passes the literal value
<UNKNOWN>asDEP_RANK_TOKEN, so calls fail with GitHub errors rather than a "token missing" message. -
Point each harness at the gateway. Write the entry by hand so it includes
--block-network, which is what enforcesallowHosts:docker mcp client connect <client> -p dep-rankalso works, but the entry it writes omits--block-network; add it yourself.
Notes:
- For reproducible installs, pin
imageto a release tag (ghcr.io/j7an/dep-rank:<version>) or an@sha256:digest. Verify an image's build provenance withgh attestation verify oci://ghcr.io/j7an/dep-rank:<version> --repo j7an/dep-rank. - Each tool call starts a fresh container. The
dep-rank-cachevolume keeps the cache warm between calls. - The gateway can leave its proxy containers behind. Remove them with
docker rm -f $(docker ps -aq --filter label=docker-mcp-proxy=true).
Python API (provisional)
Use dep_rank.core.dependents.get_dependents for the deps pipeline in Python.
It returns dep_rank.core.models.DependentsResult; select repository or package
dependents with dep_rank.core.models.DependentType. The API may change during 0.x.
dep_rank.core.cache.SqliteCache(path) takes a cache directory. Caching is
optional: call main() in this example to omit it. The caller opens and closes
the session and initializes and closes the cache; get_dependents closes neither.
The defaults return up to 10 dependents with at least 5 stars, ranked by stars.
Pass a GitHub token explicitly as token=... for descriptions or trust ranking;
the library entry point does not read DEP_RANK_TOKEN. Pass downloads=True
for optional package download statistics; no token is required for this lookup.
Check result.downloads_check.complete and .unavailable to distinguish lookup
failures from repositories with no matching package.
get_dependents raises ValueError for an invalid GitHub repository URL,
rank_by other than "stars" or "trust", descriptions=True without a token,
rank_by="trust" without a token, or trust_check=True without
rank_by="trust". It raises NotFoundError (a ValueError subclass, from
dep_rank.core.scraper) when GitHub returns 404 for the repository's dependents
page — the repository does not exist or is private — and when package_name names
no listed package. Trust scores are pool-relative heuristics, not quality or fraud
verdicts.
Check result.complete and result.reason for partial results; counts are lower
bounds when incomplete. result.stale_pages counts pages served from expired
cache entries, and result.trust_metadata_complete is false when trust scores
used partial metadata. result.trust_pool_size is the number of dependents scored
together, which trust scores are relative to (0 when not trust-ranked). These fields
exist on the result but are excluded from model_dump() and JSON serialization
(model_dump_json()).
If trust metadata cannot be fetched, results fall back to stars; check
result.ranked_by == "trust" to confirm trust ranking, since
trust_metadata_complete describes only metadata used for successful trust ranking.
Authentication
Set the DEP_RANK_TOKEN environment variable with a GitHub personal access token:
A token is effectively required for non-trivial use: unauthenticated GitHub HTML scraping is limited to ~60 requests/hour per IP, so unauthenticated runs are suitable only for small one-off scrapes. Set DEP_RANK_TOKEN to raise the limit.
What works without a token:
dep-rank deps— core scraping and star ranking
What requires a token:
--descriptionsflag — fetches repo descriptions via GitHub GraphQL API--rank-by trust— fetches engagement/recency metadata via GitHub GraphQL API--trust-check— adds authenticated REST star-history requests to trust rankingdep-rank search— code search across dependentsdep-rank mcp— both MCP tools requireDEP_RANK_TOKENin the server environment
Create a token at github.com/settings/tokens with public_repo scope.
How It Works
dep-rank uses a three-stage pipeline:
- Scrape — fetches GitHub's
/network/dependentsHTML pages to discover the dependents GitHub lists and their approximate star counts - Enrich (optional) — one GraphQL batch query fetches accurate star counts and descriptions for the top N results (replaces 100 individual REST API calls)
- Present — returns structured results as a Rich table
With --downloads, the displayed rows receive optional package download statistics after ranking.
GitHub only lists repositories whose dependency graph is enabled. Since June 2025 the graph defaults to off for new public repositories and is disabled on long-inactive ones, so counts can miss real dependents.
Responses are cached in a local SQLite database (~/Library/Caches/dep-rank on macOS, $XDG_CACHE_HOME/dep-rank or ~/.cache/dep-rank on Linux, and %LOCALAPPDATA%\dep-rank\dep-rank\Cache on Windows) with ETag support for conditional requests. Expired pages are served immediately and refreshed in the background (stale-while-revalidate) on authenticated runs. Unauthenticated runs serve expired pages as-is and never refresh them; deps prints a notice on stderr when that happens. Set a token or run dep-rank cache clear for current results.
Package downloads
--downloads works with both --repositories and --packages, with no token
requirement. For each displayed dependent, ecosyste.ms
provides package candidates and non-npm counts, and deps.dev
provides attestation evidence. npm counts come from npm's download API
(api.npmjs.org, last 30 days); non-npm counts are ecosyste.ms snapshots that can lag.
The package with the highest download count among accepted candidates is shown;
counts never affect star or trust ranking.
A package is accepted when any of these rules holds:
- deps.dev links the package to the repository through a publish or SLSA
attestation with at least one attestation marked
verified: true. - A package name without a namespace matches the repository name after lowercasing,
removing
-,_, and., and optionally stripping one recognized language affix. - A namespaced package (
@scope/name,vendor/name,publisher/name) matches only when its namespace matches the repository owner under the same normalization; matching only the name after the namespace is insufficient.
Packages marked removed are rejected even when attested. A ✓ means a verified
attested repository-to-package link; it does not prove how the package was built.
Unmarked packages matched by name alone are unverified: check before installing.
A squatter may register the matching name or an unclaimed owner scope or vendor namespace. Still-listed
malware has no structured flag in these lookup results, and legitimate packages can
later be compromised. dep-rank is not a vulnerability scanner; use tools such as
pip-audit, npm audit, or OSV to check for known vulnerabilities.
Counts may be inflated or stale, and periods differ: /mo means last month,
total means all time, and other periods are shown explicitly. Raw counts across
these periods are not directly comparable. Name matching can also miss legitimate
packages (for example, a repository whose package has a different name). A —
means no accepted package was found; unavailable means lookup failed. Lookup
failures leave the deps run usable and print a warning to stderr, including in
JSON mode.
Third-party egress: opting in sends the repository URLs of displayed rows to
ecosyste.ms and deps.dev. Displayed npm package names are also sent to
api.npmjs.org. Lookup requests omit caller credentials.
JSON adds a per-repository downloads object (or null) and a top-level
downloads_check; without the flag these fields are omitted. This example is
illustrative: selected packages and counts can change.
A null download value means no accepted package unless the repository's
owner/name appears in downloads_check.unavailable; in that case the lookup
failed and downloads_check.complete is false.
Trust Ranking
dep-rank deps --rank-by trust re-ranks dependents by a lightweight composite
score instead of raw stars. Stars are useful but gameable; trust
ranking blends stars with non-star signals — forks, total issues and pull
requests, and recency of activity — fetched via low-cost GitHub GraphQL queries
(batched at 25 repositories per request, so a larger pool issues more than one).
Important caveats:
- The score is a pool-relative ranking signal, not an absolute quality score — it min-max normalizes signals across the scraped candidate set.
- It re-ranks only the scraped candidate pool (the star-top-N dependents), not every dependent.
- It is heuristic and does not detect fake stars. By default it does not fetch star
history;
--trust-checkoptionally samples it. Neither mode fetches GHArchive data or external fraud datasets. - Trust ranking scrapes a larger candidate pool and is therefore deeper and slower than star ranking.
--rank-by trustrequires a GitHub token; trust scores appear in--format jsonoutput under each repo'strustfield.
How the score is computed
Trust mode scores the most-starred dependents together, then shows the top --rows
of that ranking. The number scored (the pool) is min(100, rows × 10), never fewer
than --rows, and fewer if fewer dependents match. The default --rows 10 scores
100 and shows 10; --rows 50 scores 100 and shows 50. With --rows ≥ 100, or when
at most --rows dependents match, every scored dependent is shown.
Each of the four signals is log-scaled (except recency) and min-max normalized across the pool: the pool's lowest value maps to 0, its highest to 1, and values in between proportionally. When every repo in the pool has the same value for a signal (including a pool of one), that signal is 0.5 for all of them. The score is the weighted sum × 100:
- 100 means highest in the pool on every signal. 50 means the weighted normalized signals average 0.5. It is not a median rank: normalization is linear between the pool's extremes, so one outlier can leave most of the pool far below 50. A score of 50 is not "half as trustworthy" as 100.
- Scores are only comparable within one run. A different target,
--rows, or--min-starschanges the pool and therefore every score. - Because the table shows the top of the pool, scores usually cluster high: the
defaults show only the top tenth.
--rows 100shows the full range. - The table footer states how many dependents were scored and how many rows are
shown. JSON includes the per-signal 0–1 values
under
trust.components.
Star-history check
This optional check samples the last 30 weeks of daily star counts for up to
25 top returned repositories, using GitHub's authenticated
repository star-history API.
It adds a concentrated_starring caution when the window contains at least
200 stars and at least 15% arrived on one day. It does not change trust scores
or ranking. This is not proof of fake stars: launches and Hacker News spikes
can match the same pattern. See StarScout and the research references
below for the motivation and limits of star-based signals.
The table footer reports checked versus returned repositories, concentrated
patterns, insufficient_history (fewer than 200 stars in the window), and
unavailable (history could not be obtained). JSON adds top-level trust_check
status only when the check is requested; for example (excerpt):
trust_check.complete describes availability for the sampled repositories,
not coverage of all results or all historical stars. Unavailable history makes
it false and leaves the ranking usable. If trust ranking is unavailable, the
check is skipped and the status reports the returned repositories as unavailable.
The check uses no account-level signals: GitHub limited stargazer listings to
repository admins and collaborators in July 2026; aggregate star history remains
the basis of this check.
Caution signals
Trust-ranked results may carry informational caution signals, built from the
same metadata fetch without extra requests by default. The optional
--trust-check adds a star-history caution using separate requests. Signals
appear in JSON under each repo's trust.cautions (a list of code + description, possibly empty) and, in
the table, as a Cautions column of short tags, shown only when at least one result has a signal.
A legend below the table defines each tag that appears.
Thresholds are fixed heuristics. Star floors stand in for a minimum sample size,
and the low-activity signal requires forks and issues/PRs to be low together,
because popular list and documentation repositories routinely have few issues.
Missing metadata never produces a signal. Age-based signals are measured against
the run's scraped_at time.
Caution signals are not proof of fake stars or malicious behavior. They flag patterns worth a closer look, and legitimate repositories — finished libraries, archived projects, a new tool that went viral — can match them. They do not change the trust score.
Motivation that stars are gameable comes from StarScout (repo, preprint, ICSE 2026). The low-resource API basis is the GitHub GraphQL rate-limit docs.
Development
Development needs Python 3.11+ and uv. The setup, test, lint, and type-check commands CI runs are listed in AGENTS.md; test layout and coverage commands are in tests/README.md.
Acknowledgments
dep-rank is a full rewrite of ghtopdep by Andriy Orehov. The original project is licensed under MIT.
License
MIT — see LICENSE for details.
來源:README.md,提交 e0033b2
工具
0版本歷史
5- v0.10.2最新Nov 3, 2026
- v0.10.1Oct 30, 2026
- v0.10.0Oct 29, 2026
- v0.9.2Oct 26, 2026
- v0.9.1Oct 25, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Rank 整合
Rank Fast
fast.rank官方發布者
Rank Fast 遠端 MCP 伺服器,讓助理檢查 Google 收錄並提供診斷、取得自動完成關鍵字建議,並檢視 AI 能見度與客座文章資源。

AIWiseRank
由 GitHub 帳號 VLCODE87 發布
一個遠端 MCP 伺服器,讓助理依真實網路流量搜尋、排名與比較 AI 工具,並提供價格、免費方案、替代品和 LLM API 基準資料。

Mcp Local Rank Map Pack Tracker
com.mambabuilt
本機 MCP 伺服器,透過 Apify actor 查詢指定地點下關鍵字的 Google 自然排名、地圖包排名與本地搜尋器排名。
CreceRank
com.crecerank
遠端 MCP 伺服器,用來檢視品牌在 ChatGPT、Gemini、Perplexity 和 AI Overviews 等 AI 助理中的曝光情形,包含提及、來源與 GEO 建議。
FastestRank SEO Intelligence
由 GitHub 帳號 fastestrank 發布
託管的 FastestRank MCP 伺服器,為 AI 助理提供即時 SEO 資料:排名追蹤、網站稽核、關鍵字指標與反向連結分析。