Regex Engine MCP - Test, Explain & Build Regex Patterns について
Regex Engine MCP は、AI アシスタントへの自然言語による依頼で、JavaScript の正規表現を作成、テスト、説明、置換、抽出できる開発者向けサービスです。
主な機能
- 01説明から正規表現を作成
- 02テキストに対するパターンのテスト
- 03正規表現を段階的に説明
- 04キャプチャグループを使った検索と置換
- 05一致テキストの抽出
活用シーン
- 01指定形式に合うパターンの作成
- 02コード中の正規表現の理解
- 03テキストから URL や電話番号を抽出
MCP 対応
MCP クライアントに、正規表現の作成、テスト、説明、置換、抽出のツールを提供します。
設定
リモートサーバーはインストール不要です。クライアントを選んで設定をコピーするか、ワンクリックで導入できます。
https://regex-engine-mcp.yagami8095.workers.dev/mcpclaude mcp add --transport http regex-engine https://regex-engine-mcp.yagami8095.workers.dev/mcp{"mcpServers":{"regex-engine":{"type":"http","url":"https://regex-engine-mcp.yagami8095.workers.dev/mcp"}}}Cursor で開く{"servers":{"regex-engine":{"type":"http","url":"https://regex-engine-mcp.yagami8095.workers.dev/mcp"}}}VS Code で開く{"mcpServers":{"regex-engine":{"type":"http","url":"https://regex-engine-mcp.yagami8095.workers.dev/mcp"}}}{"mcpServers":{"regex-engine":{"serverUrl":"https://regex-engine-mcp.yagami8095.workers.dev/mcp"}}}コマンドはターミナルで実行し、JSON は各クライアントの MCP 設定に貼り付けて再起動します。認可が必要なサーバーは初回接続時にログインを求めます。
ツール
詳細
Regex Engine MCP Server
EN: Build, test, and understand regular expressions using plain language through your AI assistant. 繁中: 用自然語言透過 AI 助手來建立、測試和理解正規表達式。 日本語: AIアシスタントを通じて自然言語で正規表現の作成、テスト、理解ができます。
What is this? Why do I need it?
- Regular expressions are powerful but notoriously hard to write. Most developers Google regex patterns every time they need one. This server lets you describe what you want in plain English -- like "match US phone numbers" -- and it builds a working regex for you.
- Reading someone else's regex feels like decoding hieroglyphics. The explain tool breaks down any regex into a step-by-step, human-readable explanation. No more guessing what
^(?:[a-z0-9]+(?:\.[a-z0-9]+)*)@actually means. - Testing regex in a separate tool breaks your workflow. Instead of switching to regex101.com, you can test patterns, extract matches, and do find-and-replace directly inside your AI assistant while you work.
Quick Install
Cursor (One Click)
Claude Desktop
Add to your MCP config file (claude_desktop_config.json):
{
"mcpServers": {
"regex-engine": {
"url": "https://regex-engine-mcp.yagami8095.workers.dev/mcp"
}
}
}
Smithery
npx @smithery/cli install @openclaw-ai/regex-engine-mcp
Tools
| Tool | What it does | Example prompt |
|---|---|---|
regex_test | Test a regex pattern against text and return all matches with positions | "Test if this string contains a valid email address" |
regex_explain | Explain any regex pattern in plain English, step by step | "Explain what this regex does: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$" |
regex_build | Build a regex from a natural language description | "Build a regex that matches dates in YYYY-MM-DD format" |
regex_replace | Find and replace using regex with capture group support | "Replace all dates from MM/DD/YYYY to YYYY-MM-DD in this text" |
regex_extract | Extract all matching substrings from text | "Extract all URLs from this paragraph" |
Copy-Paste Examples
Example 1: Build a regex from a description
Just say to your AI: "Build me a regex that matches email addresses and test it against this text: Contact us at [email protected] or [email protected] for help."
Example 2: Understand a regex you found in code
Just say to your AI: "Explain this regex I found in our codebase: (?:(?:\r\n)?[ \t])(?:(?:[-A-Za-z0-9!#$%&'+/=?^_`{|}~]+)"
Example 3: Extract data from unstructured text
Just say to your AI: "Extract all phone numbers from this text: Call us at (555) 123-4567 or 800-555-0199. International: +44 20 7946 0958"
Plans
| Plan | Cost | Calls |
|---|---|---|
| Free | $0 | 20/day |
| Pro | $29/mo | 50,000/month |
よくある質問
Q: 何かインストールする必要がありますか? A: いいえ。これは Cloudflare Workers 上で動作します。URL を AI クライアントの MCP 設定に追加すれば、すぐに使えます。依存関係も API キーも設定も不要です。
Q: どの正規表現の仕様を使用していますか? A: JavaScript の正規表現(ECMAScript)です。名前付きキャプチャグループ、先読み、標準的なすべてのフラグ(g、i、m、s、u)など、Web 開発者や一般的なプログラマーが必要とする機能の 99%をカバーしています。
Q: 再帰的なマッチングのような複雑なパターンにも対応できますか? A: JavaScript の正規表現がサポートするすべての機能に対応しています。非常に複雑なパターン(括弧の対応付けなど)については、ビルドツールが可能な限り最適な近似を生成し、制限事項を説明します。
リンク
ライセンス
MIT
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。