mcpField
R
Rexact

Rexact

Local
rexact.devDeveloper Tools0Updated 2w ago

About Rexact

Rexact is an MCP server for testing, analyzing and explaining regular expressions, with ReDoS checks and engine compatibility reports. Four tools work offline; regex generation requires an Anthropic API key.

Key features

  1. 01Verify patterns against test cases
  2. 02Check patterns for ReDoS risk
  3. 03Explain regex tokens
  4. 04Find engine compatibility issues
  5. 05Generate verified regex patterns

Use cases

  1. 01Test patterns against example inputs
  2. 02Assess patterns for ReDoS risk
  3. 03Understand complex regex syntax
  4. 04Check compatibility across engines

MCP support

Rexact exposes five regex tools to MCP clients: verification, ReDoS analysis, explanation, compatibility checks and generation. The first four work offline; generation requires an Anthropic API key.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"nicolasmar91-rexact": {
"command": "npx",
"args": [
"-y",
"rexact-mcp"
],
"env": {
"ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
}
}
}
}
Run commandnpx -y rexact-mcp
Environment variables to set
ANTHROPIC_API_KEYSecretOptional. Only needed by the generate_regex tool; the four other tools work offline without it.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmrexact-mcp0.1.2

Tools

5

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
casesarrayYesTest cases to run the pattern against.
flagsstringNoJavaScript regex flags, e.g. "gi".
patternstringYesThe regex source, without delimiters.

Details

From the project README

rexact-mcp

Serveur MCP (Model Context Protocol) pour Rexact — vérification, analyse ReDoS, explication et compatibilité multi-moteurs de regex, adossées à @rexact/core (le même moteur déterministe que le site).

Quatre des cinq outils fonctionnent hors ligne, sans clé API, sans coût :

OutilEntréeSortie
verify_regexpattern, flags, casesCorpusReport
check_redospattern, flagsRedosVerdict
explain_regexpattern, flags, localeExplainToken[]
check_compatpattern, flags, targetsCompatIssue[]
generate_regexdescription, cases, flavormotif vérifié — nécessite ANTHROPIC_API_KEY

Aucune regex fournie n'est jamais exécutée en dehors d'un bac à sable worker_threads avec timeout dur et terminaison forcée (invariant I2 du dépôt) — jamais un new RegExp().test() direct côté serveur.

Installation locale (transport stdio)

Le plus simple pour un client MCP comme Claude Desktop : coller ce bloc dans sa configuration MCP.

{
  "mcpServers": {
    "rexact": {
      "command": "npx",
      "args": ["-y", "rexact-mcp"]
    }
  }
}

Pour activer generate_regex (facultatif), ajouter votre propre clé Anthropic — c'est votre clé, à votre coût, jamais le quota gratuit du site :

{
  "mcpServers": {
    "rexact": {
      "command": "npx",
      "args": ["-y", "rexact-mcp"],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-..."
      }
    }
  }
}

Transport HTTP streamable

Pour héberger le serveur (auto-hébergement, réseau interne) :

pnpm --filter rexact-mcp build
PORT=3300 pnpm --filter rexact-mcp start:http

Le serveur écoute sur / (POST pour ouvrir une session et envoyer des requêtes, GET pour le flux SSE d'une session existante). L'en-tête mcp-session-id, renvoyé à l'initialisation, identifie la session sur les requêtes suivantes.

Développement

pnpm --filter rexact-mcp dev      # rebuild à chaque changement
pnpm --filter rexact-mcp typecheck

Liens

Page d'accueil, exemples et installation par client : https://rexact.dev/fr/mcp (EN : https://rexact.dev/en/mcp). Licence : MIT.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.