From 1187883c6bdaa85e9d1432cc9f1101c0a5d53533 Mon Sep 17 00:00:00 2001 From: jubnl Date: Fri, 10 Apr 2026 02:44:45 +0200 Subject: [PATCH] feat(mcp): always register list_trips & get_trip_summary; inject deprecation notice into tool results MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Navigation tools: - list_trips and get_trip_summary are now always registered for any OAuth session regardless of granted scopes — they are required for trip ID discovery before any scoped tool can be used - get_trip_summary filters optional sections (budget, packing, collab, reservations) by the client's OAuth scopes when called without trips:read Deprecation notice: - Inject static token deprecation warning into the first tool result (list_trips or get_trip_summary) via a per-session closure so Claude is forced to surface it — the instructions field alone is only background context and is not proactively shown to the user UI: - OAuth client creation modal: add hint explaining the always-available tools, remove the "must select at least one scope" submit guard - OAuth consent screen: add "Always included" section showing list_trips and get_trip_summary; handles zero-scope clients gracefully (empty permissions section is hidden) --- .../components/Settings/IntegrationsTab.tsx | 5 +- client/src/i18n/translations/en.ts | 1 + client/src/pages/OAuthAuthorizePage.tsx | 71 +++++++++++++------ server/src/mcp/index.ts | 12 +++- server/src/mcp/tools.ts | 4 +- server/src/mcp/tools/trips.ts | 45 ++++++++---- 6 files changed, 97 insertions(+), 41 deletions(-) diff --git a/client/src/components/Settings/IntegrationsTab.tsx b/client/src/components/Settings/IntegrationsTab.tsx index afd2c40c..4bbc3413 100644 --- a/client/src/components/Settings/IntegrationsTab.tsx +++ b/client/src/components/Settings/IntegrationsTab.tsx @@ -552,7 +552,7 @@ export default function IntegrationsTab(): React.ReactElement {
-
+
+

{t('settings.oauth.modal.scopesHint')}

{Object.entries(scopesByGroup).map(([group, groupScopes]) => { const groupScopeKeys = groupScopes.map(s => s.scope) @@ -625,7 +626,7 @@ export default function IntegrationsTab(): React.ReactElement { {t('common.cancel')}