Skip to content

Commit 374e6fb

Browse files
committed
feat(backend): env and arg on user team and user level
1 parent e35ed2d commit 374e6fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+10466
-489
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ Our roadmap is designed to build the essential infrastructure for using MCP secu
110110

111111
### Phase 3: Enterprise Governance (Current Focus)
112112

113+
- **[Done]** Auto-install MCP servers for new users with admin-controlled defaults.
114+
- **[Done]** Featured MCP servers filtering for improved tool discovery.
115+
- **[Done]** Global Event Bus System (Phase 2) - event-driven architecture with plugin integration.
113116
- **[To Do]** Build out Audit Logging features in the cloud UI.
114117
- **[To Do]** Develop Analytics dashboards for tool usage and performance.
115118
- **[To Do]** Add `deploystack logs` command for real-time gateway activity monitoring.

services/backend/api-spec.json

Lines changed: 2529 additions & 52 deletions
Large diffs are not rendered by default.

services/backend/api-spec.yaml

Lines changed: 1858 additions & 144 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE `mcpServerInstallations` ADD `user_args` text;--> statement-breakpoint
2+
ALTER TABLE `mcpServers` ADD `args` text;
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
CREATE TABLE `mcpUserConfigurations` (
2+
`id` text PRIMARY KEY NOT NULL,
3+
`installation_id` text NOT NULL,
4+
`user_id` text NOT NULL,
5+
`device_name` text,
6+
`user_args` text,
7+
`user_env` text,
8+
`created_at` integer NOT NULL,
9+
`updated_at` integer NOT NULL,
10+
`last_used_at` integer,
11+
FOREIGN KEY (`installation_id`) REFERENCES `mcpServerInstallations`(`id`) ON UPDATE no action ON DELETE cascade,
12+
FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade
13+
);
14+
--> statement-breakpoint
15+
CREATE INDEX `mcp_user_configs_installation_user_idx` ON `mcpUserConfigurations` (`installation_id`,`user_id`);--> statement-breakpoint
16+
CREATE INDEX `mcp_user_configs_user_idx` ON `mcpUserConfigurations` (`user_id`);--> statement-breakpoint
17+
CREATE INDEX `mcp_user_configs_installation_idx` ON `mcpUserConfigurations` (`installation_id`);--> statement-breakpoint
18+
CREATE INDEX `mcp_user_configs_unique_user_installation` ON `mcpUserConfigurations` (`installation_id`,`user_id`,`device_name`);--> statement-breakpoint
19+
PRAGMA foreign_keys=OFF;--> statement-breakpoint
20+
CREATE TABLE `__new_mcpServerInstallations` (
21+
`id` text PRIMARY KEY NOT NULL,
22+
`team_id` text NOT NULL,
23+
`server_id` text NOT NULL,
24+
`created_by` text NOT NULL,
25+
`installation_name` text NOT NULL,
26+
`installation_type` text DEFAULT 'local' NOT NULL,
27+
`team_args` text,
28+
`team_env` text,
29+
`created_at` integer NOT NULL,
30+
`updated_at` integer NOT NULL,
31+
`last_used_at` integer,
32+
FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE cascade,
33+
FOREIGN KEY (`server_id`) REFERENCES `mcpServers`(`id`) ON UPDATE no action ON DELETE cascade,
34+
FOREIGN KEY (`created_by`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE no action
35+
);
36+
--> statement-breakpoint
37+
INSERT INTO `__new_mcpServerInstallations`("id", "team_id", "server_id", "created_by", "installation_name", "installation_type", "team_args", "team_env", "created_at", "updated_at", "last_used_at") SELECT "id", "team_id", "server_id", "created_by", "installation_name", "installation_type", "team_args", "team_env", "created_at", "updated_at", "last_used_at" FROM `mcpServerInstallations`;--> statement-breakpoint
38+
DROP TABLE `mcpServerInstallations`;--> statement-breakpoint
39+
ALTER TABLE `__new_mcpServerInstallations` RENAME TO `mcpServerInstallations`;--> statement-breakpoint
40+
PRAGMA foreign_keys=ON;--> statement-breakpoint
41+
CREATE INDEX `mcp_installations_team_name_idx` ON `mcpServerInstallations` (`team_id`,`installation_name`);--> statement-breakpoint
42+
CREATE INDEX `mcp_installations_team_server_idx` ON `mcpServerInstallations` (`team_id`,`server_id`);--> statement-breakpoint
43+
CREATE INDEX `mcp_installations_created_by_idx` ON `mcpServerInstallations` (`created_by`);--> statement-breakpoint
44+
ALTER TABLE `mcpServers` ADD `template_args` text;--> statement-breakpoint
45+
ALTER TABLE `mcpServers` ADD `template_env` text;--> statement-breakpoint
46+
ALTER TABLE `mcpServers` ADD `team_args_schema` text;--> statement-breakpoint
47+
ALTER TABLE `mcpServers` ADD `team_env_schema` text;--> statement-breakpoint
48+
ALTER TABLE `mcpServers` ADD `user_args_schema` text;--> statement-breakpoint
49+
ALTER TABLE `mcpServers` ADD `user_env_schema` text;--> statement-breakpoint
50+
ALTER TABLE `mcpServers` DROP COLUMN `environment_variables`;--> statement-breakpoint
51+
ALTER TABLE `mcpServers` DROP COLUMN `args`;

0 commit comments

Comments
 (0)