Build MCP endpoint

POST https://www.bookwithhaven.com/api/public/mcp/build

The Model Context Protocol server for the AI coding tool that is building a host's own website. It gives the agent what it needs to connect that site to Haven and to check its own work: the account's listing codes, working code, step-by-step skills, and a go-live check.

It is the third Haven MCP server, and each is for a different job.

ServerFor
Build at /api/public/mcp/build (this page)An agent building a site that books through Haven
Haven at /api/public/mcpAn agent running an account: the whole API as tools
Assistant at /api/public/mcp/assistantThe host assistant's own tools, with a proposal before every write

The Build server is read-only. No tool on it changes the account, messages a guest, moves money or creates a credential.

It serves a host's own tools: an AI coding tool the host added themselves, or the host's own API key. A reviewed third-party application is refused with 403, because several tools here answer things about the account that no scope names. Such an application uses the REST API and the Haven MCP server.

Connecting

Add the URL to your tool as a remote MCP server. It signs you in to Haven, shows a consent screen, and you approve it. There is no key to paste and nothing to apply for.

Claude Code

claude mcp add --transport http haven-build https://www.bookwithhaven.com/api/public/mcp/build

Then run /mcp inside Claude Code to sign in.

Cursor. Add to .cursor/mcp.json in the project, or ~/.cursor/mcp.json for every project:

{
  "mcpServers": {
    "haven-build": {
      "url": "https://www.bookwithhaven.com/api/public/mcp/build"
    }
  }
}

Then open Cursor Settings, MCP, and click Connect.

Codex CLI. In ~/.codex/config.toml:

[mcp_servers.haven-build]
url = "https://www.bookwithhaven.com/api/public/mcp/build"

Lovable, Bolt, v0, Replit, Windsurf, VS Code and others. Look for MCP servers, Connectors or Integrations in the tool's settings, choose to add a custom or remote server, and paste the URL. If it asks how to authenticate, choose OAuth.

A tool that cannot sign in. If your tool lets you set a request header but does not run OAuth, create an API key and send Authorization: Bearer <your key>. Store it in the tool's secret or header setting, never in the conversation.

Once connected, say: "Use Haven Build to connect this site to Haven."

What the agent can ask

Thirteen tools.

ToolWhat it answers
get_startedWhich account this is, how many listings, whether guests can book yet, the ways to connect, what to do next
list_listingsEvery listing and group site with its code, public URL, quote and night-prices URLs, and widget snippet
get_listingOne listing's content, in the exact shape the account API returns it
get_quoteThe price of one stay, as the site's own call to the quote endpoint would return it
find_open_datesThe next stays that can really be booked, for testing
list_skills, get_skillThe procedures: the whole integration, the widget, a custom booking flow, pages from Haven, go-live, troubleshooting
list_recipes, get_recipeWorking code files with the real endpoints and field names
get_project_rulesThe rules and endpoints as a file to write into the project
list_api_keysWhether the account has API keys, and how the host creates one. Never a key
get_recent_api_requestsThe site's latest calls to the account API: route, status, error, request id
check_go_liveWhether guests can book, item by item, with a link for anything the host must finish

A connection whose host did not grant listing access is not offered the listing tools or the go-live check; tools/list is already filtered.

Skills

A skill is a procedure: which tool to call, which file to write, what to check before moving on, and what to ask the host. Six of them.

SkillUse it to
connect-siteStart. Reads the account, picks the way to connect, runs to go-live
add-booking-widgetAdd the widget to an existing page
build-booking-flowBuild a custom calendar and booking card on Haven's prices
build-pages-from-havenBuild listing pages from the host's Haven content
go-liveRun the checks before the site is done
troubleshootRead an error and fix it

They are also MCP prompts, so a client that supports prompts shows each as a command (connect_site, go_live and so on). get_skill returns the same text for clients that do not.

get_project_rules returns the standing rules as a file, in three formats: a section for AGENTS.md, a Claude Code skill at .claude/skills/haven/SKILL.md, or a Cursor rule at .cursor/rules/haven.mdc. Writing it into the project means the rules are still there in the next session.

Recipes

A recipe is a file of working code. The agent writes it to the path the recipe names, then restyles or ports it.

RecipeWhat it isRuns inAPI key
storefront-clientQuote, night prices, group search and the checkout handoffBrowserNo
server-clientThe account API: listings, photos, reservations, writesServerYes
booking-card-reactDates and guests in, live price out, Book hands off to checkoutBrowserNo
availability-calendar-reactA month of open days with nightly pricesBrowserNo
booking-widgetThe one-tag booking widgetBrowserNo
search-widgetThe one-tag search across a group siteBrowserNo
listing-seoAccommodation structured data from a listingServerNo
env-setupWhere HAVEN_API_KEY goes on each platformEitherYes

The split between browser and server files is deliberate. The only file that reads the key is the server client, and nothing marked browser-safe calls the account API.

The rules the agent is given

Every skill opens with them and get_project_rules writes them down.

  • Never calculate a price, a fee, a tax or a total. Show Haven's quote exactly.
  • Never build a checkout or take card details. Hand the guest to Haven's checkout.
  • Never store availability. Read it live.
  • The API key is read in server code only, is never given a browser-exposed prefix, is never written into a file, and is never asked for in chat.
  • A site that only shows prices and takes bookings needs no key.
  • Address listings by the codes Haven returns.
  • Booking endpoints use major units; the account API uses integer minor units.

Why it cannot create a key

An agent can learn whether a key exists and where the host makes one. It is never handed one, and there is no tool that mints one. A long-lived credential in a model's transcript can be logged, summarized or written into a file that is then committed, so the host creates the key in Haven and adds it to their platform's secrets themselves. It is one click.

What the server supports

initialize, ping, tools/list, tools/call, prompts/list and prompts/get.

It is stateless, like the other two: no sessions, no SSE stream, one JSON-RPC message per POST. GET and DELETE answer 405. Notifications are answered 202 with no body, and batches are refused.

A tool that fails still answers as a result, with isError: true, so the model can read why. A JSON-RPC error means the message was never processed: a malformed envelope, an unknown method, or a tool that is not on this connection.

Authorization is discovered from the URL, as on the MCP endpoint. The server is its own protected resource, described at /.well-known/oauth-protected-resource/api/public/mcp/build, and clients register themselves.

Calls are charged against the same read budget as the rest of the API and written to the same request log. See Rate limits.