
Regex
Adds five regex and text processing tools directly to Claude: test patterns with match indices and capture groups, replace with backreferences, extract matches as structured arrays, and get human-readable explanations of regex syntax. The text_transform tool handles case conversions (camelCase, snake_case, PascalCase, kebab-case), line operations (deduplicate, sort, remove blanks), and basic transformations like trim and reverse, with support for chaining multiple operations. Useful when you're parsing logs, cleaning data, or prototyping text manipulation without switching contexts to a regex tester or writing throwaway scripts. Runs locally via Node.js with stdio transport.
- tools
- 5
- transport
- STDIO
- last updated
- Mar 22, 2026
Tools
5 toolsPublic tool metadata for what this MCP can expose to an agent.
regex_testTest a regex pattern against text. Returns all matches with indices, captured groups, and named groups.
Test a regex pattern against text. Returns all matches with indices, captured groups, and named groups.
No parameter schema in public metadata yet.
regex_replaceFind and replace using regex with support for capture group references ($1, $2, $&, $<name>).
Find and replace using regex with support for capture group references ($1, $2, $&, $<name>).
No parameter schema in public metadata yet.
regex_extractExtract all matches of a pattern from text as a structured array. Optionally return only a specific capture group.
Extract all matches of a pattern from text as a structured array. Optionally return only a specific capture group.
No parameter schema in public metadata yet.
regex_explainParse a regex pattern and return a human-readable explanation of each component and flag.
Parse a regex pattern and return a human-readable explanation of each component and flag.
No parameter schema in public metadata yet.
text_transformApply common text transformations: camelCase, snake_case, kebab-case, PascalCase, UPPER, lower, title case, reverse, trim, deduplicate lines, sort lines, remove blank lines, count words/chars/lines. Chain multiple transforms in one call.
Apply common text transformations: camelCase, snake_case, kebab-case, PascalCase, UPPER, lower, title case, reverse, trim, deduplicate lines, sort lines, remove blank lines, count words/chars/lines. Chain multiple transforms in one call.
No parameter schema in public metadata yet.
Sponsors
Readme
mcp-regex-tools
Regex and text processing tools for AI agents via the Model Context Protocol (MCP).
Tools
| Tool | Description |
|---|---|
regex_test | Test a regex pattern against text. Returns all matches with indices, captured groups, and named groups. |
regex_replace | Find and replace using regex with support for capture group references ($1, $2, $&, $<name>). |
regex_extract | Extract all matches of a pattern from text as a structured array. Optionally return only a specific capture group. |
regex_explain | Parse a regex pattern and return a human-readable explanation of each component and flag. |
text_transform | Apply common text transformations: camelCase, snake_case, kebab-case, PascalCase, UPPER, lower, title case, reverse, trim, deduplicate lines, sort lines, remove blank lines, count words/chars/lines. Chain multiple transforms in one call. |
Setup
npm install
npm run build
Usage with Claude Desktop
Add this to your Claude Desktop config file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Details
- Repository
- github.com/rog0x/mcp-regex-tools
- Package
@rog0x/mcp-regex-tools- Transport
- STDIO
- Registry
- MCP registry, active