misp-mcp 1.1.0 → 1.3.4

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,349 @@
1
+ interface MispConfig {
2
+ url: string;
3
+ apiKey: string;
4
+ verifySsl: boolean;
5
+ timeout: number;
6
+ }
7
+ declare function getConfig(): MispConfig;
8
+
9
+ interface MispEvent {
10
+ id: string;
11
+ orgc_id: string;
12
+ org_id: string;
13
+ info: string;
14
+ date: string;
15
+ threat_level_id: string;
16
+ analysis: string;
17
+ distribution: string;
18
+ published: boolean;
19
+ uuid: string;
20
+ timestamp: string;
21
+ publish_timestamp: string;
22
+ attribute_count: string;
23
+ Orgc?: {
24
+ id: string;
25
+ name: string;
26
+ uuid: string;
27
+ };
28
+ Org?: {
29
+ id: string;
30
+ name: string;
31
+ uuid: string;
32
+ };
33
+ Tag?: MispTag[];
34
+ Attribute?: MispAttribute[];
35
+ Object?: MispObject[];
36
+ Galaxy?: MispGalaxy[];
37
+ RelatedEvent?: Array<{
38
+ Event: MispEvent;
39
+ }>;
40
+ }
41
+ interface MispAttribute {
42
+ id: string;
43
+ event_id: string;
44
+ type: string;
45
+ category: string;
46
+ value: string;
47
+ to_ids: boolean;
48
+ uuid: string;
49
+ timestamp: string;
50
+ distribution: string;
51
+ comment: string;
52
+ deleted: boolean;
53
+ Tag?: MispTag[];
54
+ Event?: Partial<MispEvent>;
55
+ SharingGroup?: Record<string, unknown>;
56
+ RelatedAttribute?: Array<{
57
+ id: string;
58
+ value: string;
59
+ type: string;
60
+ event_id: string;
61
+ }>;
62
+ }
63
+ interface MispObject {
64
+ id: string;
65
+ name: string;
66
+ meta_category: string;
67
+ description: string;
68
+ uuid: string;
69
+ timestamp: string;
70
+ distribution: string;
71
+ event_id: string;
72
+ Attribute?: (MispAttribute & {
73
+ object_relation?: string;
74
+ })[];
75
+ }
76
+ interface MispObjectTemplate {
77
+ id: string;
78
+ uuid: string;
79
+ name: string;
80
+ description: string;
81
+ version: string;
82
+ meta_category: string;
83
+ ObjectTemplateElement?: Array<{
84
+ object_relation: string;
85
+ type: string;
86
+ description: string;
87
+ ui_priority: number;
88
+ categories: string[];
89
+ sane_default?: string[];
90
+ values_list?: string[];
91
+ multiple?: boolean;
92
+ disable_correlation?: boolean;
93
+ }>;
94
+ }
95
+ interface MispFeed {
96
+ id: string;
97
+ name: string;
98
+ provider: string;
99
+ url: string;
100
+ enabled: boolean;
101
+ source_format: string;
102
+ distribution: string;
103
+ event_id: string;
104
+ caching_enabled: boolean;
105
+ }
106
+ interface MispOrganisation {
107
+ id: string;
108
+ name: string;
109
+ uuid: string;
110
+ description: string;
111
+ nationality: string;
112
+ sector: string;
113
+ type: string;
114
+ local: boolean;
115
+ }
116
+ interface MispGalaxyCluster {
117
+ id: string;
118
+ uuid: string;
119
+ type: string;
120
+ value: string;
121
+ tag_name: string;
122
+ description: string;
123
+ galaxy_id: string;
124
+ }
125
+ interface MispSharingGroup {
126
+ id: string;
127
+ name: string;
128
+ description: string;
129
+ uuid: string;
130
+ releasability: string;
131
+ active: boolean;
132
+ org_count: number;
133
+ }
134
+ interface MispServerVersion {
135
+ version: string;
136
+ pymisp_recommended_version: string;
137
+ perm_sync: boolean;
138
+ perm_sighting: boolean;
139
+ perm_galaxy_editor: boolean;
140
+ perm_analyst_data: boolean;
141
+ }
142
+ interface MispTag {
143
+ id: string;
144
+ name: string;
145
+ colour: string;
146
+ exportable: boolean;
147
+ org_id?: string;
148
+ numerical_value?: string;
149
+ attribute_count?: string;
150
+ event_count?: string;
151
+ }
152
+ interface MispGalaxy {
153
+ id: string;
154
+ uuid: string;
155
+ name: string;
156
+ type: string;
157
+ description: string;
158
+ GalaxyCluster?: Array<{
159
+ id: string;
160
+ uuid: string;
161
+ type: string;
162
+ value: string;
163
+ tag_name: string;
164
+ description: string;
165
+ }>;
166
+ }
167
+ interface MispSighting {
168
+ id: string;
169
+ attribute_id: string;
170
+ event_id: string;
171
+ org_id: string;
172
+ date_sighting: string;
173
+ source: string;
174
+ type: string;
175
+ }
176
+ interface MispWarninglistMatch {
177
+ id: string;
178
+ name: string;
179
+ type: string;
180
+ description: string;
181
+ category: string;
182
+ warninglist_entry_count: string;
183
+ }
184
+ interface DescribeTypesResponse {
185
+ result: {
186
+ sane_defaults: Record<string, {
187
+ default_category: string;
188
+ to_ids: number;
189
+ }>;
190
+ types: string[];
191
+ categories: string[];
192
+ category_type_mappings: Record<string, string[]>;
193
+ };
194
+ }
195
+ interface WarninglistCheckResponse {
196
+ [value: string]: MispWarninglistMatch[];
197
+ }
198
+ interface StatisticsResponse {
199
+ [key: string]: string | number;
200
+ }
201
+
202
+ declare class MispClient {
203
+ private baseUrl;
204
+ private apiKey;
205
+ private timeout;
206
+ private dispatcher;
207
+ constructor(config: MispConfig);
208
+ private request;
209
+ searchEvents(params: {
210
+ value?: string;
211
+ type?: string;
212
+ category?: string;
213
+ tags?: string[];
214
+ eventid?: string;
215
+ org?: string;
216
+ dateFrom?: string;
217
+ dateTo?: string;
218
+ last?: string;
219
+ published?: boolean;
220
+ limit?: number;
221
+ page?: number;
222
+ }): Promise<MispEvent[]>;
223
+ getEvent(eventId: string): Promise<MispEvent>;
224
+ createEvent(params: {
225
+ info: string;
226
+ distribution: number;
227
+ threat_level_id: number;
228
+ analysis: number;
229
+ date?: string;
230
+ tags?: string[];
231
+ }): Promise<MispEvent>;
232
+ updateEvent(eventId: string, params: {
233
+ info?: string;
234
+ threat_level_id?: number;
235
+ analysis?: number;
236
+ }): Promise<MispEvent>;
237
+ publishEvent(eventId: string): Promise<{
238
+ message: string;
239
+ }>;
240
+ tagEvent(eventId: string, tag: string): Promise<unknown>;
241
+ untagEvent(eventId: string, tag: string): Promise<unknown>;
242
+ searchAttributes(params: {
243
+ value?: string;
244
+ type?: string;
245
+ category?: string;
246
+ tags?: string[];
247
+ to_ids?: boolean;
248
+ includeCorrelations?: boolean;
249
+ last?: string;
250
+ limit?: number;
251
+ }): Promise<MispAttribute[]>;
252
+ addAttribute(eventId: string, params: {
253
+ type: string;
254
+ value: string;
255
+ category?: string;
256
+ to_ids?: boolean;
257
+ comment?: string;
258
+ distribution?: number;
259
+ tags?: string[];
260
+ }): Promise<MispAttribute>;
261
+ deleteAttribute(attributeId: string, hard?: boolean): Promise<{
262
+ message: string;
263
+ }>;
264
+ describeTypes(): Promise<DescribeTypesResponse["result"]>;
265
+ listTags(search?: string): Promise<MispTag[]>;
266
+ addSighting(params: {
267
+ attributeId?: string;
268
+ value?: string;
269
+ type: number;
270
+ source?: string;
271
+ timestamp?: string;
272
+ }): Promise<MispSighting>;
273
+ checkWarninglists(value: string): Promise<WarninglistCheckResponse>;
274
+ getStatistics(): Promise<StatisticsResponse>;
275
+ listTaxonomies(): Promise<Array<{
276
+ namespace: string;
277
+ description: string;
278
+ version: string;
279
+ enabled: boolean;
280
+ }>>;
281
+ exportEvents(params: {
282
+ eventId?: string;
283
+ format: string;
284
+ type?: string;
285
+ tags?: string[];
286
+ last?: string;
287
+ }): Promise<string>;
288
+ exportHashes(params: {
289
+ format: string;
290
+ last?: string;
291
+ tags?: string[];
292
+ }): Promise<string>;
293
+ listObjectTemplates(): Promise<MispObjectTemplate[]>;
294
+ getObjectTemplate(templateId: string): Promise<MispObjectTemplate>;
295
+ addObject(eventId: string, params: {
296
+ name: string;
297
+ attributes: Array<{
298
+ object_relation: string;
299
+ type: string;
300
+ value: string;
301
+ to_ids?: boolean;
302
+ comment?: string;
303
+ }>;
304
+ comment?: string;
305
+ distribution?: number;
306
+ }): Promise<MispObject>;
307
+ deleteObject(objectId: string, hard?: boolean): Promise<{
308
+ message: string;
309
+ }>;
310
+ listGalaxies(): Promise<Array<{
311
+ id: string;
312
+ name: string;
313
+ type: string;
314
+ description: string;
315
+ uuid: string;
316
+ }>>;
317
+ getGalaxy(galaxyId: string): Promise<{
318
+ id: string;
319
+ uuid: string;
320
+ name: string;
321
+ type: string;
322
+ description: string;
323
+ GalaxyCluster?: MispGalaxyCluster[];
324
+ }>;
325
+ searchGalaxyClusters(search: string, galaxyType?: string): Promise<MispGalaxyCluster[]>;
326
+ attachGalaxyCluster(targetType: "event" | "attribute", targetId: string, galaxyClusterId: string): Promise<unknown>;
327
+ listFeeds(): Promise<MispFeed[]>;
328
+ toggleFeed(feedId: string, enable: boolean): Promise<{
329
+ message: string;
330
+ }>;
331
+ fetchFeed(feedId: string): Promise<{
332
+ message: string;
333
+ }>;
334
+ cacheFeed(feedId: string): Promise<{
335
+ message: string;
336
+ }>;
337
+ listOrganisations(scope?: "local" | "external" | "all"): Promise<MispOrganisation[]>;
338
+ getOrganisation(orgId: string): Promise<MispOrganisation>;
339
+ getVersion(): Promise<MispServerVersion>;
340
+ getServerSettings(): Promise<{
341
+ diagnostics?: unknown;
342
+ }>;
343
+ listSharingGroups(): Promise<MispSharingGroup[]>;
344
+ deleteEvent(eventId: string): Promise<{
345
+ message: string;
346
+ }>;
347
+ }
348
+
349
+ export { type MispConfig as M, MispClient as a, getConfig as g };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,29 @@
1
+ import { M as MispConfig, a as MispClient } from './client-D1YKT07H.js';
2
+ export { g as getConfig } from './client-D1YKT07H.js';
3
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
1
4
 
2
- export { }
5
+ interface MispServerDeps {
6
+ config?: MispConfig;
7
+ client?: MispClient;
8
+ }
9
+ declare function createMispMcpServer(deps?: MispServerDeps): McpServer;
10
+ declare function serveMcp(): Promise<void>;
11
+
12
+ declare class CliGateError extends Error {
13
+ constructor(message: string);
14
+ }
15
+ declare function requireDestructiveCliGate(options: {
16
+ commandName: string;
17
+ env?: NodeJS.ProcessEnv;
18
+ confirm?: boolean;
19
+ destructive?: boolean;
20
+ }): void;
21
+ declare function requireHardDeleteCliGate(options: {
22
+ commandName: string;
23
+ env?: NodeJS.ProcessEnv;
24
+ confirm?: boolean;
25
+ destructive?: boolean;
26
+ confirmHard?: boolean;
27
+ }): void;
28
+
29
+ export { CliGateError, MispClient, MispConfig, createMispMcpServer, requireDestructiveCliGate, requireHardDeleteCliGate, serveMcp };