🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@mukundakatta/regex-test-mcp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mukundakatta/regex-test-mcp

MCP server for trustworthy regex testing. Returns real match offsets, group dicts, and full vs partial matches.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@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

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

Same shape for Cursor / Cline / Windsurf / Zed.

License

MIT OR Apache-2.0.

Keywords

mcp

FAQs

Package last updated on 10 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts