npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jkumonpm/regex-tester-mcp

v1.0.2

Published

Regex Tester MCP server — test, explain, and template regular expressions

Readme

regex-tester-mcp

Regex Tester MCP server. Test, explain, and template regular expressions.

No shell. No external tools. Pure native RegExp.

Install

npm install -g regex-tester-mcp

Usage

Claude Desktop / Cursor / OpenCode

Add to your MCP config:

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

Tools

test_regex — Test Regex

Test a regular expression against a string. Returns all matches with capture groups.

Input:

{
  "pattern": "(\\d+)",
  "test_string": "abc123def456",
  "flags": "g"
}

Output:

{
  "pattern": "(\\d+)",
  "flags": "g",
  "test_string": "abc123def456",
  "match_count": 2,
  "matches": [
    { "match": "123", "groups": { "1": "123" }, "index": 3 },
    { "match": "456", "groups": { "1": "456" }, "index": 9 }
  ]
}

explain_regex — Explain Regex

Explain a regular expression in human-readable form.

Input:

{
  "pattern": "^\\d{3}-\\d{2}-\\d{4}$"
}

Output:

Regular expression: /^\d{3}-\d{2}-\d{4}$/

Breakdown:
  1. '^' — Matches the start of the string
  2. '\d' — Matches any digit (equivalent to [0-9])
  3. '{3}' — Quantifier: Matches exactly 3 times
  4. '-' — Literal character: '-'
  5. '\d' — Matches any digit (equivalent to [0-9])
  6. '{2}' — Quantifier: Matches exactly 2 times
  7. '-' — Literal character: '-'
  8. '\d' — Matches any digit (equivalent to [0-9])
  9. '{4}' — Quantifier: Matches exactly 4 times
  10. '$' — Matches the end of the string

regex_templates — Regex Templates

Get common regex templates. Optionally filter by category.

Input:

{
  "category": "validation"
}

Output:

{
  "count": 10,
  "category": "validation",
  "templates": [
    {
      "name": "email",
      "category": "validation",
      "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
      "description": "Email address",
      "example": "[email protected]"
    }
  ]
}

Built-in Templates

| Name | Category | Description | |------|----------|-------------| | email | validation | Email address | | url | validation | HTTP/HTTPS URL | | phone_tw | validation | Taiwan phone number | | phone_us | validation | US phone number | | ipv4 | validation | IPv4 address | | date_iso | validation | ISO date (YYYY-MM-DD) | | time_24h | validation | 24-hour time (HH:MM) | | hex_color | validation | Hex color code | | credit_card | validation | Credit card (Visa/MC/Amex) | | uuid | validation | UUID v4 | | html_tag | extraction | HTML tag extraction | | digits | extraction | Extract all digits | | words | extraction | Extract all words | | hashtags | extraction | Extract hashtags |

Design

| Feature | Why | |---------|-----| | Zero runtime deps | Only @modelcontextprotocol/sdk and zod | | Native RegExp | No external regex libraries needed | | Structured output | AI reads matches/groups precisely | | Human-readable explanations | Token-by-token breakdown | | 14 built-in templates | Common patterns ready to use |

License

MIT