The MCP Host is the host of the RollingGo MCP (Model Context Protocol) service, which allows AI applications (e.g., agents, LLM clients) to connect to RollingGo hotel capabilities via the standard MCP protocol. The connection URL is https://<MCP_HOST>/mcp/hotel; see “Scenario 2: Connecting to the MCP Service” below.
In the examples below, the<API_DOMAIN>and<MCP_HOST>placeholders are used throughout. Replace them with the domains of your corresponding node.
🚀 Authorization Flow
Before you start: Make sure you have obtained yourThe integration flow consists of three steps:client_id(client ID) from RollingGo, and that RollingGo has configured the allowedredirect_uri(s) (redirect URI) for you. If not yet obtained, please contact your onboarding Business Manager.
- Direct the user to the authorization page to obtain an authorization code (
code). - Receive the redirect and extract the authorization code (
code). - Exchange the authorization code (
code) for an access token (access_token).
Step 1: Request Authorization
Your application should redirect the user to the RollingGo authorization endpoint. Method:GET
Request URL (choose based on your node):
- Mainland China:
https://api.rollinggo.cn/oauth2/authorize - Overseas, Hong Kong, Macao & Taiwan:
https://api.rollinggo.ai/oauth2/authorize
Request Example (replace
<API_DOMAIN> and <MCP_HOST> with your node’s domains):
User experience note: If all parameters pass validation, RollingGo displays the sign-in page (email + verification code login). After the user signs in, if this is the app’s first authorization, a consent screen lists all requested scopes and their meanings. After the user confirms, the browser redirects to the redirect_uri with the authorization code.
Step 2: Handle Callback
After the user signs in and consents on the RollingGo page, the browser will redirect to theredirect_uri you provided in Step 1, with the authorization code (code) appended to the URL’s query string.
Redirect Example:
Error Callback Example (when the user denies authorization or an error occurs):
Step 3: Exchange Code for Token
Once you have thecode, your backend service (or a public client using PKCE) must send a POST request to the RollingGo token endpoint to exchange the code for an access_token.
Method: POST
Request URL (choose based on your node):
- Mainland China:
https://api.rollinggo.cn/oauth2/token - Overseas, Hong Kong, Macao & Taiwan:
https://api.rollinggo.ai/oauth2/token
application/x-www-form-urlencoded (application/json is not supported)
Request Parameters (Body):
Note: TheRequest Example (Curl, confidential client):refresh_tokenis only returned in the response when you use a confidential client (i.e., one configured withclient_secret). Public clients do not receive arefresh_token.
Error Response Example (HTTP 400):
Support & Contact: If you encounter an invalidclient_id, aredirect_urimismatch, a lostclient_secret, or any other configuration-related issue during integration, please contact your RollingGo Business Manager team for assistance.
🛡️ Security Recommendation: PKCE (Required Reading)
PKCE (Proof Key for Code Exchange) prevents the authorization code from being used after interception. For public clients without a backend — pure frontend apps (SPA), desktop, or mobile — we strongly recommend using PKCE, avoiding hardcodingclient_secret in client code. Both Step 1 and Step 3 use the values generated below. How it works:
- Generate
code_verifier: The client generates a high-entropy random string (43-128 characters, using only[A-Z] / [a-z] / [0-9] / "-" / "." / "_" / "~"). - Compute
code_challenge: SHA256-hash thecode_verifier, then Base64URL-encode it (without=padding). - Request the authorization page (Step 1): Send
code_challengeandcode_challenge_method=S256. - Exchange the token (Step 3): Send the original
code_verifierwithoutclient_secret(public clients). RollingGo performs the same SHA256 computation and compares; a mismatch results in token refusal.
🛠️ Using the Access Token (Accessing Protected Resources)
Once you have theaccess_token, you can access the protected resources provided by RollingGo on behalf of the user, or connect to the MCP Server.
Simply place the access_token in the Authorization HTTP header, prefixed with Bearer (note the trailing space).
Scenario 1: Accessing REST API Resources (User Info)
For example, access the user info endpoint/userinfo:
Request Example (Curl):
Scenario 2: Connecting to the MCP (Model Context Protocol) Service
When your MCP client establishes an SSE or WebSocket connection with the RollingGo MCP Server, you must also include the authentication header in the initial HTTP request.- Mainland China MCP Server:
https://mcp.rollinggo.cn/mcp/hotel - Overseas, Hong Kong, Macao & Taiwan MCP Server:
https://mcp.rollinggo.ai/mcp/hotel
Scenario 3: Refreshing the Token with refresh_token
When the access_token expires, you can use the refresh_token to obtain a new access_token without requiring the user to sign in again.
Applicability: TheMethod:refresh_tokenis only valid for confidential clients (configured withclient_secret). Public clients do not receive arefresh_token; for long-term access, go through the authorization flow again.
POST
Request URL (choose based on your node):
- Mainland China:
https://api.rollinggo.cn/oauth2/token - Overseas, Hong Kong, Macao & Taiwan:
https://api.rollinggo.ai/oauth2/token
Request Example (Curl):
Important: After using therefresh_token, the response may include a newrefresh_token. Rely on the actual response and securely store the newrefresh_tokeneach time.
Scenario 4: Revoking a Token
When the user signs out or you need to invalidate a token, call the revocation endpoint. Method:POST
Request URL (choose based on your node):
- Mainland China:
https://api.rollinggo.cn/oauth2/revoke - Overseas, Hong Kong, Macao & Taiwan:
https://api.rollinggo.ai/oauth2/revoke
Request Example (Curl):
Scenario 5: Token Introspection
Used to verify whether a token is valid and to obtain its metadata (for resource server-side validation). Method:POST
Request URL (choose based on your node):
- Mainland China:
https://api.rollinggo.cn/oauth2/introspect - Overseas, Hong Kong, Macao & Taiwan:
https://api.rollinggo.ai/oauth2/introspect
Request Example (Curl):
📋 Appendix: Basic Information (Reference)
This appendix is for manual configuration and troubleshooting. Normal integration does not require reading it. RollingGo provides the standard OAuth 2.0 / OpenID Connect service discovery mechanism. Developers can directly request the following endpoints to automatically obtain all configurations supported by the authorization server (including endpoint URLs, supported scopes, signing algorithms, etc.):
- OAuth 2.0 Discovery Endpoint:
https://<API_DOMAIN>/.well-known/oauth-authorization-server - OIDC Discovery Endpoint:
https://<API_DOMAIN>/.well-known/openid-configuration
Core Endpoint Overview
Supported Scopes
The scope list above exactly matches thescopes_supportedreturned by the authorization server’s.well-known/oauth-authorization-serverendpoint.
Note: When requesting write-operation scopes such ashotel:order:bookandhotel:order:cancel, the consent page explicitly informs the user that the app will perform these operations on their behalf. Users may decline some scopes.
Server Capability Summary
Based on the actual configuration returned by the service discovery endpoints, the RollingGo authorization server supports the following capabilities:The content in this table is derived from the actual configuration returned by the authorization server’s.well-known/oauth-authorization-serverand.well-known/openid-configurationendpoints. Beyond the authorization code flow demonstrated in this document, if you need to use flows such asdevice_codeortoken-exchange, please contact your onboarding Business Manager for the corresponding integration instructions.

