Regex Lab MCP
Test, explain and replace regex patterns from your AI assistant or IDE
- Pricing
- Open source
- Platforms
- CLI, API
- Runs
- Locally
- Version
- 1.0.2
- Listing updated
- today
Similar MCP servers
About Regex Lab MCP
Regex Lab MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
Regex Lab is a small MCP server that gives an AI client tools for working with regular expressions. The README describes it as a way to avoid switching to a separate regex tester: you ask the assistant to run a pattern against a string and it returns the matches along with their positions and capture groups.
The server is published on npm and runs over stdio, so it is started locally by the client through npx. The README shows configuration for Claude Desktop, Cursor and Windsurf. It exposes three tools: one for testing a pattern, one for find-and-replace, and one for checking whether a pattern is syntactically valid.
It suits developers who write or debug patterns inside their editor or chat assistant and want quick feedback without leaving the workflow. It is MIT licensed and part of a larger set of MCP servers from the same author.
Install
Run in a terminal
claude mcp add regex-lab-mcp -- npx -y regex-lab-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"regex-lab-mcp": {
"command": "npx",
"args": [
"-y",
"regex-lab-mcp"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"regex-lab-mcp": {
"command": "npx",
"args": [
"-y",
"regex-lab-mcp"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"regex-lab-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"regex-lab-mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"regex-lab-mcp": {
"command": "npx",
"args": [
"-y",
"regex-lab-mcp"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"regex-lab-mcp": {
"command": "npx",
"args": [
"-y",
"regex-lab-mcp"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
Tools this server provides (3)
Taken from the project documentation; the running server may differ.
- test_regex
- Test a regex pattern against a string and return all matches with positions and capture groups.
- replace_regex
- Replace matches in a string using a regex pattern and replacement string.
- validate_regex
- Check if a regex pattern is syntactically valid.
What it does
- Pattern testing
- Runs a regex against input text and returns all matches with positions and capture groups.
- Find and replace
- Applies a regex and replacement string to a text and returns the result.
- Syntax validation
- Checks whether a regex pattern is syntactically valid before it is used.
- Local stdio setup
- Runs locally via npx and connects to common MCP clients through a JSON configuration entry.
Good for
- Debugging a regex pattern while working in an AI-enabled editor
- Checking capture groups and match positions for a sample string
- Previewing find-and-replace results before applying them to code or data
- Validating a pattern's syntax before adding it to a codebase
Pricing
Open source
Free and open source under MIT.
Regex Lab MCP FAQ
What license is Regex Lab MCP released under?
The README states the project is licensed under MIT.
How do I install it?
The README shows running it with npx regex-lab-mcp, and gives a JSON configuration snippet for Claude Desktop, Cursor and Windsurf that launches it with npx -y.
How many tools does it provide?
The README lists three tools: test_regex, replace_regex and validate_regex.
Is Regex Lab MCP free?
Yes. Regex Lab MCP is open source, so you can use and self-host it for free.
How do I add Regex Lab MCP to Claude Code?
Run this command in your terminal: claude mcp add regex-lab-mcp -- npx -y regex-lab-mcp
What are the best alternatives to Regex Lab MCP?
The closest alternatives to Regex Lab MCP are Regex Lab, Slop Patterns, Rexact, Edit MCP and Mobai 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.
