# Rexact

> Rexact is an open-source MCP server for developer tools. Verify, explain and audit regexes for ReDoS and engine compatibility, offline. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://rexact.dev/en/mcp
- **Repository:** https://github.com/nicolasmar91/rexact-mcp/tree/HEAD/apps/mcp
- **MCP Registry name:** io.github.Nicolasmar91/rexact-mcp
- **Categories:** developer tools, security
- **Listing updated:** 2026-11-16

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
claude mcp add rexact-mcp --env ANTHROPIC_API_KEY='<ANTHROPIC_API_KEY>' -- npx -y rexact-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "rexact-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "rexact-mcp"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "rexact-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "rexact-mcp"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "rexact-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "rexact-mcp"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "rexact-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "rexact-mcp"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "rexact-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "rexact-mcp"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
      }
    }
  }
}
```

## Tools

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

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/rexact
