Rexact
Verify, explain and audit regexes for ReDoS and engine compatibility, offline
- Pricing
- Open source
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 0.1.2
- Listing updated
- 1 day ago
About Rexact
Rexact is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
Rexact's server gives an assistant the same deterministic regex engine used on rexact.dev, so a pattern is tested instead of trusted. Five tools cover testing against must-match and must-not-match cases with a score, detecting ReDoS-prone patterns with a string that demonstrates the problem, explaining a regex piece by piece in French or English, showing what breaks in other engines such as RE2, PCRE, Python or Go, and generating a verified regex from a description.
Four tools run offline with no key. Only generate_regex calls a model, using your own Anthropic key at your cost. The README says no supplied regex runs outside a worker_threads sandbox with a hard timeout, rather than a direct RegExp test on the server.
It needs Node.js 20 or later and runs over stdio via npx rexact-mcp. A streamable HTTP mode exists for self-hosting. The code is MIT licensed.
Install
Run in a terminal
claude mcp add rexact-mcp --env ANTHROPIC_API_KEY='<ANTHROPIC_API_KEY>' -- npx -y rexact-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"rexact-mcp": {
"command": "npx",
"args": [
"-y",
"rexact-mcp"
],
"env": {
"ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"rexact-mcp": {
"command": "npx",
"args": [
"-y",
"rexact-mcp"
],
"env": {
"ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"rexact-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"rexact-mcp"
],
"env": {
"ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"rexact-mcp": {
"command": "npx",
"args": [
"-y",
"rexact-mcp"
],
"env": {
"ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"rexact-mcp": {
"command": "npx",
"args": [
"-y",
"rexact-mcp"
],
"env": {
"ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
}
}
}
}Configuration
ANTHROPIC_API_KEYOptional. Only needed by the generate_regex tool; the four other tools work offline without it.
Tools this server provides (5)
Taken from the project documentation; the running server may differ.
- verify_regex
- Tests a regex against should-match and should-not-match cases and returns a score.
- check_redos
- Detects ReDoS-vulnerable regexes with a proving string.
- explain_regex
- Explains a regex piece by piece in French or English.
- check_compat
- Shows what breaks in other regex engines.
- generate_regex
- Generates a verified regex from a description using your Anthropic key.
What it does
- Case-based verification
- Test a regex against cases that should and should not match.
- ReDoS detection
- Find catastrophic-backtracking patterns with a proving string.
- Piece-by-piece explanation
- Explain a pattern in French or English.
- Engine compatibility
- See what breaks in RE2, PCRE, Python, Go and others.
- Optional generation
- Generate a verified regex using your own Anthropic key.
- Sandboxed execution
- Patterns run in a worker thread with a hard timeout.
Good for
- Check a ZIP-code regex against failing cases
- Audit a pattern for ReDoS before shipping
- Port a PCRE pattern to Go or RE2
- Understand an inherited regex
Pricing
Open source
Free and MIT licensed; generate_regex uses your own Anthropic key
Prices change. Check rexact.dev before you buy.
Rexact FAQ
Does it send my regex anywhere?
The first four tools work offline and send nothing to Rexact.
Do I need a key?
Only for generate_regex, which uses your own Anthropic key.
What do I need to run it?
Node.js 20 or later.
What licence is it under?
MIT.
Is Rexact free?
Yes. Rexact is open source, so you can use and self-host it for free.
How do I add Rexact to Claude Code?
Run this command in your terminal: claude mcp add rexact-mcp --env ANTHROPIC_API_KEY='<ANTHROPIC_API_KEY>' -- npx -y rexact-mcp
What are the best alternatives to Rexact?
The closest alternatives to Rexact are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to Rexact

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools