Codex · ChatGPT desktop app · CLI · IDE
How to Connect Codex and ChatGPT to Airbnb Data
ChatGPT on the web can't send the API key AirROI's Airbnb MCP server requires. Codex can. To connect ChatGPT to Airbnb market data, add three lines to config.toml, and the ChatGPT desktop app, Codex CLI and IDE extension get all 29 tools.
MCP protocol 2025-11-25Registry com.airroi/mcp
[mcp_servers.airroi]
url = "https://mcp.airroi.com"
env_http_headers = { "X-API-KEY" = "AIRROI_API_KEY" }Codex reads your key from AIRROI_API_KEY, so it never sits in the file. One block serves the ChatGPT desktop app, the Codex CLI and the IDE extension.
- Lines of config.toml
- 3
- MCP tools
- 29
- Airbnb listings
- 20M+
- Starting price per call
- $0.01
Where Airbnb data works in Codex and ChatGPT
To connect ChatGPT to Airbnb market data, use Codex. ChatGPT on the web has no Airbnb app, and its developer mode accepts only OAuth or no-auth MCP servers, so it can't send the API key the AirROI Airbnb MCP server requires. Codex can, in the ChatGPT desktop app, the Codex CLI and the IDE extension.
As of September 2026, Airbnb has no official MCP server, and it says its own AI agent arrives in 2027 (Skift). Every “Airbnb MCP server” is third-party. AirROI's Airbnb MCP server is the market-data kind: occupancy, ADR, revenue, comps and forward pacing for 20M+ listings in 190+ countries.
ChatGPT's developer mode supports OAuth, No Authentication and Mixed authentication, per OpenAI's developer mode guide. AirROI checks an X-API-KEY header on every request, and developer mode has no field for one. Codex does: its config accepts http_headers and env_http_headers for remote servers (OpenAI's Codex MCP docs).
| Client | Status | How to connect | Config location | Key goes in | Watch out for |
|---|---|---|---|---|---|
Codex in the ChatGPT desktop app | Works | Settings → MCP servers → Add server, or edit the TOML | ~/.codex/config.toml | env_http_headers (recommended) or http_headers | Same file as the CLI; restart after editing |
Codex CLI | Works | [mcp_servers.airroi] block in config.toml | ~/.codex/config.toml; project .codex/config.toml in trusted projects only | env_http_headers | codex mcp add has no header flag; "Auth: Unsupported" in codex mcp list is expected |
Codex IDE extension | Works | Gear menu → MCP servers, or the shared TOML | ~/.codex/config.toml | env_http_headers | VS Code detection bug (openai/codex #6465) |
ChatGPT on the web (developer mode) | Not supported | Not supported for API-key servers | — | OAuth, No Authentication or Mixed only | Doesn't read config.toml; use Codex instead |
The same key works in Claude (Connect Claude to Airbnb data) and in Cursor, VS Code or n8n (Airbnb MCP setup guide). For your own bookings rather than market data, compare Airbnb MCP servers by what each reads and changes.
Add AirROI to Codex in four lines
~/.codex/config.toml. Adding AirROI takes four lines: one shell export that holds your API key, and a three-line [mcp_servers.airroi] block whose env_http_headers sends that key as the X-API-KEY header on every request. The key never sits in the file, and the same block works in the CLI, IDE extension and ChatGPT desktop app.Get an API key
Activate your API key with a $10 minimum deposit. Every request needs it; each tool call costs the same as its REST endpoint, and
tools/listisn't billed.- Endpoint
- https://mcp.airroi.com
- Header
- X-API-KEY
- Transport
- Streamable HTTP (remote, stateless)
- Price per call
- From $0.01
Put the key in an environment variable
Add the line to
~/.zshrcor~/.bashrcand open a new terminal. On Windows, setAIRROI_API_KEYas a user environment variable.Shell profile (~/.zshrc or ~/.bashrc)bashexport AIRROI_API_KEY=YOUR_API_KEYAdd the server to config.toml
Create
~/.codex/config.tomlif needed.env_http_headersmaps theX-API-KEYheader to the variable's name; Codex fills in the value when it connects.~/.codex/config.tomltoml[mcp_servers.airroi] url = "https://mcp.airroi.com" env_http_headers = { "X-API-KEY" = "AIRROI_API_KEY" }Restart Codex and check the tools
Codex reads the file at startup. Type
/mcpin the CLI or the app's composer:airroishould list 29 tools.Terminalbashcodex mcp list # "Auth: Unsupported" is expected for header auth # inside Codex, type /mcp to see the airroi tools
Prefer a command?
codex mcp add has no custom-header flag; its --bearer-token-env-var sends a Bearer token, not X-API-KEY. Add the env_http_headers line afterwards.
codex mcp add airroi --url https://mcp.airroi.com
# then add the env_http_headers line to ~/.codex/config.tomlKey stored in the file
http_headers keeps your key in plain text. Keep the file out of git and dotfile syncs, and never commit a project .codex/config.toml that holds a key.
[mcp_servers.airroi]
url = "https://mcp.airroi.com"
http_headers = { "X-API-KEY" = "YOUR_API_KEY" }In the ChatGPT desktop app
Since July 9, 2026, Codex has lived inside the ChatGPT desktop app for macOS and Windows, next to Chat and Work. Its Codex mode reads the same ~/.codex/config.toml as the Codex CLI and IDE extension, so a server you add once shows up in all three. You can add AirROI from the app's settings or by editing the file.
Add the server from Settings
- Open the ChatGPT desktop app and switch to Codex.
- Open Settings → MCP servers → Add server.
- Name it
airroi, choose Streamable HTTP and pastehttps://mcp.airroi.com. - Add the header
X-API-KEYfrom the variableAIRROI_API_KEY. No header field in your version? Save, then add theenv_http_headersline to the file. - Save, select Restart, then type
/mcpin the composer.
OpenAI's desktop app help article covers the move from the standalone Codex app.
Opened from the Dock or Finder?
macOS apps opened that way don't read ~/.zshrc, so AIRROI_API_KEY can be empty in the app while the CLI works. Start the app from a terminal that exports it, or use http_headers on that machine.
Project configs need a trusted folder
A repository's .codex/config.toml loads only in trusted projects. Keep a key you use everywhere in ~/.codex/config.toml.
What Codex returns: booking pace for Gatlinburg
Asked how Gatlinburg is pacing, Codex made two AirROI calls: one to resolve the market and one for forward pacing across about 4,600 entire homes. The answer reports fill rate and booked rates by month, and every figure traces to a tool call you can open below. The session cost $0.21.
Read forward booking pace
Prompt
How is Gatlinburg pacing for the next few months? Show fill rate and booked rates for entire homes.
2 tool calls
airroi_search_markets$0.01query: Gatlinburg
Response excerpt (first of 10 matches shown)
{ "entries": [ { "full_name": "Gatlinburg, Tennessee, United States", "country": "United States", "region": "Tennessee", "locality": "Gatlinburg", "district": "", "native_currency": "USD", "active_listings_count": 4468 } ] }airroi_market_future_pacing$0.20Gatlinburg, Tennessee, United States · room_type = entire_home · currency: usd
Response excerpt (6 daily rows shown)
{ "market": { "country": "United States", "region": "Tennessee", "locality": "Gatlinburg", "district": null }, "results": [ { "date": "2026-10-09", "booked_count": 2267, "available_count": 2341, "booked_rate_avg": 454, "available_rate_avg": 435, "fill_rate": 0.49 }, { "date": "2026-10-10", "booked_count": 2396, "available_count": 2212, "booked_rate_avg": 443.9, "available_rate_avg": 421.3, "fill_rate": 0.52 }, { "date": "2026-11-14", "booked_count": 1029, "available_count": 3568, "booked_rate_avg": 376.4, "available_rate_avg": 351, "fill_rate": 0.22 }, { "date": "2026-12-26", "booked_count": 1354, "available_count": 3238, "booked_rate_avg": 584.8, "available_rate_avg": 595.4, "fill_rate": 0.29 }, { "date": "2027-01-16", "booked_count": 281, "available_count": 4294, "booked_rate_avg": 427.6, "available_rate_avg": 340.8, "fill_rate": 0.06 }, { "date": "2027-07-03", "booked_count": 199, "available_count": 4321, "booked_rate_avg": 510.1, "available_rate_avg": 456.9, "fill_rate": 0.04 } ] }
Answer written from these results
Across about 4,600 Gatlinburg entire homes, October 2026 is pacing at an average 36% fill rate, and the strongest nights so far are Friday and Saturday, October 9–10, at 49% and 52% filled. Booked October nights average $395. November averages 21% filled and December 17%, with December's booked nights averaging $453. Dates further out have little on the books yet: January through August 2027 average 5% or less.
The same day, one live call read a competitor's Airbnb calendar for the next 30 nights.
Check a competitor's live calendar
Prompt
Pull the live Airbnb calendar for listing 32568787 ("Perfect Pad in the Gulch") for the next 30 days: nightly rates, open nights, minimum stay and cleaning fee.
1 tool call
airroi_live_calendar$0.20id: 32568787 · currency: usd
Answer written from these results
Between September 25 and October 24, 2026, only 4 of 30 nights are open (October 12–15). The other 26 show as unavailable, which covers both booked and host-blocked nights. Nightly rates run from $164 to $495 and average $314 over the 30 days; the four open nights are priced at $297, $164, $275 and $495. Minimum stay is 1 or 2 nights, and the host adds a $165 cleaning fee per stay on top of the nightly rate.
Starter prompts for Codex
Each one ends in a file, not just a reply.
“Chart Gatlinburg's fill rate by night for the next three months and mark the weekends.”
airroi_search_marketsairroi_market_future_pacing2 calls, $0.21“Pull 24 months of ADR for 2-bedroom homes in Nashville and Austin into a DataFrame and plot both.”
airroi_search_marketsairroi_market_adr4 calls, $0.22“Save the 25 closest comps to a 2-bed, 2-bath condo at 1000 Division St, Nashville as comps.csv.”
airroi_find_comparables1 call, $0.10“List the listings Airbnb search shows for this map rectangle, in rank order, and save them to ranking.json.”
airroi_live_search_ranking1 call, $0.20
Pacing is one of 11 market tools; see all 29 in Airbnb analytics MCP tools and more sessions in Airbnb MCP use cases.
What Codex can do that a chat can't
Codex can write and run code on what the tools return. Ask it to export every listing in a radius to CSV, build a notebook that compares ADR across markets, or script a monthly comp pull, and the answer becomes a file in your repo that you can rerun, diff and share instead of a chat message.
| Job | What you ask Codex | Tool calls | What lands in your repo | Cost |
|---|---|---|---|---|
| Bulk export to a notebook | “Export every 3-bedroom entire home within 5 miles of downtown Asheville to CSV, then build a notebook that plots revenue against ADR.” |
| asheville_3br.csv · asheville.ipynb | $0.50 per 10 listings exported |
| Multi-market comparison | “Compare monthly occupancy and ADR for 3-bedroom homes in Destin, Gulf Shores and Panama City Beach over 36 months.” |
| gulf_coast.ipynb with two charts | $0.63 |
| Monthly comp-set pull | “Write a script that finds my 25 closest comps, pulls 12 months of metrics for each and appends them to comps.csv.” |
| comp_pull.py · comps.csv | $2.60 per run |
| Competitor rate watch | “Every Monday, read the live calendars of my five closest competitors and flag nights whose rate moved more than 10%.” |
| rate_watch.py · weekly diff report | $1.00 per run |
airroi_export writes up to 100,000 listings to a CSV or JSONL file behind a 7-day download link. Codex gets a preview and the link, never the full rows, then loads the file in code.
Scheduled scripts call the matching AirROI REST API endpoints with the same key and price. Building an agent instead? Use the OpenAI Agents SDK config.
Why the numbers differ from a plain ChatGPT answer
A chat model with no data tool has nothing to measure, so it fills in occupancy and ADR from web pages it happens to find, with no stated market boundary, filter or period. Through the AirROI server, Codex quotes a tool result instead, and the call records which market, which listings and which dates produced each number.
Plain chat, no data tool
- Source
- Whatever pages the search turns up: a vendor's market page, a blog post, a forum thread
- Market boundary
- Not stated
- Which listings
- Not stated
- Period
- Often not stated
- Rerun it
- Not reliably; the next search may find different pages
In one public r/mcp demo, ChatGPT without a data tool answered an ADR question with a range “in the $200–$300s” taken from a vendor's market page.
Codex with an AirROI tool call
- Source
- airroi_market_future_pacing
- Market boundary
- Gatlinburg, Tennessee, United States
- Which listings
- room_type = entire_home
- Period
- Daily rows for upcoming nights, from the day of the run
- Rerun it
- Same arguments, same scope, $0.20 per call
From the Gatlinburg session above. Ask Codex to show the raw tool result whenever you need to audit a figure.
Codex gotchas
Most Codex connection problems trace to five causes: an Auth column that only describes OAuth, an environment variable the app can't see, a project config in an untrusted folder, a file edited while Codex was running, and an open VS Code extension bug. The table lists each symptom, its cause and the fix.
| What you see | Why | Fix |
|---|---|---|
codex mcp list shows “Auth: Unsupported” | That column describes OAuth sign-in. AirROI reads a header instead. | Nothing to fix. Confirm with /mcp, then ask a question. |
| 401 “Missing API key” | AIRROI_API_KEY is empty where Codex started (a shell without the export, or a desktop app opened from the Dock), or codex mcp add left out the header. | Check with printenv AIRROI_API_KEY, relaunch from that terminal, and confirm the env_http_headers line exists. |
| The VS Code extension doesn't show the server | An open detection bug, openai/codex #6465. | Confirm the server in the CLI with /mcp; both read the same file. |
A project .codex/config.toml is ignored | Codex loads project config only in trusted projects. | Trust the project, or move the block to ~/.codex/config.toml. |
| Tools still missing after you edit the file | Codex reads config.toml when it starts. | Restart the CLI, select Restart in the desktop app, or reload the IDE window. |
Codex and ChatGPT questions
ChatGPT's developer mode connects only to servers that use OAuth or no authentication. AirROI requires an X-API-KEY header on every request, and ChatGPT on the web can't send custom headers. Codex can, through http_headers or env_http_headers in config.toml, so use Codex in the ChatGPT desktop app, the CLI or your IDE.
Add this block to ~/.codex/config.toml, set AIRROI_API_KEY in your shell, and restart Codex:
[mcp_servers.airroi]url = "https://mcp.airroi.com"env_http_headers = { "X-API-KEY" = "AIRROI_API_KEY" }
Type /mcp in the composer to confirm the 29 AirROI tools are loaded.
Only partly. codex mcp add airroi --url https://mcp.airroi.com creates the entry, but the command has no flag for custom headers; it only offers --bearer-token-env-var. AirROI expects X-API-KEY, so open ~/.codex/config.toml afterwards and add the env_http_headers line.
Yes. Since the Codex app merged into the ChatGPT desktop app on July 9, 2026, its Codex mode, the Codex CLI and the IDE extension all read ~/.codex/config.toml. Add AirROI once and it's available in all three. A project-level .codex/config.toml also works, but Codex loads it only in projects you've marked as trusted.
That column describes Codex's OAuth login flow, which AirROI doesn't use. Your key travels in the X-API-KEY header instead. The message is expected and harmless. Check that /mcp lists the airroi tools, then ask a question to confirm a call succeeds.
Better not. env_http_headers maps the header to an environment variable, so the key never sits in a file you might sync or commit. http_headers = { "X-API-KEY" = "…" } also works, but it stores the key in plain text. Never commit a project .codex/config.toml that contains a key.
Without a data tool, ChatGPT estimates ADR and occupancy from whatever pages it finds. One STR analyst's guide calls those figures "fabricated". With AirROI connected in Codex, each number comes from a tool call you can inspect: the tool, the market ID, the filter and the months covered. Ask Codex to show the tool results when you need to audit an answer.
Add AirROI to Codex
Get a key, paste three lines into config.toml and ask Codex your first market question. Calls start at $0.01, and tool discovery isn't billed.