reuse-before-generate
This server helps you avoid rebuilding existing solutions by searching public code repositories, package registries, and SaaS options before you generate code.
Searches GitHub, GitLab, npm, crates.io, NuGet, Hugging Face, Docker Hub, Maven Central, RubyGems, Packagist, and more in parallel.
Accepts a project description or multiple technical search queries to find existing codebases from different angles.
Returns structured Markdown results that an AI assistant can present as a concise comparison table.
Provides targeted web search queries to help find commercial SaaS competitors and community discussions.
Works as an MCP server for AI coding assistants (Claude Code, Cursor, VS Code, etc.) and as a direct CLI tool.
Requires no API keys; a GitHub token is optional only to raise GitHub rate limits.
Searches GitHub for existing repositories that match the project idea, helping to find reusable open-source code or competing products.
Searches GitLab repositories for existing open-source projects relevant to the user's query.
Searches npm registry for existing packages that could be reused or indicate competitors.
Searches Python Package Index for existing packages that may serve the same purpose.
Searches RubyGems for existing libraries that could be alternatives.
reuse-before-generate
Your idea probably already exists. Find out before you build it, not after.
When you ask an AI coding assistant to build an app or module, it overenthusiastically starts scaffolding thousands of lines of code from scratch—even when battle-tested open-source libraries or maintained tools already exist.
reuse-before-generate is a zero-dependency MCP server (and CLI tool) that intercepts the AI workflow before code generation begins. It searches public code and package indexes across multiple angles, formats results as structured Markdown, and directs the AI to search the web for existing SaaS products and community discussions.
Sources checked
The server checks these sources in parallel:
Source | What it searches |
GitHub | Public repositories |
GitLab | Public projects |
Show HN | Hacker News product & project launches |
Flathub | Linux desktop GUI applications |
F-Droid | Android open-source apps & utilities |
GNOME Extensions | Desktop shell extensions |
Homebrew | Curated CLI utilities & formulas |
AUR | Arch Linux tools, daemons, & scripts |
PyPI | Python packages & utilities |
Conda / Bioconda | Conda-forge & Bioconda packages |
CRAN / Bioconductor | R packages & bioinformatics libraries |
npm | JavaScript & TypeScript packages |
crates.io | Rust crates |
NuGet | .NET packages |
Hugging Face | AI models & pipelines |
Docker Hub | Public container images |
Maven Central | Java artifacts |
RubyGems | Ruby gems |
Packagist | PHP packages |
All added sources use public endpoints and do not require API keys. They are queried on a best-effort basis: if one source is unavailable or rate-limited, results from the other sources are still returned. A GitHub token is optional and only raises GitHub's search rate limit.
Quick Start & Installation
No API keys required to start.
1. Claude Code CLI
claude mcp add -s user reuse-before-generate -- npx -y reuse-before-generate2. Cursor, Claude Desktop, Antigravity, Windsurf, or VS Code
Add this to your mcpServers configuration (e.g. ~/.claude/mcp.json, ~/.gemini/antigravity-ide/mcp_config.json, or Cursor settings):
{
"mcpServers": {
"reuse-before-generate": {
"command": "npx",
"args": ["-y", "reuse-before-generate@latest"]
}
}
}Optional: Higher GitHub API Limits
You can optionally pass a GitHub token to raise GitHub's rate limits:
{
"mcpServers": {
"reuse-before-generate": {
"command": "npx",
"args": ["-y", "reuse-before-generate@latest"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}3. Run Directly in Terminal (CLI Mode)
You can run searches directly from your shell without an MCP client:
npx reuse-before-generate "terminal markdown viewer"
# or if cloned locally:
node index.js "gnome speech to text offline"4. Slash Command / Agent Skill
In supported AI coding assistants (Antigravity, Claude Code), you can invoke it directly via slash command:
/reuse-before-generate <project description or keywords>Related MCP server: idea-reality-mcp
🤖 Make It Automatic for AI Agents
To ensure your AI assistant checks for existing solutions before writing code, add this instruction to your CLAUDE.md, .cursorrules, GEMINI.md, or AGENTS.md:
Before scaffolding a new project or substantial new module from scratch:
1. Call `check_before_building` (or `reuse_before_generate`) from the `reuse-before-generate` MCP server.
2. Follow up with web search for existing commercial products or self-hosted tools as directed by the tool.
3. Present existing alternatives in a concise table and ask the user whether to reuse or extend an existing project instead of building from scratch.🤖 AI Disclosure
For details on how AI is used in this project, see What I delegate to AI and what I don't.
License
Available Tools
2 toolscheck_before_buildingA
Run before building from scratch. Searches GitHub, GitLab, npm, crates.io, NuGet, Hugging Face, Docker Hub, Maven Central, RubyGems, and Packagist across multiple query angles to find existing codebases, and provides targeted web search queries for finding commercial SaaS competitors.
Inputs: query, queries, keywords, description.
reuse_before_generateA
Run before building from scratch. Searches GitHub, GitLab, npm, crates.io, NuGet, Hugging Face, Docker Hub, Maven Central, RubyGems, and Packagist across multiple query angles to find existing codebases, and provides targeted web search queries for finding commercial SaaS competitors.
Inputs: query, queries, keywords, description.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
Both tools have identical descriptions and perform the exact same search across the same registries. There is no way for an agent to distinguish between them, making misselection certain.
Both names follow a snake_case verb_noun pattern, but the verbs 'check' and 'reuse' are synonyms in this context, and the nouns 'building' and 'generate' are also synonymous. The consistent pattern does not help because the semantics are essentially the same.
With only 2 tools that duplicate the same functionality, the server is severely under-scoped. A single tool would suffice, or the server should provide a broader set of distinct capabilities.
The server's entire surface is one search operation offered twice. There are no complementary tools (e.g., to process results, filter, or initiate generation), leaving the domain coverage incomplete and redundant.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Find, compare, and audit software for AI agents. Scored registry of tools and MCP servers.
Capability registry for the agentic economy. Semantic search over verified MCP server listings.
The official e18e MCP server keeping your agent in check from installing bloated dependencies.
Related MCP Servers
- MIT
- AlicenseAqualityCmaintenancePre-build reality check for AI coding agents. Scans GitHub, Hacker News, npm, PyPI & Product Hunt in parallel — returns a 0-100 reality signal with real competitor data.179 PyPI830MIT
- FlicenseAqualityDmaintenancePackage intelligence MCP server. Stops AI agents from installing hallucinated/malicious packages across 17 ecosystems. 22 tools, free, no auth.221-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that turns your AI assistant into a structured ideation partner by generating, scoring, critiquing, and storing software ideas locally with a built-in web dashboard.10 npm1PolyForm Noncommercial 1.0.0