Skip to main content
ClaudeWave
tylerscomic-lab avatar
tylerscomic-lab

regex-safety-audit-mcp

View on GitHub

ReDoS / catastrophic-backtracking detector MCP server, via real AST parsing — never executes the pattern itself

MCP ServersOfficial Registry0 stars0 forksJavaScriptMITUpdated today
Install in Claude Code / Claude Desktop
Method: Manual
Claude Code CLI
git clone https://github.com/tylerscomic-lab/regex-safety-audit-mcp
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "regex-safety-audit-mcp": {
      "command": "node",
      "args": ["/path/to/regex-safety-audit-mcp/dist/index.js"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
💡 Clone https://github.com/tylerscomic-lab/regex-safety-audit-mcp and follow its README for install instructions.
Use cases

MCP Servers overview

# regex-safety-audit-mcp

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Live on MCPize](https://img.shields.io/badge/Live%20on-MCPize-6d28d9)](https://mcpize.com/mcp/regex-safety-audit-mcp)

An MCP server that parses a regex into a real hand-written AST to detect catastrophic-backtracking (ReDoS) risk —
**without ever executing the pattern itself.** A ReDoS scanner that runs the regex it's scanning would be able to
hang itself; this one never calls `new RegExp(...).test()` on anything.

## What it catches

Nested unbounded quantifiers (`(a+)+`), ambiguous alternation inside a repeated group (`(a|ab)+`), and
backreferences — the three shapes behind almost every real-world ReDoS incident. Detection is structural (a real
parser, not regex-on-regex string heuristics), verified against the canonical literature examples during testing.

## The JS-specific trap

Generic ReDoS advice tells you to wrap the offending group in an atomic group or use a possessive quantifier.
**JavaScript has neither.** `analyze_redos_risk` says so explicitly, and `suggest_safe_rewrite` gives the actual
JS-safe fix (collapsing redundant nesting, or restructuring with a negated character class) instead of advice that
would 400 as a syntax error if you tried it.

## Tools

### `analyze_redos_risk`
Full structural analysis. Returns a risk level, every finding with its exact reason, and the JS atomic-group/
possessive-quantifier caveat.

### `generate_attack_string`
For a flagged pattern, generates candidate proof-of-concept inputs at a few sizes, plus a ready-to-run Node
snippet that times the match with a **hard OS-level subprocess timeout** — so testing a genuinely catastrophic
regex can't hang your own test process either.

### `suggest_safe_rewrite`
Concrete rewritten pattern for the mechanically-fixable shapes; honest "no mechanical fix, here's what to change by
hand" for the ones that aren't.

## Use it

**Hosted (recommended):** [MCPize](https://mcpize.com/mcp/regex-safety-audit-mcp) — free tier, $7/mo Pro.

**Self-host:**
```bash
npm install
node server.js
```

## Part of a small suite

[mcp-schema-audit-mcp](https://github.com/tylerscomic-lab/mcp-schema-audit-mcp),
[cron-schedule-audit-mcp](https://github.com/tylerscomic-lab/cron-schedule-audit-mcp),
[claude-cost-audit-mcp](https://github.com/tylerscomic-lab/claude-cost-audit-mcp).

## License

MIT
claudemcpmcp-servermodel-context-protocolredosregexsecurity

What people ask about regex-safety-audit-mcp

What is tylerscomic-lab/regex-safety-audit-mcp?

+

tylerscomic-lab/regex-safety-audit-mcp is mcp servers for the Claude AI ecosystem. ReDoS / catastrophic-backtracking detector MCP server, via real AST parsing — never executes the pattern itself It has 0 GitHub stars and was last updated today.

How do I install regex-safety-audit-mcp?

+

You can install regex-safety-audit-mcp by cloning the repository (https://github.com/tylerscomic-lab/regex-safety-audit-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is tylerscomic-lab/regex-safety-audit-mcp safe to use?

+

tylerscomic-lab/regex-safety-audit-mcp has not been audited yet by our security agent. Review the original repository on GitHub before using it in production.

Who maintains tylerscomic-lab/regex-safety-audit-mcp?

+

tylerscomic-lab/regex-safety-audit-mcp is maintained by tylerscomic-lab. The last recorded GitHub activity is from today, with 0 open issues.

Are there alternatives to regex-safety-audit-mcp?

+

Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.

Deploy regex-safety-audit-mcp 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.

Featured on ClaudeWave: tylerscomic-lab/regex-safety-audit-mcp
[![Featured on ClaudeWave](https://claudewave.com/api/badge/tylerscomic-lab-regex-safety-audit-mcp)](https://claudewave.com/repo/tylerscomic-lab-regex-safety-audit-mcp)
<a href="https://claudewave.com/repo/tylerscomic-lab-regex-safety-audit-mcp"><img src="https://claudewave.com/api/badge/tylerscomic-lab-regex-safety-audit-mcp" alt="Featured on ClaudeWave: tylerscomic-lab/regex-safety-audit-mcp" width="320" height="64" /></a>