# whichlib [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/josifb/whichlib  
**GitHub Stars:** 0  
**npm Downloads (last month):** 832  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/whichlib

## Description
Dependency picker for coding agents: recommends, compares and scores GitHub repos with a verdict.

## Tools
Capabilities this server exposes over MCP:

- **recommend_repos** — Find the best open-source library for a need before adding a dependency. Give the need in plain words and get up to `limit` GitHub repositories ranked by fit = score x relevance to the need. Each result has a 0-100 score (momentum 40% (stars gained per week; without history, lifetime stars per week scaled by the npm/PyPI download trend), maintenance 25%, adoption incl. npm/PyPI weekly downloads 25%, license 10%), a tier (Strong >=75, Solid >=50, Watch >=25, Avoid <25; New for repos under 30 days old, too new to judge), a one-line verdict and the full breakdown. Use this when you do not yet have candidates; use compare_repos when you already have names. Makes 3 GitHub searches plus npm/PyPI lookups for the shortlist. Without a GitHub token GitHub allows about 10 searches per minute; when the limit is hit the tool returns an error saying when it resets.
- **compare_repos** — Compare 2-10 known GitHub repositories side by side, best score first: score and tier, stars, forks, open issues, last push, license, npm/PyPI weekly downloads (only when the registry links back to the repository) and a verdict. Each result has a 0-100 score (momentum 40% (stars gained per week; without history, lifetime stars per week scaled by the npm/PyPI download trend), maintenance 25%, adoption incl. npm/PyPI weekly downloads 25%, license 10%), a tier (Strong >=75, Solid >=50, Watch >=25, Avoid <25; New for repos under 30 days old, too new to judge), a one-line verdict and the full breakdown. Use this to choose between candidates you already have (for example zod vs valibot) or to check a dependency the project already uses; use recommend_repos to find candidates. One GitHub API call per repository plus npm/PyPI lookups. A repository that does not exist is listed under notFound and the rest are still compared; the call fails only if none can be fetched, or when GitHub's rate limit is reached or the token is rejected.
- **trending_repos** — Discover projects: the most-starred GitHub repositories created in the last day, week or month, or with period "rising" repositories of any age that gained the most stars this week (like GitHub Trending; risingRank keeps that order). Optionally one language; each scored and returned sorted by score (starsRank keeps the stars order). Each result has a 0-100 score (momentum 40% (stars gained per week; without history, lifetime stars per week scaled by the npm/PyPI download trend), maintenance 25%, adoption incl. npm/PyPI weekly downloads 25%, license 10%), a tier (Strong >=75, Solid >=50, Watch >=25, Avoid <25; New for repos under 30 days old, too new to judge), a one-line verdict and the full breakdown. Not the right tool for picking a dependency, since new repositories have little maintenance history; use recommend_repos for that. One GitHub search (rising: one download of the daily list from raw.githubusercontent.com instead), plus one npm/PyPI lookup per repository when withDownloads is true. Without a GitHub token GitHub allows about 10 searches per minute; when the limit is hit the tool returns an error saying when it resets.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "whichlib": {
    "command": "npx",
    "args": ["-y","whichlib"],
    "env": {
      "GITHUB_TOKEN": "",
      "WHICHLIB_HISTORY": "",
      "FRESH_REPOS_DATA_DIR": "",
      "WHICHLIB_TELEMETRY": "",
      "DO_NOT_TRACK": ""
    }
  }
}
```

**Requires environment variables:** `GITHUB_TOKEN`, `WHICHLIB_HISTORY`, `FRESH_REPOS_DATA_DIR`, `WHICHLIB_TELEMETRY`, `DO_NOT_TRACK` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What whichlib does

whichlib exposes dependency research through MCP. Agents can ask for repositories that fit a plain-language requirement, compare several `owner/repo` names, or find highly starred repositories created during a selected period. The service returns ranked results with a score from 0 to 100, a tier, four component scores, flags, package information, download counts where available, and a short verdict.

The scoring model considers four areas: momentum, maintenance, adoption, and license. Momentum uses recent star history when available and falls back to stars per day. Maintenance reflects time since the last push and the relationship between open issues and stars. Adoption uses stars and forks, adding npm or PyPI downloads when a verified registry link exists. License classifications contribute the remaining portion of the score.

Repositories younger than 30 days receive a `New` classification and a `too-new` flag. Archived repositories are capped at 20 points. Missing licenses are called out in the verdict.

## How it works

`recommend_repos` accepts a plain-language `need`, with optional language and result limit parameters. It searches GitHub through relevance, star, and topic queries, then ranks candidates using fit multiplied by the repository score. `compare_repos` accepts two to ten `owner/repo` identifiers and orders them using the same scoring breakdown. `trending_repos` accepts day, week, month, or rising periods, plus optional language, limit, and download settings.

The tools run over stdio when installed locally and are also available through the hosted MCP endpoint at `https://whichlib.com/mcp`. Each response includes readable text and `structuredContent` for programmatic handling.

## Setup and configuration

The local package requires Node.js 22 or newer. Claude Code can install it with:

```bash
claude mcp add whichlib -s user -- npx -y whichlib
```

Other MCP clients can use the same `npx -y whichlib` command in their server configuration. A remote setup uses the hosted endpoint instead, so Node.js is not needed:

```bash
claude mcp add --transport http whichlib https://whichlib.com/mcp
```

`GITHUB_TOKEN` raises the GitHub search allowance from 10 to 30 requests per minute; a fine-grained token with no permissions is sufficient. `WHICHLIB_HISTORY=off` disables the background download of public star-history files. `FRESH_REPOS_DATA_DIR` selects a directory for daily data files when working from a clone. Anonymous call counting can be disabled with `WHICHLIB_TELEMETRY=off` or `DO_NOT_TRACK=1`.

## Tools and capabilities

- Recommend repositories for a stated development need.
- Compare two to ten GitHub repositories side by side.
- List scored repositories created within a day, week, or month.
- Find rising repositories using weekly star gains.
- Include npm or PyPI downloads only when repository ownership is verified by registry metadata.
- Return scores, tiers, verdicts, flags, package mappings, and structured results.

## Limitations and notes

GitHub does not provide repository download counts, so downloads come from npm or PyPI package metadata and are unavailable for other ecosystems such as Rust, Go, and Java. A matching package name alone is not enough to establish a mapping.

The dashboard does not have snapshot history, so its Today-tab momentum values are provisional. The MCP server uses real weekly star gains when at least two days of snapshots are available; otherwise it uses a stars-per-day fallback. GitHub rate limits also affect how frequently recommendations can be requested, especially without a token.

_Full upstream README: https://allmcps.com/mcp/whichlib/readme_

