{
  "markdown": "\n# mcp-regex-tools\n\nRegex and text processing tools for AI agents via the Model Context Protocol (MCP).\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `regex_test` | Test a regex pattern against text. Returns all matches with indices, captured groups, and named groups. |\n| `regex_replace` | Find and replace using regex with support for capture group references (`$1`, `$2`, `$&`, `$<name>`). |\n| `regex_extract` | Extract all matches of a pattern from text as a structured array. Optionally return only a specific capture group. |\n| `regex_explain` | Parse a regex pattern and return a human-readable explanation of each component and flag. |\n| `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. |\n\n## Setup\n\n```bash\nnpm install\nnpm run build\n```\n\n## Usage with Claude Desktop\n\nAdd this to your Claude Desktop config file:\n\n- **Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"regex-tools\": {\n      \"command\": \"node\",\n      \"args\": [\"D:/products/mcp-servers/mcp-regex-tools/dist/index.js\"]\n    }\n  }\n}\n```\n\n## Usage with Claude Code\n\n```bash\nclaude mcp add regex-tools node D:/products/mcp-servers/mcp-regex-tools/dist/index.js\n```\n\nOr add to your `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"regex-tools\": {\n      \"command\": \"node\",\n      \"args\": [\"D:/products/mcp-servers/mcp-regex-tools/dist/index.js\"]\n    }\n  }\n}\n```\n\n## Examples\n\n### Test a regex\n\n```\nregex_test({ pattern: \"(\\\\d{4})-(\\\\d{2})-(\\\\d{2})\", text: \"Today is 2026-03-19 and tomorrow is 2026-03-20\" })\n```\n\n### Replace with capture groups\n\n```\nregex_replace({ pattern: \"(\\\\w+)\\\\s(\\\\w+)\", replacement: \"$2 $1\", text: \"hello world\" })\n```\n\n### Extract matches\n\n```\nregex_extract({ pattern: \"[\\\\w.]+@[\\\\w.]+\", text: \"Contact us at info@example.com or support@example.com\" })\n```\n\n### Explain a regex\n\n```\nregex_explain({ pattern: \"^(?:https?://)?(?:www\\\\.)?([\\\\w-]+)\\\\.\\\\w{2,}$\", flags: \"i\" })\n```\n\n### Transform text\n\n```\ntext_transform({ text: \"hello world example\", transforms: [\"PascalCase\"] })\ntext_transform({ text: \"some text\\nwith\\nlines\\nwith\\nduplicates\\nlines\", transforms: [\"deduplicate_lines\", \"sort_lines\"] })\n```\n\n## License\n\nMIT\n",
  "bytes": 2451,
  "sha": "6f186ce41994513c307947e0ca82c71cafa60f3459d748dcb0b9dcb9f99da7b4",
  "repo_slug": "rog0x/mcp-regex-tools",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_rog0x_regex_c8931f46/readme"
}