Skip to content

Commit 898a98a

Browse files
committed
fix(backend): create instances and assign satellite for OAuth MCP server installations
The OAuth callback flow was missing instance creation and satellite assignment that the normal installation flow (create.ts) already had. This caused OAuth-requiring servers (Notion, Neon, Box, Linear) to have null satellite_id and no entries in mcpServerInstances, so the satellite never spawned processes for them. - Add satellite_id column to oauthPendingFlows table to carry it through the OAuth redirect flow (authorize -> popup -> callback) - Add satellite_id to OAuth authorize request schema and validate it using SatelliteValidationService with autoSelect, matching create.ts - Set satellite_id on the installation record from the pending flow - Create instance for installing user with status 'connecting' after successful OAuth token exchange - Create instances for other team members with status 'awaiting_user_config' so they can complete their own OAuth
1 parent 80f0b30 commit 898a98a

File tree

7 files changed

+6677
-0
lines changed

7 files changed

+6677
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE "oauthPendingFlows" ADD COLUMN "satellite_id" text;--> statement-breakpoint
2+
ALTER TABLE "oauthPendingFlows" ADD CONSTRAINT "oauthPendingFlows_satellite_id_satellites_id_fk" FOREIGN KEY ("satellite_id") REFERENCES "public"."satellites"("id") ON DELETE set null ON UPDATE no action;

0 commit comments

Comments
 (0)