Paste one prompt into Claude Code, Cursor, or your agent and it installs itself. Your agent then pulls Ctrip data from plain-English prompts. Same API key, same billing as the REST API.
Installs with a YOUR_API_KEY placeholder you swap in Cursor.
or paste the prompt
Paste into Cursor's chat
Read https://stayapi.com/install and set up the StayAPI MCP server for me.
The agent writes ~/.cursor/mcp.json, then asks you to restart Cursor.
Paste into Codex
Read https://stayapi.com/install and set up the StayAPI MCP server for me.
Codex reads the page and writes its own MCP config.
Paste into your agent
Read https://stayapi.com/install and set up the StayAPI MCP server for me.
Gemini CLI, Windsurf, or anything else that speaks MCP: the agent adds a remote HTTP server with the X-API-Key header to that client's own config.
No key yet?Sign up for 50 free requests. The agent asks you for it.
Claude on the web, desktop, or mobile doesn't need this prompt: add StayAPI under Settings → Connectors and sign in. ChatGPT: add it as an MCP app in developer mode and sign in. Other clients: manual setup below.
No key
Claude on the web, desktop & mobile
Add StayAPI as a connector and sign in. Nothing to paste.
In Claude, open Settings → Connectors → Add custom connector.
Name it StayAPI and set the URL to https://api.stayapi.com/mcp.
Click Connect, sign in to StayAPI, and choose Allow.
No key
ChatGPT (developer mode)
Add StayAPI as an MCP app and sign in. Plus, Pro, Business, Enterprise, or Edu, on the web.
In ChatGPT, turn on Settings → Security and login → Developer mode.
Open chatgpt.com/plugins, click +, and choose Create MCP app.
Name it StayAPI, set the URL to https://api.stayapi.com/mcp, and pick OAuth. Leave the client ID and secret blank.
Sign in to StayAPI, choose Allow, then install StayAPI from your personal plugins.
In a Work chat, type @StayAPI and ask.
Manual setup — paste the config yourself
01
Claude Code
One terminal command.
bash
claude mcp add --scope user --transport http stayapi https://api.stayapi.com/mcp --header "X-API-Key: YOUR_API_KEY"
On Windows, a bare npx can fail with spawn npx ENOENT. Use the absolute path to npx.cmd. Windows setup notes →
Full reference — every tool, error shapes, Windows notes: MCP documentation →
Tools for Ctrip
The Ctrip tools your agent can call.
Most agents pick the right tool from your prompt, so you never name it. One tool call counts as one request, the same as a REST request.
ctrip_lookup_destination
Resolve a city or exact place name (English or Chinese, 2–100 characters) to the Ctrip city_id that search needs; optional country filters homonyms, limit 1–15. Several matching cities, or a region instead of a city, return invalid_input with suggestions to choose from.
ctrip_search_hotels
First-page Ctrip hotel search (up to 13 hotels) by city_id, with IDs, names, ratings, location and an optional sample room. Optional paired stay dates, today or later, 1–30 nights; the default stay is one night two weeks out.
ctrip_hotel_url_to_id
Extract the numeric Ctrip hotel_id locally from a ctrip.com hotel URL, for details, rooms and reviews.
ctrip_hotel_details
Ctrip hotel content by hotel_id: description, address, coordinates, contacts, rating and subratings, amenities, policies and photos.
ctrip_hotel_rooms
Ctrip room types, availability and the advertised lowest price (CNY) for a stay by hotel_id; adults and rooms 1–8, up to 8 children_ages of 0–17. Per-rate-plan prices need a Ctrip login, so they are null. Can take up to about a minute; returns rate_limited with retry_after when busy.
ctrip_hotel_reviews
Up to 10 reviews from Ctrip's first page by hotel_id, with rating, text, dates, room type, source and owner response. A hotel with no reviews returns no_results.
Full parameters and response shapes live in the MCP docs.
For the same data over REST, see the Ctrip API hub.
Point your agent at Ctrip.
Sign up, paste one prompt, let your agent install itself. Both paths end with your agent answering Ctrip questions in plain English.
01 · the fast path
Get your key
50 free requests on signup. Paste one prompt into your agent, then start asking it for Ctrip data.
We use a few optional analytics cookies to understand what's working.
None are set unless you accept; until then Google only gets cookieless visit pings.
Privacy policy