Rexact
v0.1.2Verify, explain and audit regexes (ReDoS, engine compatibility) offline.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
verify_regex Verify a regex against test cases
Runs a regular expression against a set of test cases in a sandboxed worker (never on the calling process) and returns a pass/fail report. Offline, no API key required.
| Parameter | Type | Description |
|---|---|---|
cases * | array | Test cases to run the pattern against. |
pattern * | string | The regex source, without delimiters. |
flags | string | JavaScript regex flags, e.g. "gi". |
check_redos Check a regex for catastrophic backtracking (ReDoS)
Statically and dynamically analyzes a pattern for ReDoS risk — never executes it against user-supplied input. Offline, no API key required.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | The regex source, without delimiters. |
flags | string | JavaScript regex flags, e.g. "gi". |
explain_regex Explain a regex token by token
Breaks a pattern down into an ordered list of tokens (anchors, groups, quantifiers...) with a plain-language explanation for each. Offline, no API key required.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | The regex source, without delimiters. |
flags | string | JavaScript regex flags, e.g. "gi". |
locale | string | Language for the plain-text explanation. |
check_compat Check cross-engine regex compatibility
Reports syntax and semantic differences when a pattern is ported from its source flavor to one or more target engines (PCRE, RE2, Python, Java, .NET, POSIX grep). Offline, no API key required.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | The regex source, without delimiters. |
targets * | array | Engines to check compatibility against. |
flags | string | JavaScript regex flags, e.g. "gi". |
sourceFlavor | string | The flavor the pattern was authored for. Not in SPEC-TECHNIQUE.md's input list for this tool — added because checkCompat() requires it; defaults to "js". |
generate_regex Generate a regex from a natural-language description
Asks an LLM to draft a pattern from a description and test cases, then deterministically verifies it (compile, corpus, ReDoS) before returning it — never returns unverified model output. Requires ANTHROPIC_API_KEY in the MCP server's own environment (your own key, your own cost).
| Parameter | Type | Description |
|---|---|---|
cases * | array | Test cases the generated pattern must satisfy. |
description * | string | Natural-language description of the pattern to generate. |
flavor * | string | Target regex flavor for the generated pattern. |