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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@browserkit-dev/adapter-booking

v0.1.3

Published

Booking.com adapter for browserkit — upcoming bookings, past trips, booking details

Readme

@browserkit-dev/adapter-booking

Booking.com adapter for browserkit — access your reservations, past trips, and booking details via your authenticated local browser session.

Authentication required. Runs entirely on your machine; no credentials leave localhost.

Tools

| Tool | Key inputs | Description | |---|---|---| | get_upcoming_bookings | count? (1–50) | Your upcoming reservations with property, dates, price | | get_past_bookings | count? (1–50) | Your past trips | | get_booking_details | confirmation_number | Full details: check-in/out times, address, cancellation policy, payment summary |

Plus auto-registered management tools: browser (health check, screenshot, page state, mode switch, navigate), close_session.

Setup

pnpm add @browserkit-dev/adapter-booking
// browserkit.config.js
import { defineConfig } from "@browserkit-dev/core";

export default defineConfig({
  adapters: {
    "@browserkit-dev/adapter-booking": {
      port: 3850,
      channel: "chrome",  // required — Booking.com uses Cloudflare bot detection
    },
  },
});
# One-time login (opens a Chrome window — sign in normally)
browserkit login booking

# Start the daemon
browserkit start --config browserkit.config.js

Connect your MCP client to http://127.0.0.1:3850/mcp.

Important: CloakBrowser required for account tools

secure.booking.com (where your bookings live) is protected by DataDome bot detection — it blocks standard headless Chrome. The booking adapter uses CloakBrowser (stealth Chromium with 33 C++-level patches) to bypass this.

Configure your browserkit.config.js:

"/path/to/browserkit-adapter-booking/dist/index.js": {
  port: 3850,
  // Do NOT use channel: "chrome" — CloakBrowser uses its own Chromium binary
  antiDetection: {
    useCloakBrowser: true,
  },
},

CloakBrowser downloads its Chromium binary (~140MB) on first run and caches it. All tools work fully headlessly — no watch mode required.

Usage

// List your upcoming trips
get_upcoming_bookings({ count: 5 })

// List past trips
get_past_bookings({ count: 10 })

// Get full details for a specific booking
get_booking_details({ confirmation_number: "1234567890" })

How it works

Booking.com uses React with hashed class names that rotate on every deploy. This adapter uses an innerText extraction strategy — it navigates directly to secure.booking.com/mytrips.html and reads the page's text content. This is resilient to DOM changes.

Each tool returns:

  • Structured fields (property name, dates, price) extracted best-effort
  • rawText — the full card text for the LLM to parse any fields not in the structured output

The get_booking_details tool navigates to the individual booking's detail page (URL discovered from the trips list) for check-in instructions, property address, and cancellation policy.

First use after login

After browserkit login booking, call get_upcoming_bookings and inspect the detailUrl field in the response. This reveals the Booking.com detail page URL pattern for your account. Document it in src/selectors.ts for reference.

Tests

pnpm test                # L1 unit + L3 structural MCP (no Booking.com calls, CI-safe)
pnpm test:integration    # L2 live tests against real secure.booking.com (requires login)

Integration tests require an authenticated session — they are excluded from CI.

License

MIT