AI Coding Assistant Skill for BNBCalc's Airbnb Data API and MCP
Want your AI coding assistant to write BNBCalc code that works the first time, without guessing an endpoint or paying twice for the same analysis? Well, that's the job of this skill. Once it's installed in Claude, Claude Code or Cursor, the scripts and configs your assistant writes for BNBCalc's REST API and MCP server use the right routes, key and header, tell you what a run will cost before it spends anything, and never retry a paid create, since a retry after a timeout can leave you with two saved analyses and two charges.
How do you install the skill?
Start by downloading the skill as a zip file. Then add it to the assistant you use:
- Claude (claude.ai) and Claude Desktop: go to Customize > Skills, click +, then Create skill, then Upload a skill, and upload the zip. On an individual Claude plan, turn on code execution under Settings > Capabilities first; on Team and Enterprise, an owner turns it on for the organization.
- Claude Code: unzip it into
~/.claude/skills/, so the folder sits at~/.claude/skills/bnbcalc-api-and-mcp/. Claude Code picks it up in the session you're in, though if that skills folder didn't exist when the session started, you'll need to run/reload-skillsonce. - Cursor: unzip it into
.cursor/skills/in your project, or~/.cursor/skills/to use it everywhere. Cursor also reads~/.claude/skills/, so a Claude Code install works there too. - Other assistants: add SKILL.md to the project's rules or instructions file, and keep the
referencesfolder next to it, since the skill sends the assistant there for details.
You don't put a key in the skill. It tells your assistant to read your API key from the
BNBCALC_API_KEY environment variable in code, and to keep it in your MCP client's own config, or
leave it out when the client signs in. So make sure to set that up yourself, and keep any file that
holds a key out of git.
How do you connect the BNBCalc MCP server?
Most apps connect by signing in with your BNBCalc account, so the config holds no key at all. You add
https://atlas.bnbcalc.com/mcp, sign in on the BNBCalc page that opens and click Allow, and that
works in Claude (web, desktop and mobile, as a custom connector), ChatGPT (a custom MCP server with
OAuth, though some accounts need Developer mode), Claude Code, Cursor and VS Code. For Claude Code,
you'd run this in a terminal, then start Claude Code, type /mcp, pick bnbcalc and choose
Authenticate:
claude mcp add --transport http --scope user bnbcalc https://atlas.bnbcalc.com/mcp
A client or script that can't open a sign-in page sends your API key instead, in the same
x-bnbcalc-api-key header the REST API uses, because it's one key for both. You start the API
subscription and create the key under
Settings → API & MCP,
and since it only shows once, copy it straight away. If you already connected with an older MCP key
(it starts with mcp_ and goes in x-bnbcalc-mcp-key), it still works on the MCP, so you don't need
to change that setup.
The skill carries the sign-in and key setups for Claude Code, Claude Desktop, Cursor and VS Code, so you can ask your assistant for whichever one you need. BNBCalc's setup guide has every app's steps, and the BNBCalc MCP page lists every tool with its price.
What does the skill teach your assistant?
It covers what you'd otherwise have to look up in the docs while your assistant guesses:
- The basics: the REST base URL, the MCP server address, signing MCP clients in with your
BNBCalc account, and the
x-bnbcalc-api-keyheader that carries yoursk_key on both sides, plus the oldermcp_keys that still work on the MCP. - The analysis routes for buying, rental arbitrage, an owned property and co-hosting, with
their required fields, the two AI options, and how to add AI comps or AI expense estimates later.
Since BNBCalc spells the guest field
accomodates, with one m, the skill also stops your assistant from "fixing" it. - Reading results back: report links, listing your saved analyses, the calculators, account and usage, material participation hours and Listing Optimizer runs.
- Long-term rent benchmarks: HUD Fair Market Rents and Census median rents for a ZIP code or city, which aren't billed. They're an area benchmark for comparing an Airbnb's numbers with renting the home out long term, not an estimate for a specific home.
- Prices and limits: what each call costs, which is the same on both sides, and the rate limits to pace a batch.
- Billing safety: no retry around a create, a long timeout, a ledger for batches, a price check before a batch runs, and the MCP's quote-then-confirm step for every paid tool.
- Checking the docs: it tells your assistant to check BNBCalc's API docs before relying on a route, and to treat a "not found" as a missing route rather than an empty result.
Every analysis your code creates is saved to your BNBCalc account with a report link you can share, so make sure your code keeps the report link each create returns. Analyses made through the API don't show in the app's Properties list.
What's in the skill?
This is the SKILL.md file your assistant loads. The zip also holds three reference files with every field, error and client setup, and tested example code.
---
name: bnbcalc-api-and-mcp
description: Writes code and configs that call BNBCalc's REST API or connect to the BNBCalc MCP server correctly, covering the x-bnbcalc-api-key header and OAuth sign-in for MCP clients, the sk_ API key (and older mcp_ keys) read from environment variables, the buy, arbitrage, owned and cohost analysis routes and their fields, AI comps and AI expense estimates, report links, calculators, account and usage, material participation, per-call prices, rate limits, and never auto-retrying a paid create. Use it whenever someone writes, reviews or debugs a script, app, automation step or MCP client config (Claude, ChatGPT, Claude Code, Claude Desktop, Cursor, VS Code) that touches BNBCalc's API, atlas.bnbcalc.com or a BNBCalc API or MCP key, or asks what BNBCalc API or MCP calls will cost, even if they don't say "API". Not for BNBCalc's app subscription plans, for analyzing a deal in chat without code, or for other companies' APIs.
license: CC BY 4.0
---
# BNBCalc REST API and MCP server
Built on BNBCalc: https://www.bnbcalc.com/developers?utm_source=toolkit&utm_medium=skill&utm_content=bnbcalc-api-and-mcp
This skill makes the code, configs and cost answers you write for BNBCalc correct on the first try.
Every create call costs the user money and can't be undone, so the billing rules below aren't
style advice: follow them in every script, even a quick one.
## Defaults (always)
- **REST base URL:** `https://atlas.bnbcalc.com/v1/external`. JSON in, JSON out, HTTPS only.
- **MCP server:** `https://atlas.bnbcalc.com/mcp`, Streamable HTTP (POST, JSON responses, no
sessions). Users connect by signing in with their BNBCalc account (OAuth): it works in Claude
(web, desktop and mobile, as a custom connector), ChatGPT (a custom MCP server with OAuth),
Claude Code, Cursor and VS Code, with no key in the config. A client or script that can't open a
sign-in page sends the API key in a header instead. Claude Desktop signs in like claude.ai, and
needs the `mcp-remote` bridge only for the key route.
- **One key, one header, one subscription.** The account's API key starts with `sk_` and comes from
Settings → API & MCP (https://www.bnbcalc.com/dashboard/settings/api-access), after starting the
API subscription. It goes in `x-bnbcalc-api-key: sk_...` on every REST request, and the MCP takes
the same key in the same header. Never a key in the URL or query string.
- The API subscription covers REST and MCP, with one usage meter. The MCP tools that aren't
billed work with a sign-in and no subscription (so does the Listing Optimizer run, on a credit);
its metered tools, every REST route and any key need the subscription. A 402 means the account has no API subscription.
- Older MCP keys (`mcp_`, in `x-bnbcalc-mcp-key`) still work on `/mcp` only, and new ones can't
be created. An `mcp_` key sent to a REST route gets 401 "Invalid API key". Don't tell a user
with a working `mcp_` setup to change it.
- **Keys come from the environment or the MCP client's config, never from the code.** Read
`BNBCALC_API_KEY` (REST) with `os.environ` / `process.env`, exit with a clear message if it's
missing or doesn't start with `sk_`, and never print, log, commit or put a key in browser or
mobile code, a URL, or a file that goes into git. If a user pastes a real key into the chat, tell
them to regenerate it in Settings → API & MCP, and use a placeholder in what you write.
- **The guest-count field is spelled `accomodates`** (one m) in every request. Don't correct it.
(Comparable rows in responses spell it `accommodates`.)
- **Set the client timeout to at least 300 seconds** on create and enhance calls. A client that
gives up early turns a billable, finished analysis into a lost response.
## Check what a deployment has
Every route below is live on BNBCalc's production API, and so is the MCP server.
- Before relying on a route, check https://www.bnbcalc.com/developers/rest-api/docs: a route listed
there is live. The MCP tool list and prices are at https://www.bnbcalc.com/developers/mcp.
- If a route this skill lists returns **404**, that deployment doesn't have it. Say so, keep
working with the routes it does have (the create response already carries the report link), and
never fall back to a guessed route.
- **A 404 from `GET /analyses` means the route isn't there, not that the account has no
analyses.** Never read it as "nothing was created, safe to send again".
## Route map
Paths are relative to the REST base URL. Prices are USD per successful call.
| Job | REST | MCP tool | Price |
|---|---|---|---|
| Buy analysis | `POST /analysis/create/buy` | `create_buy_analysis` | $0.20, plus $0.10 for each AI option that completes |
| Rental arbitrage analysis | `POST /analysis/create/arb` | `create_arbitrage_analysis` | same |
| Owned-property analysis | `POST /analysis/create/owned` | `create_owned_analysis` | same |
| Cohost analysis | `POST /analysis/create/cohost` | `create_cohost_analysis` | same |
| Add AI comps or AI expense estimates later | `POST /analysis/enhance` | `enhance_analysis` | $0.10 per AI option that completes, no base fee |
| Read one analysis | `GET /analysis/:id` | `get_analysis` | not billed |
| List the account's analyses | `GET /analyses` | `list_analyses` | not billed |
| Shareable report link | `GET /analysis/:id/report-link` | `get_report_link` | not billed |
| AI comps pick, AI expense estimates | `GET /analysis/:id/ai-comps`, `GET /analysis/:id/expense-estimates` | `get_ai_comps`, `get_expense_estimates` | not billed |
| Calculators | `POST /calculate/amortization`, `/calculate/dscr`, `/calculate/tax-benefits`, `/calculate/sell-or-refinance` | `calculate_amortization`, `calculate_dscr`, `calculate_tax_benefits`, `calculate_sell_or_refinance` | not billed |
| Account and usage | `GET /account`, `GET /usage` | `get_account`, `get_usage` | not billed |
| Material participation hours | `GET /material-participation`, `POST /material-participation/entries` | `get_material_participation`, `log_material_participation_hours` | not billed |
| Listing Optimizer run | `POST /listing-optimizations` (+ `GET` status, list, report link) | `run_listing_optimization` (+ 3 read tools) | 1 Listing Optimizer credit per run |
| Long-term rent benchmarks (HUD Fair Market Rents, Census median rent) | `GET /rents?postalCode=33602`, or `?state=FL&city=Tampa` | `get_section8_rents` | not billed |
| Health check | `GET /health` | `get_api_health` | not billed |
The rent benchmarks are HUD Fair Market Rents for studio to 4 bedrooms (with the 90% to 110% band)
plus the Census median rent for a ZIP or city. They're an area benchmark for long-term rent, not an
estimate for a specific home, so never call them what the home would rent for. When someone asks
about long-term rent in an area, or how an Airbnb compares with renting the home out, name
`get_section8_rents` / `GET /rents` and use it (or write the call), rather than asking them to find
a rent figure themselves. Describe what the benchmark is, and don't claim anything about what else
BNBCalc does or doesn't offer.
The two AI options are `addAIComps` (AI-picked comps; US only, needs at least 8 usable listing
photos) and `addAIExpenseEstimates`. An option that's skipped, fails or times out isn't charged and
shows up in the response's `warnings` array.
**Read the reference before you write anything:**
- REST code: `references/rest-api.md` (every field, response shape, error, and tested code).
- MCP configs and tool calls: `references/mcp-server.md` (client setups, the quote-then-confirm
flow).
- Any loop, batch, retry, timeout or cost question: `references/billing-and-safety.md`.
**Out of scope.** If someone asks for a route, tool or kind of data this skill doesn't list, answer
along these lines and stop there: "That isn't covered by this skill. The full list of BNBCalc MCP
tools is at https://www.bnbcalc.com/developers/mcp, and the REST docs are at
https://www.bnbcalc.com/developers/rest-api/docs." Always give the bnbcalc.com/developers/mcp link. Say the skill doesn't
cover it, never that BNBCalc doesn't offer it. Never guess a route, tool name or field, and don't
stitch a substitute together from other routes' responses. If what they really need is an analysis
of the property, offer the matching create with its price.
## Critical rules
- **Never automatically retry a create or an enhance.** That means no retry loop, backoff
decorator, `tenacity`, `urllib3.Retry` adapter, `axios-retry`, or client `retries` option around
`/analysis/create/*`, `/analysis/enhance`, `/listing-optimizations` (POST) or their MCP tools.
BNBCalc has no idempotency keys, so a second request saves a second analysis and bills again,
and a request that timed out on your side can still finish and bill on the server.
- **When a create's outcome is unknown** (timeout, dropped connection, any 5xx, an MCP 504 "it may
still complete"), stop that item and mark it unknown. Then look for it with `GET /analyses` or
`list_analyses` (not billed), newest first, matching the address. If it's there, use its `_id`
and `url`. If it isn't, ask the user before sending it again. If `GET /analyses` returns 404,
tell the user to check the usage card under Settings → API & MCP and don't resend on your own.
- **4xx means nothing ran and nothing was billed.** Fix the input (400), the key (401, 403) or the
subscription (402) instead of resending. A 429 means slow down: wait for `Retry-After`, and let
the user rerun the rejected rows.
- **Reads are safe to retry.** GET routes, calculators and health can retry with backoff on 429
and 5xx, honoring `Retry-After`.
- **Price it before you spend it.** Before any create loop or batch, dedupe the input, compute
rows × the per-row maximum, print it, and require an explicit yes (a typed confirmation or a
`--confirm` flag). Skip rows a ledger already shows as created.
- **Keep a ledger.** Write each row's status before sending (`sending`) and after (`created` with
`_id` and `url`, `failed` with the status, or `unknown`). On restart, skip `created`, never
auto-resend `unknown`.
- **Pace it.** Calls with an AI option: 10 a minute and 2 at a time per key. `enhance`: 5 a minute.
Everything else: 100 a second per IP. Sequential is fine for batches.
- **MCP paid tools quote first.** Call the tool without `confirmed`; it returns a price quote and
runs nothing. Show the quote, and only after the user says yes, call it again with the same
arguments plus `confirmed: true`. Never set `confirmed` on a first call or on the user's behalf.
- **Material participation entries write to the user's tracker and aren't idempotent.** Confirm
the entry with the user first, and never resend one that succeeded.
## What a create gives back
- A successful create returns 2xx with `success: true` and `data`. `data._id` is the analysis id,
`data.url` is the hosted report, and `warnings` lists any AI option that was skipped.
- **The analysis is saved to the key owner's BNBCalc account**, and anyone with the report link can
open the report. So ask before running creates on a client's or owner's address they haven't
agreed to share. API and MCP analyses use BNBCalc's system defaults (20% down over 30 years when
you leave financing out), not the user's saved presets, and they don't appear in the app's
Properties list. Read them back with `GET /analyses?source=external-api` / `list_analyses`.
- Revenue and returns are BNBCalc's full-time potential (`revenueBasis: "full_time_potential"`,
the property open all year). Where a response includes `actualAnnualRevenue`, it holds what the
comparable listings earned over the trailing twelve months. Show BNBCalc's figures as returned and
say what each one measures.
- **The API's revenue and the report's headline are different measures.** Creates and
`GET /analysis/:id` return the analysis's saved starting estimate (the 70th percentile of the
comps); the report link opens on the Select comps estimate (the median of the top-earning 50% of
comps). When code shows the API's revenue next to the report link, label it as BNBCalc's starting
estimate, or show the report link as the headline figure. Details: `references/rest-api.md`,
"Which revenue figure is which".
## Minimal correct create (Python)
```python
import os, sys, requests
BASE = "https://atlas.bnbcalc.com/v1/external"
key = os.environ.get("BNBCALC_API_KEY", "")
if not key.startswith("sk_"):
sys.exit("Set BNBCALC_API_KEY to your API key (sk_...) from Settings → API & MCP.")
body = {"fullAddress": "123 Example St, Tampa, FL 33602", "bedrooms": 3, "bathrooms": 2,
"accomodates": 6, "purchasePriceUSD": 450000}
try:
r = requests.post(f"{BASE}/analysis/create/buy", json=body, timeout=300,
headers={"x-bnbcalc-api-key": key})
except requests.RequestException as e:
sys.exit(f"No response ({e.__class__.__name__}). It may still have been created and billed: "
"check your analyses before running this again.")
if not r.ok:
sys.exit(f"BNBCalc returned {r.status_code}: {r.text[:300]}")
data = r.json()["data"]
print(data["url"])
```
One create, no retry, key from the environment, a long timeout, and a message that tells the user
what to check when the outcome is unknown. The Node version and a batch runner with a ledger are in
`references/rest-api.md` and `references/billing-and-safety.md`.
## Cost answers
- REST and MCP bill the same unit, $0.01: a report is 20 units ($0.20) and each AI option that
completes is 10 more ($0.10). So it's $0.20 with no AI, up to $0.30 with one option, up to $0.40
with both, whichever side sends it.
- There's no monthly fee, but the API subscription bills every successful paid call on either side.
For a call that costs nothing, say "not billed", and never say the API or the MCP itself costs
nothing.
- Show the arithmetic. For example, 100 cohost analyses with AI comps cost up to 100 × $0.30 =
$30.00 (3,000 units at $0.01), and $20.00 if AI comps can't complete for any of them.
- `billedUnits` from `GET /account`, `GET /usage`, `get_account` and `get_usage` count both sides,
in the unit `GET /account` reports as `unitUsd` ($0.01). REST usage logged before Nov 17, 2026
counted $0.10 units, so don't convert a range that reaches back before then as if it were all
$0.01.
- Accounts billed in euros see euro prices in the dashboard; quote USD unless the user says
otherwise.How much do the BNBCalc API and MCP server cost?
The skill only costs what your code calls, and the REST API and the MCP server bill the same $0.01 unit. A report is 20 units ($0.20), and each AI option that completes adds 10 units ($0.10), so it's $0.20 per analysis, up to $0.30 with one AI option and up to $0.40 with both, whichever side sends it. For example, 100 cohost analyses with AI comps come to at most $30.00 (3,000 units).
One API subscription covers both sides. It has no monthly fee, and it bills every successful paid call from REST or the MCP on one usage meter, while reads, report links and the calculators aren't billed. An MCP app that signs in can also use the calls that aren't billed with no subscription at all. If you read usage from before November 17, 2026, keep in mind that REST counted $0.10 units back then. You can see the current prices on BNBCalc's REST API page.
How well does it work?
We tested it on October 29, 2026 in ChatGPT and Claude, through each one's API rather than the chat apps, with the skill and its reference files loaded as instructions and web search off. There were seven made-up requests: a Python script that creates a buy analysis and prints the report link, "add retries" to a cohost call, a Node script for 50 addresses, a Cursor setup, the cost of 100 cohost analyses with AI comps, a request for data the skill doesn't cover, and a Claude Code setup with the wrong kind of key. Nothing went to BNBCalc, because every script ran against a local stand-in that answers like the API, including a mode that times out and one that drops the connection.
By the third version, every answer passed our checks. Both AIs used the
right address, route and header, read the key from an environment variable and kept the
accomodates spelling. Each script made exactly one create when the stand-in answered, and still
exactly one when it timed out or hung up, so none of them retried. Both batch scripts printed the
price and sent nothing until they got --confirm, then created four analyses for the four unique
addresses in a five-row test file and none when run a second time. Both also refused to retry the
create and said why, put the 100 cohost analyses at $30.00 on either side, and pointed to the MCP
page instead of guessing a route for the request outside the skill.
Getting there took a few rounds. Earlier versions let ChatGPT leave out the link to the full tool list and let Claude say BNBCalc had no such route when the skill doesn't cover it. Reading the third version's answers by hand, we also caught both AIs saying a field wasn't in a response because the skill's sample left it out, which the fourth version fixed. The fifth added a note on which revenue figure is which, since an API call returns the analysis's saved starting estimate while the report link opens on the Select comps estimate. On a new request to put the revenue and the report link in a client email, both AIs labeled the API's number as BNBCalc's starting estimate. We re-ran only the requests those last two changes touched.
We also checked when the skill switches on: on 16 requests run three times each through Claude Code, it switched on for all eight BNBCalc API and MCP requests and none of the eight near misses, after one change that stopped it from switching on for a question about BNBCalc's app plans. Each coding request ran once per AI per version, and answers vary from run to run, so make sure to read the code before you run it with your own key.
On November 20, 2026, we ran it in Claude Code against BNBCalc's live MCP server, signed in with a
real account, with nothing billed. It switched on by itself for a Python batch script, a Node script
and two MCP setup questions, one of them a Cursor config that wouldn't connect. Both setup answers led
with signing in, with no key in the config, and the batch script priced the run, waited for
--confirm and never retried a create. One answer called Claude Desktop a client that can't sign in,
which isn't true, so we reworded that line in the skill.
Questions
Does the BNBCalc API have a monthly fee?
No. BNBCalc's REST API and MCP server have no monthly fee and bill per successful paid call: $0.20 per analysis, plus $0.10 for each AI option that completes. One API subscription covers both, and you start it under Settings → API & MCP in your BNBCalc dashboard. The skill is a free download.
Can I use my BNBCalc API key for the MCP server?
Yes. The BNBCalc API key that starts with sk_, from Settings → API & MCP, works for the REST API and the MCP server in the same x-bnbcalc-api-key header, with one subscription and one usage meter. Most MCP apps don't need a key, though, because they connect by signing in with your BNBCalc account. Older MCP keys that start with mcp_ still work on the MCP server, but a REST route rejects them as invalid.
Where do analyses created through the API show up?
Every analysis created through the BNBCalc API or MCP server is saved to the BNBCalc account behind the key or sign-in, with a report link anyone you share it with can open. They don't appear in the app's Properties list, so keep the report link each create returns. They also use BNBCalc's default settings rather than the presets you've saved in the app.
What happens if a BNBCalc API call times out?
A BNBCalc analysis can still finish and bill after your code stops waiting, so the skill tells your assistant never to send it again automatically. Instead, the code records the row as unknown and checks your saved analyses for it, then asks you before trying again. It also sets a long timeout, since the BNBCalc API's AI options can take up to 90 seconds.
Does the skill work with ChatGPT?
The skill's text works as instructions in any assistant that accepts them, and we tested it through ChatGPT's API as well as Claude's. ChatGPT also connects to the BNBCalc MCP server as a custom MCP server, where you sign in with your BNBCalc account, though some accounts need Developer mode turned on first.
Related in the AI Toolkit
Automation · Build with BNBCalc
n8n Airbnb Workflow: Turn a New Owner Lead Into a Proposal Email
For co-hosts and property managers: each new owner lead runs one BNBCalc Cohost analysis through the API and leaves a proposal email as a Gmail draft, with the report link and each figure marked to fill in. It never sends.
Skill · Analyze a deal
How Do I Analyze an Airbnb Deal in Claude? BNBCalc's Deal Analyzer Skill
A Claude skill that runs BNBCalc's buy, arbitrage and owned-home analyses for you, explains the cash flow in plain words, ranks the deals you've saved, and asks before every charge.