Plane Gays API docs
The Plane Gays API is a remote MCP
server at https://mcp.planegays.app/mcp. Any MCP client, or any program that speaks JSON-RPC
over HTTP, can use it to read and plan a Plane Gays user's trips on their behalf, after the user signs in and
approves. There is no separate REST resource API: every capability is an MCP tool.
Machine-readable versions of this page: the OpenAPI description of every HTTP endpoint, and llms.txt for agents.
When to use it
- A Plane Gays user asks an assistant to plan, look up or change one of their trips: create a trip, add activities to the itinerary, write notes, assign actions, or check what they still need to book.
- Finding a hotel or flight the user already booked and forwarded to Plane Gays.
- Seeing which friends are traveling where, from the trips they share.
- Building or attaching packing lists.
It's not for searching or booking travel, sending email, reading trips the user isn't a member of, or creating Plane Gays accounts. No tool deletes a trip.
Getting access
Access is free and self-serve. There are no API keys to request: your client registers itself with OAuth dynamic client registration, and each user approves it on a Plane Gays consent page. The user needs a Plane Gays account, which is created in the iPhone or Android app and is free during the beta. To try it, create an account in the app, then connect a client such as Claude or Codex with the steps in Connect an AI assistant.
Authentication
Plane Gays uses OAuth 2.1 with PKCE, as the MCP authorization spec describes. Most MCP clients do all of this for you when you give them the server address.
- Call
POST /mcpwithout a token. The401response'sWWW-Authenticateheader points to/.well-known/oauth-protected-resource/mcp. - Read
/.well-known/oauth-authorization-serverfor the endpoints below. - Register:
POST /registerwith yourredirect_urisandclient_name. You get aclient_id. Clients are public: there is no client secret. - Send the user's browser to
/authorizewithresponse_type=code, yourclient_idandredirect_uri, astate, an S256code_challenge,resource=https://mcp.planegays.app/mcpand, optionally, thescopeyou need. The user signs in and approves at planegays.app/connect. - Exchange the code:
POST /tokenwithgrant_type=authorization_code, thecode,redirect_uri,code_verifierandclient_id. - Send the access token as
Authorization: Bearer pgat_.... It lasts an hour. Refresh it withgrant_type=refresh_token, and use the new refresh token each time: reusing an old one revokes the connection.
A connection expires after 30 days without use, and after 90 days in all. POST /revoke with a token
and your client_id disconnects it, and users can disconnect apps themselves in Settings.
Scopes
| Scope | Allows |
|---|---|
profile:read | The user's name and username, and their own email address. |
trips:read | Trips the user is a member of: details, itinerary, actions, notes and members. |
trips:write | Create and edit those trips, including removing activities, actions and people. |
packing:read | The user's packing lists. |
packing:write | Create and edit packing lists, and attach them to trips. |
confirmations:read | Booking details read from confirmations the user forwarded. |
social:read | Summaries of trips people the user follows share, and user search. |
Omit scope to ask for all of them. Every tool needs exactly one scope.
Example requests
Discover the authorization server
curl https://mcp.planegays.app/.well-known/oauth-authorization-server
Register a client
curl -X POST https://mcp.planegays.app/register \
-H 'Content-Type: application/json' \
-d '{"client_name": "My trip agent", "redirect_uris": ["http://127.0.0.1:8976/callback"]}'
List the tools
curl -X POST https://mcp.planegays.app/mcp \
-H 'Authorization: Bearer pgat_...' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'
Call a tool
curl -X POST https://mcp.planegays.app/mcp \
-H 'Authorization: Bearer pgat_...' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc": "2.0", "id": 2, "method": "tools/call",
"params": {"name": "list_trips", "arguments": {"when": "upcoming"}}}'
The server is stateless: send every request with POST, and it answers with a single JSON
response.
Errors
Every error is JSON, never an HTML page.
- OAuth endpoints return
{"error": "...", "error_description": "..."}with the standard OAuth error codes, such asinvalid_redirect_uri,invalid_grantorunsupported_grant_type. - A missing or expired token on
/mcpreturns401withinvalid_tokenorunauthorized. Run the OAuth flow again. - Protocol errors on
/mcpare JSON-RPC errors:{"jsonrpc": "2.0", "error": {"code": -32603, "message": "..."}, "id": null}. - A tool that refuses, for example on a trip the user isn't on, returns a normal result with
isError: trueand a message saying what to do next. Tell the user rather than retrying. - Missing tool permission returns HTTP 403 with a
WWW-AuthenticateBearerinsufficient_scopechallenge. Request the indicated scopes with the user’s approval before retrying. A batch missing any permission is refused in full, before any tool runs. 404not_foundfor an unknown path,413request_too_large, and429too_many_requestswith aRetry-Afterheader.
Rate limits
- 120 tool calls per user per minute, across all of their connected apps.
- 20 client registrations per IP address per hour.
- Request bodies up to 256 KB.
Every response carries the IETF RateLimit header fields for the burst budget each network gets, so a client
can pace itself instead of waiting for a 429. The only exception is a 403 for a
browser origin that isn't allowed.
RateLimit-Policy: "burst";q=600;w=60
RateLimit: "burst";r=599;t=60
q is the requests allowed per window of w seconds, r how many are
left, and t the seconds until the window resets. A 429 always carries
Retry-After.
Versioning and deprecation
The API is versioned by MCP protocol version. Your client and the server agree on one in
initialize, and your client sends it in the MCP-Protocol-Version header on every
later request. The server supports 2025-11-25, 2025-06-18,
2025-03-26, 2024-11-05 and 2024-10-07, and answers any other version
with a 400.
Within a protocol version, tools only change additively: new tools, new optional arguments and new fields in results. Before a tool is removed or renamed, or an argument or result field is removed or changes meaning, we announce it on this page and in llms.txt at least 30 days ahead. No deprecations are scheduled.
Data rules
The API acts as the signed-in user, with the same permissions they have in the app. Trips are visible only to their members, and a trip someone isn't on looks exactly like one that doesn't exist. Other people's email addresses are never returned.