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.
- package/README.md +217 -124
- package/dist/chunk-X4LNYJKC.js +2468 -0
- package/dist/chunk-X4LNYJKC.js.map +1 -0
- package/dist/chunk-ZKNV5JUW.js +26 -0
- package/dist/chunk-ZKNV5JUW.js.map +1 -0
- package/dist/cli.d.ts +43 -0
- package/dist/cli.js +332 -0
- package/dist/cli.js.map +1 -0
- package/dist/client-D1YKT07H.d.ts +349 -0
- package/dist/index.d.ts +28 -1
- package/dist/index.js +39 -2348
- package/dist/index.js.map +1 -1
- package/dist/mcp-bin.d.ts +2 -0
- package/dist/mcp-bin.js +14 -0
- package/dist/mcp-bin.js.map +1 -0
- package/package.json +21 -13
package/README.md
CHANGED
|
@@ -1,67 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/assets/misp-mcp-social-preview.jpg" alt="misp-mcp banner" width="900">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
[](https://nodejs.org/)
|
|
5
|
-
[](https://modelcontextprotocol.io/)
|
|
6
|
-
[](LICENSE)
|
|
5
|
+
<h1 align="center">misp-mcp</h1>
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
<p align="center"><strong>Query and manage your MISP threat-intelligence platform from any MCP client.</strong></p>
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://lidless.dev/misp-mcp"><strong>Website & docs → lidless.dev/misp-mcp</strong></a>
|
|
11
|
+
</p>
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
- **Bulk Operations** for adding multiple IOCs to events in a single call
|
|
19
|
-
- **Correlation Engine** for discovering cross-event relationships through shared indicators
|
|
13
|
+
<p align="center">
|
|
14
|
+
<img src="https://shieldcn.dev/github/ci/lidless-labs/misp-mcp.svg?branch=main&workflow=ci.yml" alt="CI">
|
|
15
|
+
<img src="https://shieldcn.dev/npm/misp-mcp.svg" alt="npm version">
|
|
16
|
+
<img src="https://shieldcn.dev/badge/MCP-server-8A2BE2.svg" alt="MCP server">
|
|
17
|
+
<img src="https://shieldcn.dev/badge/license-MIT-green.svg" alt="MIT license">
|
|
18
|
+
</p>
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
misp-mcp is a [Model Context Protocol](https://modelcontextprotocol.io/) server for [MISP](https://www.misp-project.org/), the open-source threat-intelligence sharing platform. It lets an LLM client such as Claude run IOC lookups, manage events, discover cross-event correlations, and export indicators directly against your own MISP instance. Unlike a generic HTTP wrapper, it ships 36 purpose-built tools, MISP-aware resources and prompts, and a confirmation gate that refuses destructive writes (delete, publish, untag) unless you explicitly approve them.
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
- A running MISP instance with API access
|
|
25
|
-
- MISP API key (generated from MISP UI: Administration > List Auth Keys)
|
|
22
|
+
## What it does
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
misp-mcp connects an AI agent to a MISP (Malware Information Sharing Platform & Threat Intelligence Sharing) instance over MISP's REST API and exposes it as Model Context Protocol tools, resources, and prompts. Point it at your MISP server with an API key and an LLM can search threat-intelligence events, look up and add indicators of compromise (IOCs), correlate indicators across events, attach MITRE ATT&CK galaxy clusters, check warninglists for false positives, and export IOCs as Suricata, Snort, STIX, CSV, RPZ, or hash lists. Read paths are safe by default; state-changing and destructive operations are guarded behind explicit confirmation flags so an agent cannot delete an event or publish to sharing partners without approval.
|
|
25
|
+
|
|
26
|
+
- **36 MCP tools** covering events, attributes, correlations, tags, exports, sightings, warninglists, objects, galaxies, feeds, organisations, and server administration.
|
|
27
|
+
- **3 MCP resources** for browsing attribute types, instance statistics, and available taxonomies.
|
|
28
|
+
- **3 MCP prompts** for guided IOC investigation, incident event creation, and threat reporting.
|
|
29
|
+
- **Confirmation-gated writes** so destructive tools refuse to run without `confirm: true` (and `confirmHard: true` for permanent deletes).
|
|
30
|
+
- **MITRE ATT&CK integration** via galaxy cluster search and attachment.
|
|
31
|
+
- **Export formats** including CSV, STIX, Suricata, Snort, text, RPZ, and hash lists.
|
|
32
|
+
- **SSL flexibility** for the self-signed certificates common in on-prem MISP deployments.
|
|
33
|
+
|
|
34
|
+
## Quickstart
|
|
35
|
+
|
|
36
|
+
No checkout required. With Node.js 20+ installed, register the published package with any MCP client. For [Claude Code](https://docs.anthropic.com/en/docs/claude-code):
|
|
28
37
|
|
|
29
38
|
```bash
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
claude mcp add misp \
|
|
40
|
+
--env MISP_URL=https://misp.example.com \
|
|
41
|
+
--env MISP_API_KEY=your-api-key-here \
|
|
42
|
+
--env MISP_VERIFY_SSL=false \
|
|
43
|
+
-- npx -y misp-mcp
|
|
34
44
|
```
|
|
35
45
|
|
|
36
|
-
|
|
46
|
+
Add `--scope user` to make it available from any directory instead of only the current project.
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
Before wiring a client, verify that the package can reach MISP with the same environment:
|
|
39
49
|
|
|
40
50
|
```bash
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
MISP_URL=https://misp.example.com \
|
|
52
|
+
MISP_API_KEY=your-api-key-here \
|
|
53
|
+
MISP_VERIFY_SSL=false \
|
|
54
|
+
npx -p misp-mcp mispctrl status
|
|
44
55
|
```
|
|
45
56
|
|
|
46
|
-
|
|
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
|
|
57
|
+
This calls `/servers/getVersion` and prints the MISP version, recommended PyMISP version, TLS setting, and target URL. If this fails, fix the URL, API key, or TLS setting before debugging the MCP client.
|
|
54
58
|
|
|
55
|
-
###
|
|
59
|
+
### MCP client config (copy-paste)
|
|
56
60
|
|
|
57
|
-
|
|
61
|
+
For Claude Desktop, Cursor, or any client that reads a JSON `mcpServers` block, add:
|
|
58
62
|
|
|
59
63
|
```json
|
|
60
64
|
{
|
|
61
65
|
"mcpServers": {
|
|
62
66
|
"misp": {
|
|
63
|
-
"command": "
|
|
64
|
-
"args": ["
|
|
67
|
+
"command": "npx",
|
|
68
|
+
"args": ["-y", "misp-mcp"],
|
|
65
69
|
"env": {
|
|
66
70
|
"MISP_URL": "https://misp.example.com",
|
|
67
71
|
"MISP_API_KEY": "your-api-key-here",
|
|
@@ -72,50 +76,40 @@ Add to your Claude Desktop MCP config (`claude_desktop_config.json`):
|
|
|
72
76
|
}
|
|
73
77
|
```
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
Claude Desktop reads this from `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows). Restart the client after editing.
|
|
76
80
|
|
|
77
|
-
|
|
81
|
+
### Prerequisites
|
|
78
82
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
```
|
|
83
|
+
- Node.js 20 or later.
|
|
84
|
+
- A running MISP instance with API access.
|
|
85
|
+
- A MISP API key (MISP UI: Administration > List Auth Keys).
|
|
96
86
|
|
|
97
|
-
###
|
|
87
|
+
### Configuration
|
|
98
88
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
| Variable | Required | Default | Description |
|
|
90
|
+
|----------|----------|---------|-------------|
|
|
91
|
+
| `MISP_URL` | Yes | - | MISP instance base URL |
|
|
92
|
+
| `MISP_API_KEY` | Yes | - | API authentication key |
|
|
93
|
+
| `MISP_VERIFY_SSL` | No | `true` | Set `false` for self-signed certs |
|
|
94
|
+
| `MISP_TIMEOUT` | No | `30` | Request timeout in seconds |
|
|
95
|
+
| `MISP_ALLOW_DESTRUCTIVE` | No | `false` | Set `true` to pre-authorize destructive tools so the per-call `confirm` flag is not required. Permanent (`hard`) deletes still require `confirmHard`. |
|
|
102
96
|
|
|
103
|
-
###
|
|
97
|
+
### Destructive action safety
|
|
104
98
|
|
|
105
|
-
|
|
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
|
-
```
|
|
99
|
+
State-changing and destructive tools are guarded and refuse to run unless explicitly confirmed:
|
|
109
100
|
|
|
110
|
-
|
|
101
|
+
- `misp_delete_event`, `misp_delete_attribute`, `misp_delete_object`, `misp_publish_event`, and `misp_tag_event` (when `remove: true`) require `confirm: true`.
|
|
102
|
+
- Setting `MISP_ALLOW_DESTRUCTIVE=true` pre-authorizes these so the `confirm` flag can be omitted (useful for trusted automation).
|
|
103
|
+
- Permanent **hard** deletes (`hard: true` on `misp_delete_attribute` / `misp_delete_object`) require a **second** confirmation, `confirmHard: true`, in addition to `confirm: true`. The env opt-in does **not** bypass `confirmHard`.
|
|
104
|
+
- Future destructive CLI commands use the same policy: `MISP_ALLOW_DESTRUCTIVE=true` plus `--confirm --destructive`, with `--confirm-hard` still required for permanent deletes.
|
|
111
105
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
A guarded call returns an error (`isError: true`) with a `Refused:` message and performs no MISP request.
|
|
107
|
+
|
|
108
|
+
## Tools
|
|
115
109
|
|
|
116
|
-
|
|
110
|
+
Verified against the server source (36 tools, registered in `src/tools/`).
|
|
117
111
|
|
|
118
|
-
### Event
|
|
112
|
+
### Event tools (6)
|
|
119
113
|
|
|
120
114
|
| Tool | Description |
|
|
121
115
|
|------|-------------|
|
|
@@ -123,19 +117,19 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
123
117
|
| `misp_get_event` | Get full event details including attributes, objects, galaxies, related events |
|
|
124
118
|
| `misp_create_event` | Create a new event with threat level, distribution, and analysis status |
|
|
125
119
|
| `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 |
|
|
120
|
+
| `misp_publish_event` | Publish an event to trigger alerts to sharing partners (requires `confirm:true`) |
|
|
121
|
+
| `misp_tag_event` | Add or remove tags (TLP, MITRE ATT&CK, custom) from an event (removal requires `confirm:true`) |
|
|
128
122
|
|
|
129
|
-
### Attribute
|
|
123
|
+
### Attribute tools (4)
|
|
130
124
|
|
|
131
125
|
| Tool | Description |
|
|
132
126
|
|------|-------------|
|
|
133
127
|
| `misp_search_attributes` | Search IOCs across all events with type, category, and correlation filters |
|
|
134
128
|
| `misp_add_attribute` | Add a single IOC to an event |
|
|
135
129
|
| `misp_add_attributes_bulk` | Add multiple IOCs to an event in one operation |
|
|
136
|
-
| `misp_delete_attribute` | Soft or hard delete an attribute |
|
|
130
|
+
| `misp_delete_attribute` | Soft or hard delete an attribute (requires `confirm:true`; hard delete also requires `confirmHard:true`) |
|
|
137
131
|
|
|
138
|
-
### Correlation &
|
|
132
|
+
### Correlation & intelligence tools (3)
|
|
139
133
|
|
|
140
134
|
| Tool | Description |
|
|
141
135
|
|------|-------------|
|
|
@@ -143,37 +137,37 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
143
137
|
| `misp_get_related_events` | Discover events related through shared IOCs |
|
|
144
138
|
| `misp_describe_types` | Get all available attribute types and category mappings |
|
|
145
139
|
|
|
146
|
-
### Tag &
|
|
140
|
+
### Tag & taxonomy tools (2)
|
|
147
141
|
|
|
148
142
|
| Tool | Description |
|
|
149
143
|
|------|-------------|
|
|
150
144
|
| `misp_list_tags` | List available tags with usage statistics |
|
|
151
145
|
| `misp_search_by_tag` | Find events or attributes by tag |
|
|
152
146
|
|
|
153
|
-
### Export
|
|
147
|
+
### Export tools (2)
|
|
154
148
|
|
|
155
149
|
| Tool | Description |
|
|
156
150
|
|------|-------------|
|
|
157
151
|
| `misp_export_iocs` | Export IOCs in CSV, STIX, Suricata, Snort, text, or RPZ format |
|
|
158
152
|
| `misp_export_hashes` | Export file hashes (MD5, SHA1, SHA256) for HIDS integration |
|
|
159
153
|
|
|
160
|
-
### Sighting &
|
|
154
|
+
### Sighting & warninglist tools (2)
|
|
161
155
|
|
|
162
156
|
| Tool | Description |
|
|
163
157
|
|------|-------------|
|
|
164
158
|
| `misp_add_sighting` | Report a sighting, false positive, or expiration for an IOC |
|
|
165
159
|
| `misp_check_warninglists` | Check if a value appears on known benign/false positive lists |
|
|
166
160
|
|
|
167
|
-
### Object
|
|
161
|
+
### Object tools (4)
|
|
168
162
|
|
|
169
163
|
| Tool | Description |
|
|
170
164
|
|------|-------------|
|
|
171
165
|
| `misp_list_object_templates` | List available MISP object templates (file, domain-ip, email, etc.) |
|
|
172
166
|
| `misp_get_object_template` | Get template details with required/optional attributes |
|
|
173
167
|
| `misp_add_object` | Add a structured object (grouped attributes) to an event |
|
|
174
|
-
| `misp_delete_object` | Delete an object from an event |
|
|
168
|
+
| `misp_delete_object` | Delete an object from an event (requires `confirm:true`; hard delete also requires `confirmHard:true`) |
|
|
175
169
|
|
|
176
|
-
### Galaxy
|
|
170
|
+
### Galaxy tools (4)
|
|
177
171
|
|
|
178
172
|
| Tool | Description |
|
|
179
173
|
|------|-------------|
|
|
@@ -182,7 +176,7 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
182
176
|
| `misp_search_galaxy_clusters` | Search clusters by keyword (find ATT&CK techniques, threat actors) |
|
|
183
177
|
| `misp_attach_galaxy_cluster` | Attach a cluster (ATT&CK technique, etc.) to an event or attribute |
|
|
184
178
|
|
|
185
|
-
### Feed
|
|
179
|
+
### Feed tools (4)
|
|
186
180
|
|
|
187
181
|
| Tool | Description |
|
|
188
182
|
|------|-------------|
|
|
@@ -191,20 +185,20 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
191
185
|
| `misp_fetch_feed` | Trigger a fetch/pull from a feed |
|
|
192
186
|
| `misp_cache_feed` | Cache feed data locally for correlation |
|
|
193
187
|
|
|
194
|
-
### Organisation
|
|
188
|
+
### Organisation tools (2)
|
|
195
189
|
|
|
196
190
|
| Tool | Description |
|
|
197
191
|
|------|-------------|
|
|
198
192
|
| `misp_list_organisations` | List local and remote sharing partner organisations |
|
|
199
193
|
| `misp_get_organisation` | Get organisation details |
|
|
200
194
|
|
|
201
|
-
### Server &
|
|
195
|
+
### Server & admin tools (3)
|
|
202
196
|
|
|
203
197
|
| Tool | Description |
|
|
204
198
|
|------|-------------|
|
|
205
199
|
| `misp_server_status` | Get MISP version, permissions, and diagnostics |
|
|
206
200
|
| `misp_list_sharing_groups` | List sharing groups for controlled distribution |
|
|
207
|
-
| `misp_delete_event` | Delete a MISP event |
|
|
201
|
+
| `misp_delete_event` | Delete a MISP event (requires `confirm:true`) |
|
|
208
202
|
|
|
209
203
|
## Resources
|
|
210
204
|
|
|
@@ -222,7 +216,7 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
222
216
|
| `create-incident-event` | Guided event creation from an incident description with IOC ingestion |
|
|
223
217
|
| `threat-report` | Generate a threat intelligence report from MISP data |
|
|
224
218
|
|
|
225
|
-
## Usage
|
|
219
|
+
## Usage examples
|
|
226
220
|
|
|
227
221
|
### Search for an IOC
|
|
228
222
|
|
|
@@ -232,13 +226,14 @@ Uses `misp_search_events` and `misp_search_attributes` to find all events and at
|
|
|
232
226
|
|
|
233
227
|
### Investigate a suspicious domain
|
|
234
228
|
|
|
235
|
-
> "Investigate
|
|
229
|
+
> "Investigate suspicious-domain.example in MISP"
|
|
236
230
|
|
|
237
231
|
Triggers the `investigate-ioc` prompt workflow: searches for the domain, checks correlations, queries warninglists, and provides a structured threat assessment.
|
|
238
232
|
|
|
239
233
|
### Create an incident event
|
|
240
234
|
|
|
241
|
-
|
|
235
|
+
<!-- content-guard: allow email -->
|
|
236
|
+
> "Create a MISP event for a phishing campaign targeting our finance team. The phishing emails came from attacker@phish.example and linked to https://harvest.phish.example/login"
|
|
242
237
|
|
|
243
238
|
Uses `misp_create_event` followed by `misp_add_attributes_bulk` to create a fully populated event.
|
|
244
239
|
|
|
@@ -250,7 +245,7 @@ Uses `misp_export_iocs` with format "suricata" and last "7d".
|
|
|
250
245
|
|
|
251
246
|
### Check for false positives
|
|
252
247
|
|
|
253
|
-
> "Is
|
|
248
|
+
> "Is 192.0.2.123 on any MISP warninglists?"
|
|
254
249
|
|
|
255
250
|
Uses `misp_check_warninglists` to verify if the value is a known benign indicator.
|
|
256
251
|
|
|
@@ -266,7 +261,7 @@ Uses `misp_search_galaxy_clusters` to find relevant ATT&CK techniques, then `mis
|
|
|
266
261
|
|
|
267
262
|
Uses `misp_add_object` with the "file" template to create a structured group of related attributes.
|
|
268
263
|
|
|
269
|
-
## Supported
|
|
264
|
+
## Supported attribute types
|
|
270
265
|
|
|
271
266
|
| Type | Category | Example |
|
|
272
267
|
|------|----------|---------|
|
|
@@ -283,54 +278,152 @@ Uses `misp_add_object` with the "file" template to create a structured group of
|
|
|
283
278
|
|
|
284
279
|
Use `misp_describe_types` for the complete list of supported types and categories.
|
|
285
280
|
|
|
281
|
+
## Other clients & local development
|
|
282
|
+
|
|
283
|
+
<details>
|
|
284
|
+
<summary>Run from a source checkout, or wire up OpenClaw, Codex CLI, Hermes, Docker, or standalone Node.</summary>
|
|
285
|
+
|
|
286
|
+
### From source
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
git clone https://github.com/lidless-labs/misp-mcp.git
|
|
290
|
+
cd misp-mcp
|
|
291
|
+
npm install
|
|
292
|
+
npm run build
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Then point any client's `command`/`args` at `node /absolute/path/to/misp-mcp/dist/mcp-bin.js` instead of `npx -y misp-mcp`.
|
|
296
|
+
|
|
297
|
+
### Claude Code (source checkout)
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
claude mcp add misp \
|
|
301
|
+
--env MISP_URL=https://misp.example.com \
|
|
302
|
+
--env MISP_API_KEY=your-api-key-here \
|
|
303
|
+
--env MISP_VERIFY_SSL=false \
|
|
304
|
+
-- node /absolute/path/to/misp-mcp/dist/mcp-bin.js
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### OpenClaw
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
openclaw mcp set misp '{
|
|
311
|
+
"command": "npx",
|
|
312
|
+
"args": ["-y", "misp-mcp"],
|
|
313
|
+
"env": {
|
|
314
|
+
"MISP_URL": "https://misp.example.com",
|
|
315
|
+
"MISP_API_KEY": "your-api-key-here",
|
|
316
|
+
"MISP_VERIFY_SSL": "false"
|
|
317
|
+
}
|
|
318
|
+
}'
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
For a source checkout, use `"command": "node"` with `"args": ["/absolute/path/to/misp-mcp/dist/mcp-bin.js"]`. Then restart the gateway and confirm registration:
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
systemctl --user restart openclaw-gateway
|
|
325
|
+
openclaw mcp list # confirm "misp" is registered
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### Codex CLI
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
codex mcp add misp \
|
|
332
|
+
--env MISP_URL=https://misp.example.com \
|
|
333
|
+
--env MISP_API_KEY=your-api-key-here \
|
|
334
|
+
--env MISP_VERIFY_SSL=false \
|
|
335
|
+
-- npx -y misp-mcp
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Codex writes the entry to `~/.codex/config.toml` under `[mcp_servers.misp]`. Verify with `codex mcp list`.
|
|
339
|
+
|
|
340
|
+
### Hermes Agent
|
|
341
|
+
|
|
342
|
+
[Hermes Agent](https://github.com/NousResearch/hermes-agent) reads MCP config from `~/.hermes/config.yaml` under `mcp_servers`:
|
|
343
|
+
|
|
344
|
+
```yaml
|
|
345
|
+
mcp_servers:
|
|
346
|
+
misp:
|
|
347
|
+
command: "npx"
|
|
348
|
+
args: ["-y", "misp-mcp"]
|
|
349
|
+
env:
|
|
350
|
+
MISP_URL: "https://misp.example.com"
|
|
351
|
+
MISP_API_KEY: "your-api-key-here"
|
|
352
|
+
MISP_VERIFY_SSL: "false"
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Then `/reload-mcp` inside a Hermes session.
|
|
356
|
+
|
|
357
|
+
### Docker
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
docker build -t misp-mcp .
|
|
361
|
+
docker run -e MISP_URL=https://misp.example.com -e MISP_API_KEY=your-key -e MISP_VERIFY_SSL=false misp-mcp
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Standalone
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
MISP_URL=https://misp.example.com MISP_API_KEY=your-key node dist/mcp-bin.js
|
|
368
|
+
MISP_URL=https://misp.example.com MISP_API_KEY=your-key node dist/cli.js status
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Development
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
</details>
|
|
378
|
+
|
|
286
379
|
## Testing
|
|
287
380
|
|
|
288
381
|
```bash
|
|
289
|
-
npm test
|
|
290
|
-
npm run test:integration # Integration tests against live MISP
|
|
291
|
-
npm run test:watch
|
|
292
|
-
npm run lint
|
|
382
|
+
npm test # Unit tests (mocked)
|
|
383
|
+
npm run test:integration # Integration tests against a live MISP instance
|
|
384
|
+
npm run test:watch # Watch mode
|
|
385
|
+
npm run lint # Type check
|
|
293
386
|
```
|
|
294
387
|
|
|
295
388
|
Integration tests require `MISP_URL`, `MISP_API_KEY`, and optionally `MISP_VERIFY_SSL=false` environment variables.
|
|
296
389
|
|
|
297
|
-
## Project
|
|
390
|
+
## Project structure
|
|
298
391
|
|
|
299
392
|
```
|
|
300
393
|
misp-mcp/
|
|
301
394
|
src/
|
|
302
|
-
|
|
395
|
+
cli.ts # mispctrl CLI entry point
|
|
396
|
+
mcp-bin.ts # MCP stdio entry point
|
|
397
|
+
mcp-server.ts # Shared MCP server factory
|
|
398
|
+
index.ts # Library export surface
|
|
303
399
|
config.ts # Environment config + validation
|
|
304
400
|
client.ts # MISP REST API client
|
|
401
|
+
guards.ts # Destructive-action confirmation guards
|
|
305
402
|
types.ts # MISP API type definitions
|
|
306
403
|
resources.ts # MCP resources
|
|
307
404
|
prompts.ts # MCP prompts
|
|
308
|
-
tools/
|
|
309
|
-
|
|
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
|
|
405
|
+
tools/ # One module per tool family (events, attributes, ...)
|
|
406
|
+
tests/ # Unit + integration tests
|
|
325
407
|
Dockerfile
|
|
326
408
|
package.json
|
|
327
|
-
tsconfig.json
|
|
328
|
-
tsup.config.ts
|
|
329
|
-
vitest.config.ts
|
|
330
|
-
vitest.integration.config.ts
|
|
331
|
-
README.md
|
|
332
409
|
```
|
|
333
410
|
|
|
411
|
+
## Contributing
|
|
412
|
+
|
|
413
|
+
Issues and pull requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution path and [SECURITY.md](SECURITY.md) for how to report a vulnerability privately. By participating you agree to the [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
414
|
+
|
|
415
|
+
## Why not the MISP web UI or raw API?
|
|
416
|
+
|
|
417
|
+
The MISP web UI and PyMISP are excellent for analysts working a console. misp-mcp is for the case where the operator is an LLM agent, not a human at a browser. It gives the model a typed, named tool for each common MISP operation, validates inputs with Zod, and shapes responses so a model can reason over them, rather than handing the model a raw REST endpoint and an OpenAPI dump. It also adds a guardrail layer the bare API does not: destructive operations fail closed unless the caller opts in, so an over-eager agent cannot publish or delete intelligence by accident. If you want a human-driven console, use the MISP UI. If you want PyMISP scripting, use PyMISP. Use misp-mcp when you want a chat or agent client to drive MISP safely.
|
|
418
|
+
|
|
419
|
+
## What misp-mcp is not
|
|
420
|
+
|
|
421
|
+
- **Not a MISP server.** It talks to an existing MISP instance over the REST API; it does not store, host, or replace MISP.
|
|
422
|
+
- **Not a general HTTP proxy.** It exposes a curated set of MISP operations as MCP tools, not arbitrary passthrough to every MISP endpoint.
|
|
423
|
+
- **Not a SIEM, EDR, or alerting system.** It reads and writes threat intelligence; it does not collect logs or generate alerts on its own.
|
|
424
|
+
- **Not a credential vault.** It reads `MISP_URL` and `MISP_API_KEY` from the environment; manage and rotate those keys with your own secrets tooling.
|
|
425
|
+
- **Not an autonomous deleter.** Destructive and publishing actions are confirmation-gated by design.
|
|
426
|
+
|
|
334
427
|
## License
|
|
335
428
|
|
|
336
|
-
MIT
|
|
429
|
+
[MIT](LICENSE)
|