Reuse Before Generate

Official registry Developer tools

Checks whether your idea already exists before your agent builds it. Searches GitHub, npm, Python.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package reuse-before-generate
Claude Code
claude mcp add reuse-before-generate -e 'GITHUB_TOKEN=<your github_token>' -- npx -y reuse-before-generate@0.2.3
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "reuse-before-generate": {
            "command": "npx",
            "args": [
                "-y",
                "reuse-before-generate@0.2.3"
            ],
            "env": {
                "GITHUB_TOKEN": "<your github_token>"
            }
        }
    }
}

Environment variables

  • GITHUB_TOKEN secret Optional GitHub token. Raises the search rate limit from 10 requests/minute to 30.

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. reuse-before-generate
  2. Quick Start & Installation
  3. 🤖 Make It Automatic for AI Agents
  4. 🤖 AI Disclosure
  5. License

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:

SourceWhat it searches
GitHubPublic repositories
GitLabPublic projects
Show HNHacker News product & project launches
FlathubLinux desktop GUI applications
F-DroidAndroid open-source apps & utilities
GNOME ExtensionsDesktop shell extensions
HomebrewCurated CLI utilities & formulas
AURArch Linux tools, daemons, & scripts
PyPIPython packages & utilities
Conda / BiocondaConda-forge & Bioconda packages
CRAN / BioconductorR packages & bioinformatics libraries
npmJavaScript & TypeScript packages
crates.ioRust crates
NuGet.NET packages
Hugging FaceAI models & pipelines
Docker HubPublic container images
Maven CentralJava artifacts
RubyGemsRuby gems
PackagistPHP 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-generate

2. 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>

🤖 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

MIT

Frequently asked questions

What is Reuse Before Generate?

Checks whether your idea already exists before your agent builds it. Searches GitHub, npm, Python.

How do I install Reuse Before Generate?

It runs on your machine. In Claude Code: claude mcp add reuse-before-generate -e 'GITHUB_TOKEN=<your github_token>' -- npx -y reuse-before-generate@0.2.3. For other clients, paste the JSON configuration from this page into their MCP settings.

Does Reuse Before Generate need an API key?

Yes. It expects GITHUB_TOKEN, which you set in its configuration.

Is Reuse Before Generate open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains Reuse Before Generate?

It is published by aradar46. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.