Cuddlynest Mcp

io.github.mafedelahoz由 GitHub 账号 mafedelahoz 发布v0.2.1更新于 Oct 24, 2026

Search CuddlyNest hotels and read rooms, prices, availability and cancellation policies

概览

AI 生成的概览

搜索 CuddlyNest 酒店,并从公开房源页读取房型、价格、可订状态和取消政策,只读不预订。

可以做什么
  • 按目的地搜索地点和热门酒店,可选拉取更完整的城市酒店列表
  • 读取单家酒店的静态信息:名称、地址、坐标、星级、设施、图片
  • 按入住日期读取房型报价:单价、剩余房间、价格明细、取消政策
  • 回显人数、日期和货币,供后续使用
适用场景
适合让助手在不自己打开浏览器的情况下比较 CuddlyNest 的酒店选项和房价。它是只读的,适合调研和比价,而不是下单预订。
运行要求
通过 npx 以 stdio 在本地运行;需要 Node.js 18+ 以及 Playwright 的 Chromium(npm install 会自动安装,也可手动运行 npx playwright install chromium)。可选环境变量 CUDDLYNEST_SCRAPE_TIMEOUT_MS 控制渲染等待时间(默认 35000 毫秒)。需要能访问 CuddlyNest 的公开页面和接口。
安装前请注意
它用无头浏览器抓取公开页面,依赖 CuddlyNest 当前前端内部结构,网站改版后可能静默返回空结果。提供忽略 robots.txt 抓取房源页的选项。它不预订也不付款,但会把目的地和酒店查询发送到 CuddlyNest 的接口。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Cuddlynest Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[CuddlyNest]

CuddlyNest Search & Listings — MCP Server

[npm] [MCP Registry]

A Model Context Protocol (MCP) server for searching CuddlyNest hotels and retrieving listing details, including room options, prices, availability and cancellation policies.

Read-only by design: search and listing details only. No booking, no payment.

How it gets the data

This server reads that data the same way a visitor does: it opens the real, public listing page in a headless browser (Playwright/Chromium), lets the page's own JavaScript load the rooms, waits for them to render, and reads the result out of the DOM.

DataSource
Name, description, address, coordinates, star rating, amenities, imagesListing page schema.org ld+json + Open Graph tags (cuddlynest.ts)
Room title, partner, unit_price, remaining_rooms, price_breakdown, cancellation_policy (incl. .text), room_filtersRendered listing page DOM, via a React-fiber walk (scrape-listing.ts)
Destination → place candidates + top hotelsautosuggestion-2-0.cuddlynest.com (public, no auth)
Destination → broader city hotel list (~60–250)discovery-pages.cuddlynest.com/fetch_geopage/<ct-id> (public); <ct-id> recovered from a hotel's product-detail breadcrumbs
product_id → name / city / breadcrumbsldp-2-0-product-details.cuddlynest.com/api/v1/productDetail (public)
product_id → canonical listing path/hotel/-<id> server redirect

The DOM extraction, and how it breaks

extractRoomsFromDom() walks every price-shaped text node (COL$742,637), then walks up its React fiber tree to the nearest ancestor component whose props carry both unit_price and roomGroups. Those props are the room offer the page already rendered.

This is coupled to CuddlyNest's current frontend internals (a React prop shape, not a stable contract). If they ship a frontend change it can start returning zero rooms even though the public page still shows prices. The single place to update is the detector condition 'unit_price' in p && 'roomGroups' in p in scrape-listing.ts. npm run e2e:sansiraka is meant to catch that early (non-zero exit, not a silent empty result).

The fromPriceText ("From COL$…") field uses a looser heuristic and can come back null even on a healthy scrape; rooms.fromPrice (cheapest extracted unit) is the reliable figure.


Requirements

  • Node.js 18+
  • A Chromium build for Playwright. npm install runs playwright install chromium automatically (postinstall); if that is blocked in your environment, run npx playwright install chromium once by hand.

Installation

Published as cuddlynest-mcp on npm and listed in the official MCP registry as io.github.mafedelahoz/cuddlynest-mcp.

json
{  "mcpServers": {    "cuddlynest": {      "command": "npx",      "args": ["-y", "cuddlynest-mcp"]    }  }}

Add "--ignore-robots-txt" to args to bypass robots.txt for the listing-page fetches. CUDDLYNEST_SCRAPE_TIMEOUT_MS (default 35000) caps how long the browser waits for prices to render.

An MCPB bundle (.mcpb) for Claude Desktop is attached to each GitHub release — note it does not bundle Chromium, so run npx playwright install chromium once after installing it that way.

Remote / Streamable HTTP

Default transport is stdio. For a hosted deployment, run it over Streamable HTTP:

bash
node dist/index.js --http 8080      # or: MCP_TRANSPORT=http PORT=8080 node dist/index.js#   POST  http://<host>:8080/mcp    — JSON-RPC (stateless, no sessions)#   GET   http://<host>:8080/health — liveness

Tools

Both tools are annotated readOnlyHint: true — they never write, book, or pay.

cuddlynest_search

Search a destination and the top hotels there, from public CuddlyNest APIs (autosuggestion-2-0 for the fuzzy match, discovery-pages geo pages for the broader city list). Prices are not here — pass a hotel's productId to cuddlynest_listing_details.

ParameterRequiredDescription
destinationyesCity / area string, e.g. "Cartagena, Colombia"
hotelsOnlynoOmit the places[] block (default false)
fullCityListnoAlso pull the geo-page city list (~60–250 hotels) when it can be resolved and verified against the destination — a few extra requests (default true)
checkin, checkout, adults, children, childAges, infants, rooms, currencynoechoed back for downstream use

Returns: { query, guests, places[], city, hotelSource, hotelCount, hotels[], note }. Each hotels[] entry: productId, name, url, slug, propertyType, starRating, guestRating (/10) + guestRatingText, reviewCount, and — from the geo page — images[], distanceFromCenterKm, featuredAmenities[]. hotelSource is "autosuggest" or "autosuggest+geopage". The list is top-matches scale, not full inventory — CuddlyNest's real results page (/sr/…) is bot-blocked and Disallowed in robots.txt.

cuddlynest_listing_details

Static basics and rooms/pricing for one hotel.

ParameterRequiredDescription
hotelyesListing URL or numeric product_id (trailing number in the URL)
checkin, checkoutfor pricingYYYY-MM-DD — required to read rooms/prices
adults, children, childAges, infants, roomsnodefaults 2 / 0 / – / 0 / 1
currencynoISO 4217, default USD
ignoreRobotsTextnoignore robots.txt for the static fetch

Returns: { productId, hotelUrl, guests, staticListing, staticError, rooms, roomsError, notes }. rooms.units[] is the extracted room offers, each with title, partnerName, unitPrice, currency, remainingRooms, guests, cancellationPolicyType, cancellationPolicyText, priceBreakdown, roomFilters. rooms also carries fromPrice, partnersSeen, listingUrl, scrapedAt.


Development

bash
npm install          # installs deps + Chromium (postinstall)npm run build        # sync-version + tsc -> dist/npm run typechecknpm test             # offline: smoke test (stdio) + scraper testsnpm run e2e:sansiraka # ONLINE: real scrape of cuddlynest.com, structural assertsnpm run watch

Architecture

  • index.ts — MCP server, tool schemas, stdio and Streamable HTTP transports, robots.txt handling
  • cuddlynest.ts — hotel-URL parsing, static-listing ld+json parse, destination autosuggestion, result shaping
  • scrape-listing.ts — resolveListingPath, buildListingUrl, scrapeListing (headless browser), extractRoomsFromDom (React-fiber walk)
  • util.ts — generic object/JSON helpers

License

MIT — see LICENSE.

来源:README.md,提交 2e96075

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分