Regex Test Mcp

io.github.MukundaKattaPublished by GitHub account MukundaKattav0.1.0Updated Oct 24, 2026

Trustworthy JS regex testing. Real offsets, named groups, safe against zero-width loops.

VerifiedSTDIODesktop onlyDeveloper Tools

Overview

AI-generated overview

Local MCP server that runs JavaScript regex patterns through the real JS engine, returning exact match offsets, groups and replace results.

What you can do
  • Test a pattern against text and get matched status, first match, start and end offsets, capture groups and named groups
  • Find all non-overlapping matches, always global and safe against zero-width loops
  • Apply replacements with $1, $ and $& syntax and get the new string plus a replaced flag
  • Rely on actual JS semantics for lookahead, anchors, named groups and Unicode escapes instead of model guesses
When to use it
Useful when an assistant needs to verify regex behavior rather than describe it from memory: checking whether a pattern matches, getting correct group indices for nested captures, or confirming replacement output before it goes into code.
Requirements
Runs as a local stdio process, typically launched with npx from the npm package @mukundakatta/regex-test-mcp, so Node.js and network access for the first install are needed. No authentication, environment variables or headers are declared.
Before you install
The tools only evaluate patterns against text supplied to them and do not modify files, but the pattern and text are passed to the local server process, so avoid sending secrets or sensitive data in them. Installing via npx pulls the package from npm at run time.

Installation

In SourceWeft

  1. Open Regex Test Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@mukundakatta/regex-test-mcp

MCP server for trustworthy regex testing. Three tools: test_regex, find_all, replace. All use the actual JS regex engine, so you get exact semantics for lookahead, anchors, named groups, and Unicode escapes.

Why this exists

LLMs reliably hallucinate regex behavior. Common ways they're wrong:

  • Confidently stating a pattern matches when it doesn't (or vice versa)
  • Wrong group indices when there are nested capture groups
  • Forgetting that . excludes newlines without the s flag
  • Hand-rolling replace results that miss edge cases ($& semantics, named-group syntax)

Routing the actual test through this MCP server avoids all of those.

Tools

ToolReturns
test_regex(pattern, text, flags?){matched, match, start, end, groups, named_groups} for the first match
find_all(pattern, text, flags?)All non-overlapping matches (always behaves as g); zero-width safe
replace(pattern, text, replacement, flags?)New string + replaced boolean; supports $1, $<name>, $&

Install — Claude Desktop

json
{  "mcpServers": {    "regex-test": { "command": "npx", "args": ["-y", "@mukundakatta/regex-test-mcp"] }  }}

Same shape for Cursor / Cline / Windsurf / Zed.

License

MIT OR Apache-2.0.

Source: packages/regex-test-mcp/README.md at commit 6fad5bb

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts