Skip to content

Repository files navigation

webhotelier-mcp

An MCP stdio server over the WebHotelier Integration API for a single Hotelier-account property — catalog, availability, and the full booking lifecycle, made safe for an LLM caller.

A single statically linked Go binary. One embedded bbolt database file. MCP stdio is the only surface. Outbound HTTPS to rest.reserve-online.net only — no listening ports, no daemons, no second binary.

Status: implemented. The behavioral contract lives in docs/SPECIFICATIONS.md — code follows the spec, and any scope change updates the spec first (see .claude/rules/specification-rules.md). API field-name mappings have been verified against the live wire format; only the offers endpoints remain unverified (see the spec's Open Questions).

Getting Started

Prerequisites

  • Go (matching the version in go.mod)
  • gofumpt: go install mvdan.cc/gofumpt@latest
  • golangci-lint v2: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest

Build, run, test, lint

make build   # go build ./...
make run     # go run .
make test    # go test ./... -race -cover
make lint    # golangci-lint run
make fmt     # gofumpt -w .
make check   # fmt + tidy + lint + test

Configuration

Credentials and the target property are supplied via environment variables and are never written to the database:

Variable Purpose
WEBHOTELIER_USERNAME HTTP Basic auth username
WEBHOTELIER_PASSWORD HTTP Basic auth password
WEBHOTELIER_PROPERTY Property code (seeds config on first run; afterwards the stored config wins)
WEBHOTELIER_READONLY Set to 1 to unregister all write tools
WEBHOTELIER_DB bbolt file path (default <user config dir>/webhotelier-mcp/webhotelier.db)

Connect an MCP client

MCP clients spawn the server with a clean environment — shell exports never reach it. Declare the variables in the client's server config.

Claude Code (writes .mcp.json; ${VAR} values are expanded from the environment claude runs in):

claude mcp add webhotelier \
  -e WEBHOTELIER_USERNAME=your-user \
  -e WEBHOTELIER_PASSWORD=your-pass \
  -e WEBHOTELIER_PROPERTY=YOURCODE \
  -- /path/to/webhotelier-mcp

Claude Desktop (claude_desktop_config.json; no ${VAR} expansion — use literal values):

{
  "mcpServers": {
    "webhotelier": {
      "command": "/path/to/webhotelier-mcp",
      "env": {
        "WEBHOTELIER_USERNAME": "your-user",
        "WEBHOTELIER_PASSWORD": "your-pass",
        "WEBHOTELIER_PROPERTY": "YOURCODE"
      }
    }
  }
}

Multiple clients can point at the same database file: the store opens a short-lived handle per operation and holds no lock while idle.

See docs/SPECIFICATIONS.md for the full tool, resource, and persistence design.

License

TBD.

About

MCP stdio server for the WebHotelier Integration API — typed availability, quoting, and LLM-safe booking for a single property, backed by an embedded bbolt store. One Go binary.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages