Skip to content

Commit 424a4bc

Browse files
author
Lasim
committed
feat(backend): implement OAuthDiscoveryService for detecting and discovering OAuth metadata from MCP servers
1 parent 44bbbc2 commit 424a4bc

File tree

10 files changed

+5062
-11
lines changed

10 files changed

+5062
-11
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
CREATE TABLE `mcpOauthTokens` (
2+
`id` text PRIMARY KEY NOT NULL,
3+
`installation_id` text NOT NULL,
4+
`user_id` text NOT NULL,
5+
`team_id` text NOT NULL,
6+
`access_token` text NOT NULL,
7+
`refresh_token` text,
8+
`token_type` text DEFAULT 'Bearer' NOT NULL,
9+
`expires_at` integer,
10+
`scope` text,
11+
`created_at` integer NOT NULL,
12+
`updated_at` integer NOT NULL,
13+
FOREIGN KEY (`installation_id`) REFERENCES `mcpServerInstallations`(`id`) ON UPDATE no action ON DELETE cascade,
14+
FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade,
15+
FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE cascade
16+
);
17+
--> statement-breakpoint
18+
CREATE INDEX `mcp_oauth_tokens_installation_user_team_idx` ON `mcpOauthTokens` (`installation_id`,`user_id`,`team_id`);--> statement-breakpoint
19+
ALTER TABLE `mcpServers` ADD `requires_oauth` integer DEFAULT false NOT NULL;

0 commit comments

Comments
 (0)