
regexcronsql-validator
io.github.encodiPublished by GitHub account encodiv1.0.0Updated Oct 24, 2026
Valida regex, cron y SQL contra ejecucion real. Pago por llamada via x402/USDC.
Overview
Remote MCP server that validates regular expressions, cron expressions and Postgres SQL by actually running them, charging a small USDC fee per call.
- What you can do
- Run a JavaScript regular expression against a list of test strings and see which match and which do not. Compute the next real execution times of a cron expression from a given date. Execute a Postgres-dialect SQL query against in-memory test tables you supply and return the resulting rows. Each call is self-contained: no database, no persistent state, and test tables are rebuilt and discarded every time.
- When to use it
- Useful when you want an assistant to check a regex, cron schedule or SQL query against real execution instead of guessing, for example before shipping a pattern or a query. Best for occasional, one-off checks where a per-call fee is acceptable.
- Requirements
- A remote Streamable HTTP endpoint; no API key or account is needed. Each tool call must be paid in USDC on Base mainnet via x402, so the client needs an x402-aware MCP client with its own funded wallet and private key to sign payments.
Installation
In SourceWeft
- Open regexcronsql-validator in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.github.encodi%2Fregexcronsql-validator/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config.
{
"mcpServers": {
"regexcronsql-validator": {
"type": "http",
"url": "https://regexcronsql-validator.encodari.workers.dev/mcp"
}
}
}README
regexcronsql-validator
Servidor MCP remoto (Cloudflare Workers, template remote-mcp-authless) con dos tools que validan contra ejecución real, no contra lo que un LLM cree que hacen:
validar_regex— corre el patrón conRegExpnativo de JS contra una lista de strings.validar_cron— calcula las próximas ejecuciones reales de una expresión cron concron-parser.validar_sql— ejecuta una consulta SQL (dialecto Postgres) contra tablas de prueba en memoria conpg-memy devuelve las filas reales resultantes.
Sin base de datos, sin estado persistente: cada llamada crea un McpServer nuevo (ver createServer() en src/index.ts) y es autocontenida — para validar_sql esto también aplica a las tablas de prueba: se crean desde cero en cada llamada (pg-mem en memoria) y se descartan al terminar.
Cobro (x402)
Las tres tools cobran por llamada vía x402 — pago en USDC real sobre Base mainnet, sin API key, contra el facilitator público x402.org/facilitator. El pago viaja dentro del propio JSON-RPC de MCP (_meta), no como header HTTP; ver src/payments.ts.
Un tools/call sin pago devuelve isError: true con los accepts (red, monto, payTo) que el cliente necesita para pagar y reintentar — no una excepción sin explicar. Un cliente MCP x402-aware con wallet propia (ej. createX402MCPClient de @x402/mcp) firma el pago y lo adjunta automáticamente; probarlo end-to-end requiere una wallet con fondos reales en Base mainnet y su clave privada, algo que este repo no maneja ni pide.
Estructura
Correrlo local
⚠️ Nota sobre wrangler dev: el runtime real de Cloudflare Workers (workerd) requiere macOS 13.5+. Si tu Mac tiene una versión más vieja, wrangler dev (y npm run dev) van a fallar con Unsupported macOS version. Para ese caso este proyecto trae un shim en Node puro que corre exactamente el mismo fetch() handler sin necesitar workerd.
1. Instalar dependencias
2. Correr los tests unitarios
3a. Si tu wrangler dev funciona (macOS 13.5+, Linux, Windows)
Levanta en http://localhost:8787/mcp.
3b. Si wrangler dev falla por versión de macOS
Levanta el mismo handler en http://localhost:8787/mcp pero corriendo en Node directo (usa tsx, con watch mode). Ver el comentario en scripts/dev-node.ts para el detalle de por qué esto es seguro (el handler no usa bindings de Cloudflare como KV o Durable Objects).
4. Probar con curl
El transporte es MCP "Streamable HTTP": todo entra por POST a /mcp como JSON-RPC.
Las respuestas vienen como Server-Sent Events (una línea event: message + data: {...}); el data: es la respuesta JSON-RPC de siempre.
5. Probar con MCP Inspector (más cómodo que curl)
Abre una UI en el navegador. Ahí:
- Transport type:
Streamable HTTP. - URL:
http://localhost:8787/mcp. - Connect → pestaña Tools →
List Tools→ deberías vervalidar_regex,validar_cronyvalidar_sqlcon sus schemas. - Elegí una tool, completá los inputs y
Run Toolpara ver el resultado real.
Deploy y listados
Desplegado en https://regexcronsql-validator.encodari.workers.dev/mcp (Cloudflare Workers). Publicado en el registry oficial de MCP, Smithery, mcp.so y con PR abierto a awesome-mcp-servers.
La mayoría de los cambios de código son solo npm run deploy — no hace falta re-publicar en los listados salvo que cambie el precio, la descripción, o la URL del servidor. Ver ROADMAP.md para el detalle y el plan de mejoras a futuro.
Cómo ver si se está usando
- Pagos reales: balance de USDC de la wallet de cobro en BaseScan — cada pago liquidado por x402 aparece ahí.
- Tráfico (pagado o no): dashboard de Cloudflare → Workers & Pages →
regexcronsql-validator→ Metrics. - Smithery: tiene su propia página de stats por servidor.
Qué NO hace (todavía)
- Cobra en Base mainnet con dinero real. Para volver a testnet (Base Sepolia,
eip155:84532) durante desarrollo, cambiáNETWORKensrc/payments.ts. - No tiene base de datos ni estado persistente entre llamadas (más allá de la config de cobro, cacheada en memoria por isolate — ver
src/payments.ts).
Source: README.md at commit 65ca16b
Tools
0Version history
1- v1.0.0LatestSep 16, 2026
Score
85% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 daysRequired25 pts
- Auth declaredRequired10 pts
- Tools listedRequired15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts