Stop your AI agent from rebuilding what already exists. An opinionated MCP server that checks GitHub, npm and Python repos for maintained alternatives before you scaffold.
claude mcp add reuse-before-generate -- npx -y reuse-before-generate{
"mcpServers": {
"reuse-before-generate": {
"command": "npx",
"args": ["-y", "reuse-before-generate"]
}
}
}MCP Servers overview
# reuse-before-generate
[](https://www.npmjs.com/package/reuse-before-generate)
[](https://github.com/aradar46/reuse-before-generate/actions/workflows/ci.yml)
[](LICENSE)
[](https://glama.ai/mcp/servers/aradar46/reuse-before-generate)
**Your idea probably already exists. Find out before you build it, not after.**
Here is how it usually goes. You have an idea. You ask a frontier model
what it thinks, and it tells you the space is wide open and people would
love it. So you tell your agent to build it, and it writes thousands of
lines for something that already exists.
That happened to me. I kept hitting the same failing Android CI build,
waiting for a re-run, hitting it again. I thought: someone should be able
to pause the build and get a shell inside it. I asked an AI, it told me
this was a genuinely good idea, and I built
[fermata](https://github.com/aradar46/fermata).
Then I found `action-tmate`. 3,566 stars. Does exactly that. Has for years.
This server is the check I wish I'd run. Ask your agent to build something
and it looks first:
> Before building — this already exists:
>
> 1. **action-tmate** (3,566★, updated today) — "Debug your GitHub Actions
> via SSH by using tmate to get access to the runner system itself."
>
> Actively maintained and widely used. Want to try it, or is there
> something yours would do differently?
Sometimes the answer really is "mine is different, keep going." Sometimes
it saves you a weekend. Either way you find out in ten seconds instead of
after.
Why bother: fewer wasted hours, fewer abandoned projects nobody uses, and
less energy burned generating code that already exists. Jenna Pederson put
the general case well in [*You Can Build It, But Should
You?*](https://dev.to/jennapederson/you-can-build-it-should-you-9e0) — AI
removed the friction that used to force you to ask whether something is
worth building at all.
For the record, this tool did not survive its own test either!
But I had to build it to find out. Hopefully it will prevent me from doing it again.
## Install
No API key. No account. Nothing to configure.
```bash
claude mcp add reuse-before-generate -- npx -y reuse-before-generate
```
Then start a **new** session and try it on an idea of your own — the one
you were about to build.
Or add it to `.mcp.json` yourself — this works in Cursor, Claude Desktop,
and any other MCP client:
```json
{
"mcpServers": {
"reuse-before-generate": {
"command": "npx",
"args": ["-y", "reuse-before-generate"]
}
}
}
```
**Optional but recommended:** add a GitHub token. Without one, GitHub limits
you to 10 searches a minute; with one, 30.
```json
{
"mcpServers": {
"reuse-before-generate": {
"command": "npx",
"args": ["-y", "reuse-before-generate"],
"env": { "GITHUB_TOKEN": "ghp_your_token_here" }
}
}
}
```
### Running from source
```bash
git clone https://github.com/aradar46/reuse-before-generate
cd reuse-before-generate
npm install && npm run build
claude mcp add reuse-before-generate -- node "$PWD/dist/index.js"
```
## Make it automatic
By default your agent only checks when you ask it to. To make it check
every time, paste this into your `CLAUDE.md` (or `.cursorrules`):
```markdown
Before scaffolding a new project or a substantial new module, call
`check_before_building` first. If it finds a maintained alternative that
really does the job, tell me about it and ask whether to extend that
instead of building from scratch.
```
That one paragraph is the whole point of the tool. Without it, the check
only happens when you remember to ask.
## Does it actually work?
It's measured, not vibes. There are 12 test cases with known right answers
— "find `gitleaks` from a description of a secret scanner", that sort of
thing — and the search is scored on what position the right answer comes
back at.
Current scores:
| | |
|---|---|
| Found the right tool in the top 10 | **11 of 11** |
| Found it in the top 5 | 10 of 11 |
| Made something up when nothing existed | never |
The last row matters most. A tool that reports matches for everything is
useless, so one test case describes something no real tool does. It
correctly returns nothing.
Details, including where it still fails, are in
**[docs/findings.md](docs/findings.md)**.
## Settings
There's one setting worth knowing about: **`GITHUB_TOKEN`**. Without it
GitHub allows 10 searches a minute, with it 30. Set it in the `env` block
shown in [Install](#install).
It also keeps a local count of its own usage in
`~/.reuse-before-generate/events.jsonl` — a random ID, a timestamp, and how
many results came back. Nothing is sent anywhere. See
[local state](docs/how-it-works.md#local-state) to read or disable it, and
[all environment variables](docs/how-it-works.md#environment-variables) for
the rest.
## Where it still falls short
Honest list, because you'll hit these:
- **Bad search terms miss real tools.** If you describe a JSON viewer as a
"pretty-printer", it may find nothing — real ones call themselves
"viewers". The agent is told to think about how a maintainer would
describe their own tool, but it doesn't always get it right.
- **Very small or oddly-named repos are hard to find.** GitHub's own search
buries them. There's a dedicated search lane for this and it helps, but
doesn't fully solve it.
- **"Maintained" just means "touched in the last year."** It doesn't check
whether issues get answered or whether the project is actually healthy.
All measured and written up in [docs/findings.md](docs/findings.md).
## More
- [How it works](docs/how-it-works.md) — the pipeline, and why the server
never calls an LLM itself
- [Findings](docs/findings.md) — what's been measured, and what's still broken
- [Contributing](docs/how-it-works.md#development) — tests, local CLI, eval
## License
MIT
What people ask about reuse-before-generate
What is aradar46/reuse-before-generate?
+
aradar46/reuse-before-generate is mcp servers for the Claude AI ecosystem. Stop your AI agent from rebuilding what already exists. An opinionated MCP server that checks GitHub, npm and Python repos for maintained alternatives before you scaffold. It has 3 GitHub stars and was last updated today.
How do I install reuse-before-generate?
+
You can install reuse-before-generate by cloning the repository (https://github.com/aradar46/reuse-before-generate) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is aradar46/reuse-before-generate safe to use?
+
aradar46/reuse-before-generate has not been audited yet by our security agent. Review the original repository on GitHub before using it in production.
Who maintains aradar46/reuse-before-generate?
+
aradar46/reuse-before-generate is maintained by aradar46. The last recorded GitHub activity is from today, with 0 open issues.
Are there alternatives to reuse-before-generate?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy reuse-before-generate to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/aradar46-reuse-before-generate)<a href="https://claudewave.com/repo/aradar46-reuse-before-generate"><img src="https://claudewave.com/api/badge/aradar46-reuse-before-generate" alt="Featured on ClaudeWave: aradar46/reuse-before-generate" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface