@lindblad/complai-mcp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,169 @@
1
+ /**
2
+ * Configuration for the COMPLAI MCP server
3
+ */
4
+ export interface ComplaiConfig {
5
+ auth0: {
6
+ domain: string;
7
+ clientId: string;
8
+ clientSecret?: string;
9
+ audience: string;
10
+ };
11
+ api: {
12
+ baseUrl: string;
13
+ organizationId?: string;
14
+ };
15
+ cache?: {
16
+ tokenTtlSeconds?: number;
17
+ };
18
+ }
19
+ /**
20
+ * Organization info from /me endpoint
21
+ */
22
+ export interface UserOrganization {
23
+ id: string;
24
+ name: string;
25
+ displayName?: string;
26
+ }
27
+ /**
28
+ * User profile from /me endpoint
29
+ */
30
+ export interface UserProfile {
31
+ id: string;
32
+ email: string;
33
+ organizations: UserOrganization[];
34
+ organizationId?: string;
35
+ }
36
+ /**
37
+ * Response format for the compliance brief tool
38
+ * Optimized for AI consumption with human-readable summaries
39
+ */
40
+ export interface ComplianceBriefResponse {
41
+ summary: {
42
+ description: string;
43
+ dataRooms: number;
44
+ assets: number;
45
+ manufacturers: number;
46
+ totalTasks: number;
47
+ overdueActions: number;
48
+ };
49
+ riskDistribution: Array<{
50
+ level: string;
51
+ count: number;
52
+ percentage: number;
53
+ }>;
54
+ taskStatus: {
55
+ overdue: number;
56
+ dueThisWeek: number;
57
+ onTrack: number;
58
+ noDeadline: number;
59
+ };
60
+ alerts: string[];
61
+ }
62
+ /**
63
+ * Custom status data from api-auth0
64
+ */
65
+ export interface CustomStatusData {
66
+ color: string;
67
+ displayName: string;
68
+ elementsAmount: number;
69
+ }
70
+ /**
71
+ * Task deadline summary from api-auth0
72
+ * Arrays contain task IDs
73
+ */
74
+ export interface TaskDeadlineSummary {
75
+ before: string[];
76
+ after: string[];
77
+ completed: string[];
78
+ noDeadline: string[];
79
+ }
80
+ /**
81
+ * Dashboard overview response from api-auth0
82
+ * Matches: POST /dashboards/charts/overview
83
+ */
84
+ export interface DashboardOverviewResponse {
85
+ dataRoomIds: string[];
86
+ assetsAmount: number;
87
+ manufacturersAmount: number;
88
+ dataRoomsAmount: number;
89
+ tasksAmount: number;
90
+ openActions: number;
91
+ riskRating: Record<string, CustomStatusData>;
92
+ taskDeadline: TaskDeadlineSummary;
93
+ }
94
+ /**
95
+ * Auth0 token response
96
+ */
97
+ export interface Auth0TokenResponse {
98
+ access_token: string;
99
+ refresh_token?: string;
100
+ token_type: string;
101
+ expires_in: number;
102
+ }
103
+ /**
104
+ * Cached token with expiry
105
+ */
106
+ export interface CachedToken {
107
+ token: string;
108
+ expiresAt: number;
109
+ }
110
+ /**
111
+ * Paginated response wrapper (standard format)
112
+ */
113
+ export interface PaginatedResponse<T> {
114
+ count: number;
115
+ data: T[];
116
+ }
117
+ /**
118
+ * Audit rooms response (uses 'auditRooms' instead of 'data')
119
+ */
120
+ export interface AuditRoomsResponse {
121
+ count: number;
122
+ auditRooms: AuditRoomListItem[];
123
+ }
124
+ /**
125
+ * Status overview (engagement, risk rating)
126
+ */
127
+ export interface StatusOverview {
128
+ displayName: string;
129
+ color: string;
130
+ }
131
+ /**
132
+ * Task completion status overview
133
+ */
134
+ export interface TaskStatusOverview {
135
+ templateId: string;
136
+ templateName: string;
137
+ status: string;
138
+ statusName: string;
139
+ color: string;
140
+ }
141
+ /**
142
+ * Manufacturer details
143
+ */
144
+ export interface ManufacturerDetails {
145
+ id: string;
146
+ name: string;
147
+ country?: string;
148
+ }
149
+ /**
150
+ * Audit room list item from /audit-rooms endpoint
151
+ */
152
+ export interface AuditRoomListItem {
153
+ id: string;
154
+ name: string;
155
+ assetsCount: number;
156
+ tags: string[];
157
+ personResponsible?: string;
158
+ ownerIds: string[];
159
+ shortDescription?: string;
160
+ createdAt: string;
161
+ dueDate?: string;
162
+ engagement?: StatusOverview | null;
163
+ riskRating?: StatusOverview | null;
164
+ taskCompletion?: TaskStatusOverview[];
165
+ manufacturer?: ManufacturerDetails | null;
166
+ workspaceIds: string[];
167
+ ownerOrganizationName?: string;
168
+ }
169
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,EAAE;QACH,OAAO,EAAE,MAAM,CAAC;QAChB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,CAAC,EAAE;QACN,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE;QACP,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,gBAAgB,EAAE,KAAK,CAAC;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;IACH,UAAU,E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
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@lindblad/complai-mcp",
3
+ "version": "0.1.0",
4
+ "description": "MCP server providing COMPLAI compliance overview tools for AI assistants",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "complai-mcp": "dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist/",
12
+ "README.md"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsc",
16
+ "dev": "tsc --watch",
17
+ "start": "node dist/index.js",
18
+ "inspector": "npx @modelcontextprotocol/inspector node dist/index.js"
19
+ },
20
+ "keywords": [
21
+ "mcp",
22
+ "model-context-protocol",
23
+ "complai",
24
+ "compliance",
25
+ "ai-assistant"
26
+ ],
27
+ "author": "COMPLAI",
28
+ "license": "MIT",
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "engines": {
33
+ "node": ">=18.0.0"
34
+ },
35
+ "dependencies": {
36
+ "@modelcontextprotocol/sdk": "^1.0.0",
37
+ "open": "^11.0.0",
38
+ "zod": "^3.23.0"
39
+ },
40
+ "devDependencies": {
41
+ "@types/node": "^22.0.0",
42
+ "@types/open": "^6.1.0",
43
+ "typescript": "^5.6.0"
44
+ }
45
+ }