misp-mcp 1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Solomon Neas
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,336 @@
1
+ # misp-mcp
2
+
3
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue.svg)](https://www.typescriptlang.org/)
4
+ [![Node.js](https://img.shields.io/badge/Node.js-20%2B-green.svg)](https://nodejs.org/)
5
+ [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-1.x-purple.svg)](https://modelcontextprotocol.io/)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
+
8
+ An MCP (Model Context Protocol) server for [MISP](https://www.misp-project.org/) (Malware Information Sharing Platform & Threat Intelligence Sharing). Enables LLMs to perform IOC lookups, manage events, discover correlations, and export threat intelligence directly from your MISP instance.
9
+
10
+ ## Features
11
+
12
+ - **36 MCP Tools** covering events, attributes, correlations, tags, exports, sightings, warninglists, objects, galaxies, feeds, organisations, and server management
13
+ - **3 MCP Resources** for browsing attribute types, instance statistics, and available taxonomies
14
+ - **3 MCP Prompts** for guided IOC investigation, incident event creation, and threat reporting
15
+ - **SSL Flexibility** for self-signed certificates common in MISP deployments
16
+ - **Export Formats** including CSV, STIX, Suricata, Snort, text, RPZ, and hash lists
17
+ - **MITRE ATT&CK Integration** via galaxy cluster search and attachment
18
+ - **Bulk Operations** for adding multiple IOCs to events in a single call
19
+ - **Correlation Engine** for discovering cross-event relationships through shared indicators
20
+
21
+ ## Prerequisites
22
+
23
+ - Node.js 20 or later
24
+ - A running MISP instance with API access
25
+ - MISP API key (generated from MISP UI: Administration > List Auth Keys)
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ git clone https://github.com/solomonneas/misp-mcp.git
31
+ cd misp-mcp
32
+ npm install
33
+ npm run build
34
+ ```
35
+
36
+ ## Configuration
37
+
38
+ Set the following environment variables:
39
+
40
+ ```bash
41
+ export MISP_URL=https://misp.example.com
42
+ export MISP_API_KEY=your-api-key-here
43
+ export MISP_VERIFY_SSL=true # Set to 'false' for self-signed certificates
44
+ ```
45
+
46
+ | Variable | Required | Default | Description |
47
+ |----------|----------|---------|-------------|
48
+ | `MISP_URL` | Yes | - | MISP instance base URL |
49
+ | `MISP_API_KEY` | Yes | - | API authentication key |
50
+ | `MISP_VERIFY_SSL` | No | `true` | Set `false` for self-signed certs |
51
+ | `MISP_TIMEOUT` | No | `30` | Request timeout in seconds |
52
+
53
+ ## Usage
54
+
55
+ ### Claude Desktop
56
+
57
+ Add to your Claude Desktop MCP config (`claude_desktop_config.json`):
58
+
59
+ ```json
60
+ {
61
+ "mcpServers": {
62
+ "misp": {
63
+ "command": "node",
64
+ "args": ["/path/to/misp-mcp/dist/index.js"],
65
+ "env": {
66
+ "MISP_URL": "https://misp.example.com",
67
+ "MISP_API_KEY": "your-api-key-here",
68
+ "MISP_VERIFY_SSL": "false"
69
+ }
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ ### OpenClaw
76
+
77
+ Add to your `openclaw.json` MCP servers:
78
+
79
+ ```json
80
+ {
81
+ "mcp": {
82
+ "servers": {
83
+ "misp": {
84
+ "command": "node",
85
+ "args": ["/path/to/misp-mcp/dist/index.js"],
86
+ "env": {
87
+ "MISP_URL": "https://misp.example.com",
88
+ "MISP_API_KEY": "your-api-key-here",
89
+ "MISP_VERIFY_SSL": "false"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ ```
96
+
97
+ ### Standalone
98
+
99
+ ```bash
100
+ MISP_URL=https://misp.example.com MISP_API_KEY=your-key node dist/index.js
101
+ ```
102
+
103
+ ### Docker
104
+
105
+ ```bash
106
+ docker build -t misp-mcp .
107
+ docker run -e MISP_URL=https://misp.example.com -e MISP_API_KEY=your-key -e MISP_VERIFY_SSL=false misp-mcp
108
+ ```
109
+
110
+ ### Development
111
+
112
+ ```bash
113
+ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
114
+ ```
115
+
116
+ ## Tools Reference
117
+
118
+ ### Event Tools (6)
119
+
120
+ | Tool | Description |
121
+ |------|-------------|
122
+ | `misp_search_events` | Search events by IOC value, type, tags, date range, organization |
123
+ | `misp_get_event` | Get full event details including attributes, objects, galaxies, related events |
124
+ | `misp_create_event` | Create a new event with threat level, distribution, and analysis status |
125
+ | `misp_update_event` | Update event metadata (info, threat level, analysis, publish state) |
126
+ | `misp_publish_event` | Publish an event to trigger alerts to sharing partners |
127
+ | `misp_tag_event` | Add or remove tags (TLP, MITRE ATT&CK, custom) from an event |
128
+
129
+ ### Attribute Tools (4)
130
+
131
+ | Tool | Description |
132
+ |------|-------------|
133
+ | `misp_search_attributes` | Search IOCs across all events with type, category, and correlation filters |
134
+ | `misp_add_attribute` | Add a single IOC to an event |
135
+ | `misp_add_attributes_bulk` | Add multiple IOCs to an event in one operation |
136
+ | `misp_delete_attribute` | Soft or hard delete an attribute |
137
+
138
+ ### Correlation & Intelligence Tools (3)
139
+
140
+ | Tool | Description |
141
+ |------|-------------|
142
+ | `misp_correlate` | Find all events and attributes matching a value, with cross-event correlations |
143
+ | `misp_get_related_events` | Discover events related through shared IOCs |
144
+ | `misp_describe_types` | Get all available attribute types and category mappings |
145
+
146
+ ### Tag & Taxonomy Tools (2)
147
+
148
+ | Tool | Description |
149
+ |------|-------------|
150
+ | `misp_list_tags` | List available tags with usage statistics |
151
+ | `misp_search_by_tag` | Find events or attributes by tag |
152
+
153
+ ### Export Tools (2)
154
+
155
+ | Tool | Description |
156
+ |------|-------------|
157
+ | `misp_export_iocs` | Export IOCs in CSV, STIX, Suricata, Snort, text, or RPZ format |
158
+ | `misp_export_hashes` | Export file hashes (MD5, SHA1, SHA256) for HIDS integration |
159
+
160
+ ### Sighting & Warninglist Tools (2)
161
+
162
+ | Tool | Description |
163
+ |------|-------------|
164
+ | `misp_add_sighting` | Report a sighting, false positive, or expiration for an IOC |
165
+ | `misp_check_warninglists` | Check if a value appears on known benign/false positive lists |
166
+
167
+ ### Object Tools (4)
168
+
169
+ | Tool | Description |
170
+ |------|-------------|
171
+ | `misp_list_object_templates` | List available MISP object templates (file, domain-ip, email, etc.) |
172
+ | `misp_get_object_template` | Get template details with required/optional attributes |
173
+ | `misp_add_object` | Add a structured object (grouped attributes) to an event |
174
+ | `misp_delete_object` | Delete an object from an event |
175
+
176
+ ### Galaxy Tools (4)
177
+
178
+ | Tool | Description |
179
+ |------|-------------|
180
+ | `misp_list_galaxies` | List galaxies (MITRE ATT&CK, threat actors, malware, tools, etc.) |
181
+ | `misp_get_galaxy` | Get galaxy details with all clusters |
182
+ | `misp_search_galaxy_clusters` | Search clusters by keyword (find ATT&CK techniques, threat actors) |
183
+ | `misp_attach_galaxy_cluster` | Attach a cluster (ATT&CK technique, etc.) to an event or attribute |
184
+
185
+ ### Feed Tools (4)
186
+
187
+ | Tool | Description |
188
+ |------|-------------|
189
+ | `misp_list_feeds` | List configured threat intel feeds |
190
+ | `misp_toggle_feed` | Enable or disable a feed |
191
+ | `misp_fetch_feed` | Trigger a fetch/pull from a feed |
192
+ | `misp_cache_feed` | Cache feed data locally for correlation |
193
+
194
+ ### Organisation Tools (2)
195
+
196
+ | Tool | Description |
197
+ |------|-------------|
198
+ | `misp_list_organisations` | List local and remote sharing partner organisations |
199
+ | `misp_get_organisation` | Get organisation details |
200
+
201
+ ### Server & Admin Tools (3)
202
+
203
+ | Tool | Description |
204
+ |------|-------------|
205
+ | `misp_server_status` | Get MISP version, permissions, and diagnostics |
206
+ | `misp_list_sharing_groups` | List sharing groups for controlled distribution |
207
+ | `misp_delete_event` | Delete a MISP event |
208
+
209
+ ## Resources
210
+
211
+ | Resource URI | Description |
212
+ |-------------|-------------|
213
+ | `misp://types` | All supported attribute types, categories, and their mappings |
214
+ | `misp://statistics` | MISP instance statistics |
215
+ | `misp://taxonomies` | Available taxonomies (TLP, MITRE ATT&CK, etc.) |
216
+
217
+ ## Prompts
218
+
219
+ | Prompt | Description |
220
+ |--------|-------------|
221
+ | `investigate-ioc` | Deep IOC investigation: search, correlate, check warninglists, summarize threat context |
222
+ | `create-incident-event` | Guided event creation from an incident description with IOC ingestion |
223
+ | `threat-report` | Generate a threat intelligence report from MISP data |
224
+
225
+ ## Usage Examples
226
+
227
+ ### Search for an IOC
228
+
229
+ > "Search MISP for the IP address 203.0.113.50"
230
+
231
+ Uses `misp_search_events` and `misp_search_attributes` to find all events and attributes referencing this IP.
232
+
233
+ ### Investigate a suspicious domain
234
+
235
+ > "Investigate evil-domain.com in MISP"
236
+
237
+ Triggers the `investigate-ioc` prompt workflow: searches for the domain, checks correlations, queries warninglists, and provides a structured threat assessment.
238
+
239
+ ### Create an incident event
240
+
241
+ > "Create a MISP event for a phishing campaign targeting our finance team. The phishing emails came from attacker@evil.com and linked to https://evil-login.com/harvest"
242
+
243
+ Uses `misp_create_event` followed by `misp_add_attributes_bulk` to create a fully populated event.
244
+
245
+ ### Export Suricata rules
246
+
247
+ > "Export all IOCs from the last 7 days as Suricata rules"
248
+
249
+ Uses `misp_export_iocs` with format "suricata" and last "7d".
250
+
251
+ ### Check for false positives
252
+
253
+ > "Is 8.8.8.8 on any MISP warninglists?"
254
+
255
+ Uses `misp_check_warninglists` to verify if the value is a known benign indicator.
256
+
257
+ ### Find MITRE ATT&CK techniques
258
+
259
+ > "Search for phishing techniques in MITRE ATT&CK"
260
+
261
+ Uses `misp_search_galaxy_clusters` to find relevant ATT&CK techniques, then `misp_attach_galaxy_cluster` to link them to events.
262
+
263
+ ### Add structured objects
264
+
265
+ > "Add a file object to event 1 with filename encrypt.exe, SHA256 hash, and file size"
266
+
267
+ Uses `misp_add_object` with the "file" template to create a structured group of related attributes.
268
+
269
+ ## Supported Attribute Types
270
+
271
+ | Type | Category | Example |
272
+ |------|----------|---------|
273
+ | `ip-src` | Network activity | Source IP address |
274
+ | `ip-dst` | Network activity | Destination IP address |
275
+ | `domain` | Network activity | Domain name |
276
+ | `hostname` | Network activity | Hostname |
277
+ | `url` | Network activity | Full URL |
278
+ | `email-src` | Payload delivery | Sender email address |
279
+ | `md5` | Payload delivery | MD5 file hash |
280
+ | `sha1` | Payload delivery | SHA1 file hash |
281
+ | `sha256` | Payload delivery | SHA256 file hash |
282
+ | `filename` | Payload delivery | File name |
283
+
284
+ Use `misp_describe_types` for the complete list of supported types and categories.
285
+
286
+ ## Testing
287
+
288
+ ```bash
289
+ npm test # Unit tests (55 tests, mocked)
290
+ npm run test:integration # Integration tests against live MISP (27 tests)
291
+ npm run test:watch # Watch mode
292
+ npm run lint # Type check
293
+ ```
294
+
295
+ Integration tests require `MISP_URL`, `MISP_API_KEY`, and optionally `MISP_VERIFY_SSL=false` environment variables.
296
+
297
+ ## Project Structure
298
+
299
+ ```
300
+ misp-mcp/
301
+ src/
302
+ index.ts # MCP server entry point
303
+ config.ts # Environment config + validation
304
+ client.ts # MISP REST API client
305
+ types.ts # MISP API type definitions
306
+ resources.ts # MCP resources
307
+ prompts.ts # MCP prompts
308
+ tools/
309
+ events.ts # Event CRUD tools
310
+ attributes.ts # Attribute management tools
311
+ correlation.ts # Correlation & intelligence tools
312
+ tags.ts # Tag and taxonomy tools
313
+ exports.ts # Export format tools
314
+ sightings.ts # Sighting tools
315
+ warninglists.ts # Warninglist checks
316
+ objects.ts # Object template & CRUD tools
317
+ galaxies.ts # Galaxy & cluster tools (MITRE ATT&CK)
318
+ feeds.ts # Feed management tools
319
+ organisations.ts # Organisation management tools
320
+ servers.ts # Server admin & sharing group tools
321
+ tests/
322
+ client.test.ts # API client unit tests
323
+ tools.test.ts # Tool handler unit tests
324
+ integration.test.ts # Live MISP API integration tests
325
+ Dockerfile
326
+ package.json
327
+ tsconfig.json
328
+ tsup.config.ts
329
+ vitest.config.ts
330
+ vitest.integration.config.ts
331
+ README.md
332
+ ```
333
+
334
+ ## License
335
+
336
+ MIT
@@ -0,0 +1,2 @@
1
+
2
+ export { }