Skip to main content
Glama

RepoSniffer

CI PyPI MCP License: MIT Downloads

There's a repo for that. Let RepoSniffer find it.

RepoSniffer demo

AI-first GitHub repo discovery. Describe a feature in plain language — "markdown editor with live preview" — and RepoSniffer returns a ranked, adoption-grade list of open-source projects that implement it, with evidence and quality signals (stars, activity, license, archived status).

Built to be the grounding layer for coding agents: stop hallucinating repos, get a verifiable "best of kind" answer with reasons.

Quickstart

# CLI
uvx reposniffer "markdown editor live preview" --language python --top-k 5

# MCP server (stdio) — wire into opencode, Claude Code, Codex, Cursor, ...
uvx --from reposniffer reposniffer-mcp

Set GITHUB_TOKEN to raise search rate limits (authenticated = 30 req/min vs ~10).

Related MCP server: github-rag-mcp

Wire into your agent

opencode — add to opencode.json:

{
  "mcp": {
    "reposniffer": {
      "type": "local",
      "command": ["uvx", "--from", "reposniffer", "reposniffer-mcp"],
      "environment": { "GITHUB_TOKEN": "ghp_..." }
    }
  }
}

Claude Code: claude mcp add reposniffer -- uvx --from reposniffer reposniffer-mcp Codex/Cursor: add an MCP server pointing at uvx --from reposniffer reposniffer-mcp (stdio).

MCP tools

Tool

Purpose

find_repos

Feature query → ranked candidates with score breakdown, snippet evidence, license verdict, recommendation

repo_intel

Verify an existing repo (alive? licensed? best-of-kind?) + 2 alternatives

health

Embedding backend, model, auth status

Every result carries as_of (a freshness timestamp agents can cite), a flags list (archived, no-license, strong-copyleft, stale, ...), a license_category (permissive / weak-copyleft / strong-copyleft / unknown), and a targeted snippet showing why the repo matched.

Need

GitHub Search / grep.app

RepoSniffer

Query

literal keywords (in:readme markdown preview)

natural language intent (markdown editor with live preview)

Ranking

BM25 / stars only

hybrid cosine + lexical rerank + quality signals

Verdict

you inspect each repo

license_category, flags (archived, no-license, stale, strong-copyleft), evidence snippet, as_of

Agent-ready

scrape HTML / hallucinate

MCP find_repos / repo_intel with structured JSON

Cache

none

local SQLite (repos, READMEs, embeddings, queries)

Architecture

  1. Coarse candidate fetch — GitHub Search API (in:readme, language/license/stars filters).

  2. Hybrid rerank — embed each candidate's description + README front matter (not the whole README, to avoid dilution), cosine vs embedded query, plus a lexical-overlap boost for literal matches.

  3. Quality scoring — popularity (log stars), activity (pushed_at half-life), license category, archived penalty; weights differ by intent (adopt vs study).

  4. Adoption safety — permissive/weak/strong-copyleft classification flags GPL/AGPL repos before you depend on them.

  5. Local SQLite cache — repos, READMEs, embeddings, query results → fast repeat queries, index grows over time.

Embeddings are pluggable: default is a zero-config local fastembed ONNX model (BAAI/bge-base-en-v1.5, no torch, no API key); set REPOSNIFFER_EMBED_BACKEND=api plus an OpenAI-compatible endpoint for stronger quality.

Model size: the default bge-base-en-v1.5 is a one-time ~209 MB download (cached in ~/.cache/fastembed). If you want a smaller footprint, set REPOSNIFFER_EMBED_MODEL=BAAI/bge-small-en-v1.5 (~90 MB) — quality is slightly lower (hit@1 0.50 vs 0.83 on the eval), so prefer the larger model when disk isn't a concern.

Eval

Ground-truth queries live in eval/queries.py (feature → known-good repos). Run with a token (each query fetches ~50 READMEs):

GITHUB_TOKEN=ghp_... uv run python -m eval.run

Reports hit@1 / hit@3 / hit@5. Current live result: hit@1 0.83, hit@3 0.83, hit@5 0.83.

Known limitation: the candidate stage depends on GitHub Search API relevance, which can fail to recall canonical repos with weak descriptions/READMEs (e.g. Kozea/WeasyPrint — description is just "The awesome document factory"). Semantic rerank can only rank what the candidate fetch surfaces.

Star History

Star History Chart

Project layout

src/reposniffer/
  config.py        # env-driven settings
  cache.py         # sqlite store (repos, readmes, embeddings, query cache)
  engine/
    github.py      # GitHub REST client + search query builder + text/snippet utils
    embed.py       # Embedder protocol: local fastembed + OpenAI-compatible API
    score.py       # quality + license-category + lexical scoring
    search.py      # orchestration (Engine)
  mcp/server.py    # MCPServer (mcp 2.x)
  cli.py           # Typer CLI
eval/              # golden query → repo eval harness
tests/             # offline (fake transport + fake embedder)

Development

uv sync
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv run pytest

CI (lint/format/type/tests) runs on every push and PR. Publishing to PyPI happens on v* tags via trusted publishing — enable it once on the PyPI project settings, then: git tag v0.1.0 && git push --tags.

Note: mcp 2.x is used — MCPServer (FastMCP was renamed in mcp 2.0). Pin mcp<2 if you need the v1 API.

Contributing

We welcome contributions — bugs, features, docs, and eval cases. Please read CONTRIBUTING.md first; it covers the dev setup, coding standards, tests, the eval harness, and the PR workflow.

  • Found a bug? Open an issue with the exact query and output.

  • Have a feature idea? Discuss it in an issue before writing code.

  • Reporting a vulnerability? See SECURITY.md — don't post it publicly.

  • This project follows a Code of Conduct.

License

MIT

Available Tools

3 tools
find_reposA

Rank open-source GitHub projects that implement a described feature.

Use when an agent needs to pick a library/project to adopt or study, and wants a verifiable, adoption-grade verdict with evidence and quality signals (stars, activity, license, archived status) instead of a hallucinated guess.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
intentNoadopt
licenseNo
languageNo
min_starsNo
include_archivedNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the result is verifiable, adoption-grade, and includes quality signals such as stars, activity, license, and archived status, but it does not mention read-only behavior, error cases, or ranking mechanics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long and focused. It front-loads the primary action and adds only relevant detail about the expected output and use case.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description gives a solid high-level purpose but is incomplete for a 7-parameter tool. It does not clarify parameter semantics, output schema details, or relationship to sibling tools, so an agent may need additional information to use it correctly in nuanced scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema coverage is 0% and the description does not explicitly document the parameters. Parameter names like top_k, min_stars, license, language, and include_archived are self-explanatory to some degree, but intent is not explained and value formats are left ambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: ranking open-source GitHub projects by a described feature. It distinguishes itself from a generic search by emphasizing an adoption-grade verdict with evidence and quality signals.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use it: when an agent needs to pick a library/project to adopt or study. It could mention when not to use it or how it differs from sibling tools like repo_intel and health, but the primary use case is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

healthA

Report embedding backend, model, and GitHub auth status.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of disclosing side effects. The verb 'report' strongly implies a read-only, non-mutating operation, but the description does not explicitly state that the tool has no side effects, makes no external calls, or is safe to invoke at any time. It is not contradictory, but it lacks explicit behavioral guarantees.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that contains no redundant words or filler. It is front-loaded with the verb and immediately specifies what is reported. The structure is ideal for a no-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters and the output schema is available (though not displayed), the description sufficiently covers the essentials. It states what the tool does without needing to elaborate on inputs. The only minor gap is the lack of detail about the output format or structure, but since an output schema exists and the purpose is simple, this is not a significant omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema coverage is 100% (empty properties object). The description does not need to explain parameter semantics because there are none. Per the baseline for 0 parameters, a score of 4 is appropriate; there is no additional parameter-related context to add.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Report embedding backend, model, and GitHub auth status.' It uses a specific verb ('report') and identifies the exact subjects, making the purpose unambiguous. It also naturally distinguishes itself from the sibling tools (find_repos, repo_intel) which focus on repository discovery and analysis, not system health.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide any explicit guidance on when to use this tool versus the siblings. While the purpose is clear, there is no direct statement like 'Use this when you need to check system health' or any comparison to find_repos/repo_intel. This leaves the agent to infer usage context from the tool's name and purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

repo_intelA

Verify an existing repo the agent already found: is it alive, licensed, and best-of-kind? Returns a status verdict plus a few alternatives.

Use BEFORE committing to a dependency to catch archived/stale/no-license repos.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNo
top_kNo
owner_repoYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It mentions returning a verdict and alternatives but does not explicitly state read-only nature or potential rate limits. For a simple verification tool, this is sufficient but could be more explicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—two sentences—with no redundant information. Every word contributes to purpose or usage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool, the description covers purpose, usage, and output. However, the lack of parameter explanations creates a gap. Given the output schema exists, the description could have been more complete by addressing parameters, but overall it is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has three parameters (query, top_k, owner_repo) with no descriptions. The description only alludes to owner_repo indirectly ('existing repo') and does not explain query or top_k. With 0% schema coverage, the description fails to compensate, leaving parameter semantics largely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: verifying a repo's health, license, and quality. It distinguishes itself from sibling tools (find_repos, health) by focusing on verification of an existing repo.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to use 'BEFORE committing to a dependency' and lists criteria (archived/stale/no-license), giving clear when-to-use guidance. Also implies when not to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.4
    • Changedfind_repos10 fields changed
      • removedInput schema / $defs
        Removed value: -{
        -  "FindReposParams": {
        -    "properties": {
        -      "include_archived": {
        -        "default": false,
        -        "description": "Include archived repos (usually avoid).",
        -        "title": "Include Archived",
        -        "type": "boolean"
        -      },
        -      "intent": {
        -        "default": "adopt",
        -        "description": "adopt = pick a dependency to use; study = reference implementation to learn from.",
        -        "title": "Intent",
        -        "type": "string"
        -      },
        -      "language": {
        -        "anyOf": [
        -          {
        -            "type": "string"
        -          },
        -          {
        -            "type": "null"
        -          }
        -        ],
        -        "default": null,
        -        "description": "Optional language filter, e.g. 'python', 'rust'.",
        -        "title": "Language"
        -      },
        -      "license": {
        -        "anyOf": [
        -          {
        -            "type": "string"
        -          },
        -          {
        -            "type": "null"
        -          }
        -        ],
        -        "default": null,
        -        "description": "Optional SPDX license key, e.g. 'mit', 'apache-2.0'.",
        -        "title": "License"
        -      },
        -      "min_stars": {
        -        "anyOf": [
        -          {
        -            "type": "integer"
        -          },
        -          {
        -            "type": "null"
        -          }
        -        ],
        -        "default": null,
        -        "description": "Optional minimum stars filter.",
        -        "title": "Min Stars"
        -      },
        -      "query": {
        -        "description": "Plain-language description of the feature, pattern, or narrow library you want.",
        -        "title": "Query",
        -        "type": "string"
        -      },
        -      "top_k": {
        -        "default": 5,
        -        "description": "Number of ranked repos to return.",
        -        "maximum": 20,
        -        "minimum": 1,
        -        "title": "Top K",
        -        "type": "integer"
        -      }
        -    },
        -    "required": [
        -      "query"
        -    ],
        -    "title": "FindReposParams",
        -    "type": "object"
        -  }
        -}
      • addedInput schema / properties / include_archived
        Added value: +{
        +  "default": false,
        +  "title": "Include Archived",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / intent
        Added value: +{
        +  "default": "adopt",
        +  "title": "Intent",
        +  "type": "string"
        +}
      • addedInput schema / properties / language
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "string"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Language"
        +}
      • addedInput schema / properties / license
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "string"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "License"
        +}
      • addedInput schema / properties / min_stars
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "integer"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Min Stars"
        +}
      • removedInput schema / properties / params
        Removed value: -{
        -  "$ref": "#/$defs/FindReposParams"
        -}
      • addedInput schema / properties / query
        Added value: +{
        +  "title": "Query",
        +  "type": "string"
        +}
      • addedInput schema / properties / top_k
        Added value: +{
        +  "default": 5,
        +  "title": "Top K",
        +  "type": "integer"
        +}
      • changedInput schema / required
        Previous value: -[
        -  "params"
        -]New value: +[
        +  "query"
        +]
    • Changedrepo_intel6 fields changed
      • removedInput schema / $defs
        Removed value: -{
        -  "RepoIntelParams": {
        -    "properties": {
        -      "owner_repo": {
        -        "description": "The 'owner/repo' you are considering, e.g. 'encode/uv'.",
        -        "title": "Owner Repo",
        -        "type": "string"
        -      },
        -      "query": {
        -        "anyOf": [
        -          {
        -            "type": "string"
        -          },
        -          {
        -            "type": "null"
        -          }
        -        ],
        -        "default": null,
        -        "description": "Optional feature query to frame the comparison.",
        -        "title": "Query"
        -      },
        -      "top_k": {
        -        "default": 2,
        -        "description": "How many alternative repos to suggest.",
        -        "maximum": 5,
        -        "minimum": 0,
        -        "title": "Top K",
        -        "type": "integer"
        -      }
        -    },
        -    "required": [
        -      "owner_repo"
        -    ],
        -    "title": "RepoIntelParams",
        -    "type": "object"
        -  }
        -}
      • addedInput schema / properties / owner_repo
        Added value: +{
        +  "title": "Owner Repo",
        +  "type": "string"
        +}
      • removedInput schema / properties / params
        Removed value: -{
        -  "$ref": "#/$defs/RepoIntelParams"
        -}
      • addedInput schema / properties / query
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "string"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Query"
        +}
      • addedInput schema / properties / top_k
        Added value: +{
        +  "default": 2,
        +  "title": "Top K",
        +  "type": "integer"
        +}
      • changedInput schema / required
        Previous value: -[
        -  "params"
        -]New value: +[
        +  "owner_repo"
        +]
  2. 3 tool updatesv0.1.1
    • First observedfind_repos
    • First observedhealth
    • First observedrepo_intel

TDQS

A4/5.0

Scored across 3 tools

Disambiguation5/5

find_repos is clearly for discovering projects by feature, repo_intel is clearly for validating an already-known repo, and health is an operational diagnostic. The purposes are distinct and the descriptions reinforce the boundaries.

Naming Consistency3/5

The names are readable and unambiguous, but they do not follow a single pattern: find_repos uses verb_noun, while repo_intel and health are noun-style labels. There is no chaotic mixing of casing, but the conventions are inconsistent.

Tool Count5/5

Three tools is an appropriate size for a focused repo-intelligence server. Each tool has a clear role: discovery, verification, and service health, so none feels redundant or extraneous.

Completeness4/5

The core workflow is covered: discover candidate repos, validate them for adoption, and check service health. A minor gap is the lack of a dedicated detailed-comparison tool, but the combination of verdicts and alternatives in repo_intel makes the surface functional.

Maintenance

ActivityMaintained
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Discover, rank, and compare GitHub repositories from any MCP-compatible AI client. Enables searching, filtering, ranking, and evaluating open-source repositories by topic, language, stars, license, activity, and relevance.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to search and retrieve context from GitHub issues, pull requests, releases, and documentation using hybrid semantic search and time-ordered activity scans.
    108 npm
    Apache 2.0
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to semantically search and navigate code repositories using natural language, with support for multiple repos, incremental indexing, and no local install needed.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    A production-grade GitHub repository finder that helps LLMs discover best repositories with advanced search, ranking, and token optimization.
    1
    MIT