# Regex Test MCP

> Regex Test MCP is an open-source MCP server for developer tools. MCP server that tests JS regexes with the real engine, giving exact matches and offsets. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, self-hosted
- **Repository:** https://github.com/mukundakatta/mcp-stack/tree/HEAD/packages/regex-test-mcp
- **MCP Registry name:** io.github.MukundaKatta/regex-test-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

The README says Regex Test MCP gives AI clients three tools that run patterns through the actual JavaScript regex engine instead of having the model guess the result. Its test_regex tool reports whether a pattern matches, the match position, capture groups and named groups; find_all returns every non-overlapping match and is written to be safe with zero-width matches; replace returns the rewritten string and supports $1, $<name> and $& substitutions.

The package is published on npm as @mukundakatta/regex-test-mcp and runs over stdio. The README gives a Claude Desktop config example and notes that Cursor, Cline, Windsurf and Zed use the same shape.

It is aimed at developers and AI assistants that need to verify regex behaviour such as lookahead, anchors, Unicode escapes and nested group indices rather than trust a model's description of them.

## Features

- **Real engine matching:** Patterns are executed with the JavaScript regex engine so results follow its actual semantics.
- **Match offsets and groups:** test_regex returns the match, start and end positions, numbered groups and named groups.
- **Find all matches:** find_all lists every non-overlapping match and handles zero-width matches safely.
- **Regex-aware replace:** replace returns the new string and a flag saying whether anything changed, with $1, $<name> and $& support.
- **Stdio transport:** Runs as a local stdio server launched via npx with no environment variables required.

## Good for

- Checking whether a regex matches a sample string before using it in code
- Finding all occurrences of a pattern in text with exact positions
- Previewing a regex-based find-and-replace with named-group references
- Giving an AI assistant a reliable regex check instead of a guessed answer

## Install

### Claude Code (Terminal)

```sh
claude mcp add regex-test-mcp -- npx -y @mukundakatta/regex-test-mcp
```

### Claude Desktop (claude_desktop_config.json)

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

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

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

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

```json
{
  "servers": {
    "regex-test-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mukundakatta/regex-test-mcp"
      ]
    }
  }
}
```

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

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

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

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

## Tools

- `test_regex`: Tests a pattern against text and returns the first match with positions and groups.
- `find_all`: Returns all non-overlapping matches of a pattern in text.
- `replace`: Replaces matches in text, supporting $1, $<name> and $& substitutions.

## FAQ

### Which tools does the server provide?

Three tools: test_regex, find_all and replace.

### How is it installed with Claude Desktop?

The README gives a JSON config entry that launches the package with npx -y @mukundakatta/regex-test-mcp.

### Which licence applies?

The README states MIT OR Apache-2.0.

### Is Regex Test MCP free?

Yes. Regex Test MCP is open source, so you can use and self-host it for free.

### How do I add Regex Test MCP to Claude Code?

Run this command in your terminal: claude mcp add regex-test-mcp -- npx -y @mukundakatta/regex-test-mcp

### What are the best alternatives to Regex Test MCP?

The closest alternatives to Regex Test MCP are Regex Lab MCP, Regex Lab, Rexact, Test Shape MCP and Edit MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Regex Lab MCP](https://ai-powered.com/mcp/regex-lab-mcp): Regex Lab MCP is an open-source MCP server for developer tools.
- [Regex Lab](https://ai-powered.com/mcp/regex-lab): Regex Lab is an open-source MCP server for developer tools.
- [Rexact](https://ai-powered.com/mcp/rexact): Rexact is an open-source MCP server for developer tools.
- [Test Shape MCP](https://ai-powered.com/mcp/test-shape-mcp): Test Shape MCP is an open-source MCP server for developer tools.
- [Edit MCP](https://ai-powered.com/mcp/edit-mcp): Edit MCP is an open-source MCP server for developer tools.
- [Testing](https://ai-powered.com/mcp/testing): Testing is an open-source MCP server for developer tools.
- [Api Test MCP](https://ai-powered.com/mcp/api-test-mcp): Api Test MCP is an open-source MCP server for developer tools.
- [MCP Test Runner](https://ai-powered.com/mcp/mcp-test-runner): MCP Test Runner is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/regex-test-mcp
