regex-toolkit-api
Enables regex testing, replacement, splitting, validation, explanation, escaping, common patterns, and benchmarking through an MCP server.
README
<p align="center"><img src="logo.png" width="120" alt="logo"></p>
regex-toolkit-api
⭐ Building in public from $0 MRR. Star if you want to follow the journey — lazymac-mcp (42 tools, one MCP install) · lazymac-k-mcp (Korean wedge) · lazymac-sdk (TS client) · api.lazy-mac.com · Pro $29/mo.
🚀 Want all 42 lazymac tools through ONE MCP install?
npx -y @lazymac/mcp· Pro $29/mo for unlimited calls.
Regex testing, explanation, and generation REST API + MCP server. No external APIs required.
Quick Start
npm install
npm start # REST API on http://localhost:4200
npm run mcp # MCP server (stdin/stdout)
REST API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Health check / API info |
| POST | /api/v1/test |
Test regex against text (matches, groups, indices) |
| POST | /api/v1/replace |
Replace using regex |
| POST | /api/v1/split |
Split text with regex |
| POST | /api/v1/validate |
Validate regex syntax |
| GET | /api/v1/patterns |
List common regex patterns |
| GET | /api/v1/patterns/:name |
Get specific pattern (email, url, phone, ipv4, etc.) |
| POST | /api/v1/explain |
Explain regex in plain English |
| POST | /api/v1/escape |
Escape special regex characters |
| POST | /api/v1/benchmark |
Benchmark regex performance |
Examples
Test a regex
curl -X POST http://localhost:4200/api/v1/test \
-H 'Content-Type: application/json' \
-d '{"pattern": "(\\d+)", "text": "abc 123 def 456", "flags": "g"}'
Explain a regex
curl -X POST http://localhost:4200/api/v1/explain \
-H 'Content-Type: application/json' \
-d '{"pattern": "^[a-z]+\\d{2,4}$", "flags": "i"}'
Get a common pattern
curl http://localhost:4200/api/v1/patterns/email
Common Patterns Library
email, url, phone, ipv4, ipv6, date_iso, date_us, credit_card, hex_color, uuid, mac_address, slug, semver, jwt, html_tag, username, strong_password
MCP Server
Add to your Claude Desktop config:
{
"mcpServers": {
"regex-toolkit": {
"command": "node",
"args": ["/path/to/regex-toolkit-api/src/mcp-server.js"]
}
}
}
MCP Tools
regex_test— Test regex with full match detailsregex_replace— Regex replaceregex_split— Split by regexregex_validate— Validate syntaxregex_explain— Plain English explanationregex_escape— Escape special charactersregex_patterns— Common patterns libraryregex_benchmark— Performance benchmark
Docker
docker build -t regex-toolkit-api .
docker run -p 4200:4200 regex-toolkit-api
License
MIT
<sub>💡 Host your own stack? <a href="https://m.do.co/c/c8c07a9d3273">Get $200 DigitalOcean credit</a> via lazymac referral link.</sub>
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.