Skip to content

Commit 7d7836b

Browse files
authored
Merge pull request #208 from ShipSecAI/eng-96/tool-registry
feat(mcp): add Tool Registry Service for agent tool credentials
2 parents 0660362 + 8d32f0a commit 7d7836b

File tree

93 files changed

+7680
-2560
lines changed

Some content is hidden

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

93 files changed

+7680
-2560
lines changed

.ai/zod-first-migration.md

Lines changed: 0 additions & 192 deletions
This file was deleted.

backend/package.json

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,62 +17,63 @@
1717
"delete:runs": "bun scripts/delete-all-workflow-runs.ts"
1818
},
1919
"dependencies": {
20-
"@clerk/backend": "^2.9.4",
21-
"@clerk/types": "^4.81.0",
22-
"@grpc/grpc-js": "^1.14.0",
23-
"@nestjs/common": "^10.4.0",
24-
"@nestjs/config": "^3.2.0",
25-
"@nestjs/core": "^10.4.0",
26-
"@nestjs/platform-express": "^10.4.0",
27-
"@nestjs/swagger": "^11.2.0",
20+
"@clerk/backend": "^2.29.5",
21+
"@clerk/types": "^4.101.13",
22+
"@grpc/grpc-js": "^1.14.3",
23+
"@nestjs/common": "^10.4.22",
24+
"@nestjs/config": "^3.3.0",
25+
"@nestjs/core": "^10.4.22",
26+
"@nestjs/platform-express": "^10.4.22",
27+
"@nestjs/swagger": "^11.2.5",
2828
"@shipsec/component-sdk": "workspace:*",
2929
"@shipsec/shared": "workspace:*",
3030
"@shipsec/studio-worker": "workspace:*",
31-
"@temporalio/client": "^1.11.3",
32-
"@temporalio/worker": "^1.11.3",
33-
"@temporalio/workflow": "^1.11.3",
34-
"@types/express": "^5.0.3",
31+
"@temporalio/client": "^1.14.1",
32+
"@temporalio/worker": "^1.14.1",
33+
"@temporalio/workflow": "^1.14.1",
34+
"@types/express": "^5.0.6",
3535
"@types/minio": "^7.1.1",
36-
"ai": "^6.0.0-beta.68",
36+
"ai": "^6.0.49",
3737
"bcryptjs": "^3.0.3",
3838
"class-transformer": "^0.5.1",
39-
"class-validator": "^0.14.1",
39+
"class-validator": "^0.14.3",
4040
"date-fns": "^4.1.0",
4141
"dotenv": "^17.2.3",
42-
"drizzle-orm": "^0.44.6",
43-
"ioredis": "^5.4.1",
42+
"drizzle-orm": "^0.44.7",
43+
"express": "^5.2.1",
44+
"ioredis": "^5.9.2",
4445
"kafkajs": "^2.2.4",
45-
"long": "^5.2.4",
46+
"long": "^5.3.2",
4647
"minio": "^8.0.6",
4748
"multer": "^2.0.2",
48-
"nestjs-zod": "^5.0.1",
49-
"pg": "^8.16.3",
50-
"posthog-node": "^5.17.2",
49+
"nestjs-zod": "^5.1.1",
50+
"pg": "^8.17.2",
51+
"posthog-node": "^5.24.2",
5152
"reflect-metadata": "^0.2.2",
5253
"swagger-ui-express": "^5.0.1",
53-
"zod": "^4.1.12"
54+
"zod": "^4.3.6"
5455
},
5556
"devDependencies": {
5657
"@eslint/js": "^9.39.2",
57-
"@nestjs/testing": "^10.4.0",
58+
"@nestjs/testing": "^10.4.22",
5859
"@types/bcryptjs": "^3.0.0",
59-
"@types/express-serve-static-core": "^4.19.6",
60+
"@types/express-serve-static-core": "^4.19.8",
6061
"@types/har-format": "^1.2.16",
6162
"@types/multer": "^2.0.0",
62-
"@types/node": "^20.16.11",
63-
"@types/pg": "^8.15.5",
63+
"@types/node": "^20.19.30",
64+
"@types/pg": "^8.16.0",
6465
"@types/supertest": "^2.0.16",
65-
"@typescript-eslint/eslint-plugin": "^8.53.0",
66-
"@typescript-eslint/parser": "^8.53.0",
67-
"bun-types": "^1.2.23",
68-
"drizzle-kit": "^0.31.5",
66+
"@typescript-eslint/eslint-plugin": "^8.53.1",
67+
"@typescript-eslint/parser": "^8.53.1",
68+
"bun-types": "^1.3.6",
69+
"drizzle-kit": "^0.31.8",
6970
"eslint": "^9.39.2",
7071
"eslint-config-prettier": "^10.1.8",
7172
"eslint-plugin-prettier": "^5.5.5",
72-
"globals": "^17.0.0",
73-
"prettier": "^3.8.0",
74-
"supertest": "^7.1.4",
75-
"typescript": "^5.6.3",
76-
"typescript-eslint": "^8.53.0"
73+
"globals": "^17.1.0",
74+
"prettier": "^3.8.1",
75+
"supertest": "^7.2.2",
76+
"typescript": "^5.9.3",
77+
"typescript-eslint": "^8.53.1"
7778
}
7879
}

backend/src/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { TestingSupportModule } from './testing/testing.module';
1818
import { IntegrationsModule } from './integrations/integrations.module';
1919
import { SchedulesModule } from './schedules/schedules.module';
2020
import { AnalyticsModule } from './analytics/analytics.module';
21+
import { McpModule } from './mcp/mcp.module';
2122

2223
import { ApiKeysModule } from './api-keys/api-keys.module';
2324
import { WebhooksModule } from './webhooks/webhooks.module';
@@ -37,6 +38,7 @@ const coreModules = [
3738
ApiKeysModule,
3839
WebhooksModule,
3940
HumanInputsModule,
41+
McpModule,
4042
];
4143

4244
const testingModules = process.env.NODE_ENV === 'production' ? [] : [TestingSupportModule];

backend/src/components/components.controller.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import '@shipsec/studio-worker/components';
66
import {
77
componentRegistry,
88
extractPorts,
9+
getToolSchema,
910
type CachedComponentMetadata,
1011
} from '@shipsec/component-sdk';
1112
import { categorizeComponent, getCategoryConfig } from './utils/categorization';
@@ -45,6 +46,8 @@ function serializeComponent(entry: CachedComponentMetadata) {
4546
outputs: entry.outputs ?? [],
4647
parameters: entry.parameters ?? [],
4748
examples: metadata.examples ?? [],
49+
agentTool: metadata.agentTool ?? null,
50+
toolSchema: metadata.agentTool?.enabled ? getToolSchema(component) : null,
4851
};
4952
}
5053

@@ -221,6 +224,15 @@ export class ComponentsController {
221224
type: 'array',
222225
items: { type: 'string' },
223226
},
227+
agentTool: {
228+
type: 'object',
229+
nullable: true,
230+
properties: {
231+
enabled: { type: 'boolean' },
232+
toolName: { type: 'string', nullable: true },
233+
toolDescription: { type: 'string', nullable: true },
234+
},
235+
},
224236
},
225237
},
226238
},
@@ -334,9 +346,17 @@ export class ComponentsController {
334346
},
335347
parameters: { type: 'array' },
336348
examples: { type: 'array' },
337-
isLatest: { type: 'boolean', nullable: true },
338349
deprecated: { type: 'boolean', nullable: true },
339350
example: { type: 'string', nullable: true },
351+
agentTool: {
352+
type: 'object',
353+
nullable: true,
354+
properties: {
355+
enabled: { type: 'boolean' },
356+
toolName: { type: 'string', nullable: true },
357+
toolDescription: { type: 'string', nullable: true },
358+
},
359+
},
340360
},
341361
},
342362
})

backend/src/components/utils/categorization.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const SUPPORTED_CATEGORIES: readonly ComponentCategory[] = [
1212
'input',
1313
'transform',
1414
'ai',
15+
'mcp',
1516
'security',
1617
'it_ops',
1718
'notification',
@@ -41,6 +42,13 @@ const COMPONENT_CATEGORY_CONFIG: Record<ComponentCategory, ComponentCategoryConf
4142
emoji: '🤖',
4243
icon: 'Brain',
4344
},
45+
mcp: {
46+
label: 'MCP Servers',
47+
color: 'text-teal-600',
48+
description: 'Model Context Protocol servers and tool gateways',
49+
emoji: '🔌',
50+
icon: 'Plug',
51+
},
4452
security: {
4553
label: 'Security Tools',
4654
color: 'text-red-600',

0 commit comments

Comments
 (0)