Agent♥︎Age
Catalog

io.github.rog0x/regex

Official

by rog0x · TypeScript

Regex test, explain, replace patterns for AI agents

io.github.rog0x/regex MCP Server

This Model Context Protocol (MCP) server provides regex and text processing tools for AI agents. It supports testing patterns against text, performing regex-based replacements, extracting matches, and generating explanations for regex patterns.

🛠️ Key Features

  • Tools for regex testing, replacement, extraction, and explanation
  • Regex testing returns matches with indices, captured groups, and named groups
  • Regex replacement supports capture-group references ($1, $2, $&, $<name>)
  • Extraction can return structured arrays and optionally a specific capture group

🚀 Use Cases

  • Validate regex patterns on sample text before use
  • Apply standardized transformations via regex replacement
  • Pull specific entities or fields from text using capture groups
  • Produce human-readable breakdowns of regex patterns for agent workflows

⚡ Developer Benefits

  • Structured match outputs (indices, captured groups, named groups)
  • Capture-group reference support for deterministic replacements
  • Extraction produces structured arrays for downstream processing

⚠️ Limitations

  • The available documentation excerpt truncates the regex_explain tool details after “returns a”.

Topics

ai-agentsclaudemcpmodel-context-protocolregextext-processingtypescriptai-toolsdeveloper-toolsmcp-server