npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@thehotelsnetwork/mcp-parser

v1.0.0

Published

AI-powered parser generator for hotel booking engines

Readme

MCP Parser Generator

Automatic generator of priceParseData() functions for hotel booking engines using Claude + Playwright MCP.

🚀 Main Commands

# Generate parser for engines. 
npm run generate

# View execution logs
npm run logs

# View saved parsers
npm run parser-viewer list
npm run parser-viewer stats
npm run parser-viewer show H10

📁 Parsers Directory

Generated priceParseData() functions are automatically saved in:

/parsers/
  /H10/
    - H10_2025-08-04_12-32-01.js  (function with timestamp)
    - H10_latest.js               (latest version)
  /roiback/
    - roiback_2025-08-04_11-29-10.js
    - roiback_latest.js
  /omnibees/
    - omnibees_latest.js
    ...

Each file includes:

  • ✅ Complete priceParseData() function
  • ✅ Metadata (engine, URL, date, model used)

🎯 Features

  • Automatic generation of parsers
  • Automatic saving of generated functions
  • Complete logging with sessions per engine
  • MCP integration for automation with Playwright

🧰 CLI tool for generating parsers (Quickstart)

Prerequisites:

  • Environment variable ANTHROPIC_API_KEY
  • MCP server URL via env MCP_SERVER_URL (or pass --server flag)

Basic usage:

# Interactive mode (prompts for engine and URL)
npm run generate

# Non-interactive mode (flags)
npm run generate -- --engine synxis --url "https://..."

# Override server and/or model via flags (server is required if not in env)
npm run generate -- --engine synxis --url "https://..." \
  --server "https://playwright-mcp.thehotelsnetwork.com" \
  --model "claude-..." \
  --max-tokens 3000

Output:

  • The CLI automatically saves the function under parsers/<engine>/<engine>_<timestamp>.js and parsers/<engine>/<engine>_latest.js.
  • To view the latest content:
npm run parser-viewer show synxis

📖 CLI Help

npm run generate -- --help

It shows:

MCP Parser Generator - CLI
Usage:
  npm run generate -- [options]

Options:
  --engine <name>       Engine name (e.g., synxis, roiback)
  --url <url>           Target booking URL to analyze
  --server <url>        MCP server URL (fallback: $MCP_SERVER_URL)
  --model <id>          Anthropic model override (default is defined in code)
  --max-tokens <num>    Max tokens for model output (default: 2000)
  -h, --help            Show this help and exit

Environment:
  ANTHROPIC_API_KEY     Required. Your Anthropic API key
  MCP_SERVER_URL        MCP server URL (required unless provided via --server)

Examples:
  npm run generate                      # Interactive mode
  npm run generate -- --engine synxis --url "https://..."
  npm run generate -- --engine synxis --url "https://..." --server "https://playwright-mcp..." --model "claude-..." --max-tokens 3000

Related tools:
  npm run logs latest                   # Show latest log
  npm run parser-viewer list            # List saved parsers

🔎 Logs

During generation you will see logs in the console (and they are saved in logs/). Helpful commands:

npm run logs list
npm run logs latest
npm run logs show <filename>

❓ Troubleshooting

  • Error: ANTHROPIC_API_KEY is not set
    • Export the environment variable with your API Key.
  • MCP connection error or service unavailable
    • Verify MCP_SERVER_URL or use --server to point to the correct server.
    • Check npm run logs latest for more details.
  • No file generated under parsers/
    • Ensure the model returns content and the priceParseData() function is extracted.

Table of contents