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

@anson2dev/o2o

v0.1.0

Published

MCP Server for AI Agents to search and book hotels across 7000+ properties in China

Readme

@anson2dev/o2o

MCP Server + CLI for AI Agents to search and book hotels across 7000+ properties in 469 cities across China.

为 AI Agent 提供中国 469 个城市、7000+ 酒店的搜索和预订能力的 MCP Server + CLI 工具。

Quick Start / 快速开始

# Run as MCP server (for AI agents)
npx @anson2dev/o2o

# Or use the CLI directly
npx @anson2dev/o2o search 上海
npx @anson2dev/o2o detail 021010
npx @anson2dev/o2o cities

Environment Variables / 环境变量

| Variable | Required | Description | |----------|----------|-------------| | O2O_API_BASE_URL | Yes | Platform API base URL | | O2O_APP_KEY | For booking | App key for order endpoints | | O2O_ANALYTICS_URL | No | Anonymous analytics endpoint | | O2O_TELEMETRY | No | Set to "false" to disable analytics | | O2O_OTA_CHANNEL | No | OTA channel identifier (default: "mcp-agent") | | O2O_REQUEST_TIMEOUT | No | Request timeout in ms (default: 5000) |

Agent Configuration / Agent 配置

Add to your MCP client config (e.g., Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "o2o-hotel": {
      "command": "npx",
      "args": ["@anson2dev/o2o"],
      "env": {
        "O2O_API_BASE_URL": "https://your-api.example.com",
        "O2O_APP_KEY": "your-app-key"
      }
    }
  }
}

CLI Usage / 命令行使用

o2o                     # Start MCP server (default)
o2o serve               # Start MCP server (same)
o2o search <city>       # Search hotels in a city
o2o detail <hotel_id>   # Show hotel details and rooms
o2o cities              # List available cities
o2o help                # Show help

Examples:

o2o search 上海
o2o search Shanghai --checkin 2026-04-01 --checkout 2026-04-03
o2o detail 021010

Available Tools / 可用工具

search_hotels — Search Hotels / 搜索酒店

Search hotels in 36+ major Chinese cities by name (Chinese/English/Pinyin).

city: "Shanghai" or "上海"
check_in: "2026-04-01"
check_out: "2026-04-03"
keyword: "希尔顿" (optional)
limit: 10 (optional)

get_hotel_detail — Hotel Details / 酒店详情

Get hotel details with room availability and pricing for specific dates.

hotel_id: "H001"
check_in: "2026-04-01"
check_out: "2026-04-03"

create_booking — Book Hotel / 预订酒店

Create a hotel reservation. Most hotels support pay-at-hotel.

hotel_id: "H001"
room_code: "RC001"
check_in: "2026-04-01"
check_out: "2026-04-03"
guest_name: "张三"
guest_phone: "13800138000"

check_order_status — Check Order / 查询订单

Check the status of an existing booking.

order_no: "12345"

Typical Workflow / 典型工作流

  1. search_hotels — Find hotels in a city
  2. get_hotel_detail — Check room availability and pricing
  3. create_booking — Make a reservation
  4. check_order_status — Verify booking status

Privacy / 隐私

This MCP server sends anonymous usage analytics (search counts, city distribution) to help improve the service. No personal information is collected. Disable with O2O_TELEMETRY=false.

本 MCP Server 发送匿名使用统计(搜索次数、城市分布)以改善服务。不收集个人信息。设置 O2O_TELEMETRY=false 可禁用。

Development / 开发

npm install
npm run dev    # Run in development mode
npm test       # Run tests
npm run build  # Build for production

License

MIT