Skip to main content
Question

Need help creating an automation

  • August 5, 2026
  • 4 replies
  • 29 views

KellyK
Participating Frequently
Forum|alt.badge.img
  • Participating Frequently

Hi

Can anyone help me build an MCP integration to pull guest names, arrival date and put into an online form along with registration number, expiration date, owners name?  

4 replies

The Orange Cabins
Known Participant
Forum|alt.badge.img

Hi

Can anyone help me build an MCP integration to pull guest names, arrival date and put into an online form along with registration number, expiration date, owners name?  

Where is the registration form located and what created the form? 
where do you get expiration date and owners name?


JenofLions
Participating Frequently
Forum|alt.badge.img
  • Participating Frequently
  • August 5, 2026

Hi Kelly, 

I’ll be happy to assist you with this. Email me at jen@thehostos.com and we can chat. 

Jennifer


Forum|alt.badge.img

@KellyK is right to ask about the field information and your intended destination, and I would also ask what back end system you’re using.

For the moment I’ll assume you’re using python in order to give a minimal Python integration you can use with Hospitable’s MCP. This little script connects to Hospitable's hosted MCP endpoint, uses the ‘get-reservations’ tool to fetch guest information (which you can extend as you like), and posts the arrival details to a generic HTML form endpoint, which is what I think you’re trying to do.

It sounds like you would prefer not to connect via an LLM, but instead will make your own custom calls, which is what I shown below. Have a look at the ‘Fallback Bearer Tokens’ section here: https://help.hospitable.com/en/articles/14424057-connect-an-ai-agent-to-hospitable-using-mcp.

One last note: to keep this code short, you’ll need one dependency: ‘pip install mcp httpx requests’

import asyncio
import json
import httpx
import requests
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

# --- Configuration ---
# Official Hospitable Hosted MCP URL
MCP_SERVER_URL = "https://mcp.hospitable.com/mcp"

# Fallback Bearer Token (Generated in Hospitable Settings > Integrations > MCP)
HOSPITABLE_BEARER_TOKEN = "YOUR_FALLBACK_BEARER_TOKEN"

# Your Online HTML Form POST Endpoint (e.g., Formspree, Google Forms, or a custom PHP/Python script)
FORM_POST_URL = "https://httpbin.org/post" # Replace with your actual form action URL

async def run_integration():
# 1. Initialize HTTP Client with Auth Header
headers = {"Authorization": f"Bearer {HOSPITABLE_BEARER_TOKEN}"}
http_client = httpx.AsyncClient(headers=headers, timeout=60.0)

# 2. Connect to Hospitable MCP Server via Streamable HTTP
async with streamablehttp_client(MCP_SERVER_URL, http_client=http_client) as (read_stream, write_stream):
async with ClientSession(read_stream, write_stream) as session:
await session.initialize()
print("✅ Successfully connected to Hospitable MCP!")

# 3. Pull Reservations using the 'get-reservations' tool
print("📡 Fetching reservations...")
try:
# Note: Depending on your account setup, you may need to pass arguments
# e.g., arguments={"limit": 10} or {"property_uuid": "your-property-id"}
result = await session.call_tool("get-reservations", arguments={})

if not result.content or not hasattr(result.content[0], "text"):
print("❌ No data returned from Hospitable.")
return

# Parse the JSON string returned by the MCP tool
raw_data = json.loads(result.content[0].text)

# Handle potential pagination (e.g. {"data": [...]})
reservations = raw_data.get("data", raw_data) if isinstance(raw_data, dict) else raw_data

except Exception as e:
print(f"❌ Error fetching reservations: {e}")
return

# 4. Extract Guest Names and Arrival Dates
guest_data = []
for res in reservations:
# Standard Hospitable API v2 fields for reservations
guest_name = res.get("expected_guest_name") or res.get("guest_name", "Unknown Guest")
arrival_date = res.get("arrival_date") or res.get("check_in_date", "Unknown Date")

guest_data.append({
"guest_name": guest_name,
"arrival_date": arrival_date
})

print(f"👥 Found {len(guest_data)} reservations.")

# 5. Post to Online HTML Form
if not guest_data:
print("ℹ️ No reservations to post.")
return

print(f"📤 Posting to {FORM_POST_URL}...")
try:
# Using 'requests' to post JSON data
response = requests.post(FORM_POST_URL, json={"guests": guest_data})

if response.status_code in [200, 201]:
print("✅ Successfully posted to the HTML form!")
else:
print(f"❌ Form submission failed. Status: {response.status_code}")
except Exception as e:
print(f"❌ Error posting to form: {e}")

if __name__ == "__main__":
asyncio.run(run_integration())

If you want to do this without code, you might consider a tool I wrote (https://slipstream.rentals, currently a free pilot: https://slipstream.rentals/pilot) which does this sort of reporting with Hospitable, and also pulls in MLS and other data into a nice dashboard.

 


KellyK
Participating Frequently
Forum|alt.badge.img
  • Author
  • Participating Frequently
  • August 5, 2026

The owner info is the same each time as well as the lot ID and expiration date.  The only thing changing is the guest data