misp-mcp 1.3.6 → 2.0.1
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 +1 -0
- package/README.md +80 -393
- package/dist/chunk-FLXCWDXW.js +6865 -0
- package/dist/chunk-FLXCWDXW.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +12 -7
- package/dist/cli.js.map +1 -1
- package/dist/{client-D1YKT07H.d.ts → client-KcKJOyu8.d.ts} +81 -1
- package/dist/index.d.ts +22 -4
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/mcp-bin.js +3 -5
- package/dist/mcp-bin.js.map +1 -1
- package/package.json +19 -8
- package/dist/chunk-GTLBUJZI.js +0 -2491
- package/dist/chunk-GTLBUJZI.js.map +0 -1
- package/dist/chunk-ZKNV5JUW.js +0 -26
- package/dist/chunk-ZKNV5JUW.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2026 Solomon Neas
|
|
4
|
+
Copyright (c) 2023 Effectful Technologies Inc (bundled Effect code)
|
|
4
5
|
|
|
5
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
7
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,440 +1,127 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="docs/assets/misp-mcp-social-preview.jpg" alt="misp-mcp banner" width="900">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<p align="center">
|
|
6
|
-
<a href="https://lidless.dev"><img src="docs/assets/marks/misp-mcp-circle.png" width="48" alt="Lidless Labs"></a>
|
|
7
|
-
</p>
|
|
8
|
-
<h1 align="center">misp-mcp</h1>
|
|
9
|
-
|
|
10
|
-
<p align="center"><strong>Query and manage your MISP threat-intelligence platform from any MCP client.</strong></p>
|
|
11
|
-
|
|
12
|
-
<p align="center">
|
|
13
|
-
<a href="https://lidless.dev/misp-mcp"><strong>Website & docs → lidless.dev/misp-mcp</strong></a>
|
|
14
|
-
</p>
|
|
15
|
-
|
|
16
|
-
<p align="center">
|
|
17
|
-
<img src="https://shieldcn.dev/github/ci/lidless-labs/misp-mcp.svg?branch=main&workflow=ci.yml" alt="CI">
|
|
18
|
-
<img src="https://shieldcn.dev/npm/misp-mcp.svg" alt="npm version">
|
|
19
|
-
<img src="https://shieldcn.dev/badge/MCP-server-8A2BE2.svg" alt="MCP server">
|
|
20
|
-
<img src="https://shieldcn.dev/badge/license-MIT-green.svg" alt="MIT license">
|
|
21
|
-
</p>
|
|
22
|
-
|
|
23
|
-
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.
|
|
1
|
+
# misp-mcp
|
|
24
2
|
|
|
25
3
|
## What it does
|
|
26
4
|
|
|
27
|
-
misp-mcp connects an
|
|
28
|
-
|
|
29
|
-
- **36 MCP tools** covering events, attributes, correlations, tags, exports, sightings, warninglists, objects, galaxies, feeds, organisations, and server administration.
|
|
30
|
-
- **3 MCP resources** for browsing attribute types, instance statistics, and available taxonomies.
|
|
31
|
-
- **3 MCP prompts** for guided IOC investigation, incident event creation, and threat reporting.
|
|
32
|
-
- **Confirmation-gated writes** so destructive tools refuse to run without `confirm: true` (and `confirmHard: true` for permanent deletes).
|
|
33
|
-
- **MITRE ATT&CK integration** via galaxy cluster search and attachment.
|
|
34
|
-
- **Export formats** including CSV, STIX, Suricata, Snort, text, RPZ, and hash lists.
|
|
35
|
-
- **SSL flexibility** for the self-signed certificates common in on-prem MISP deployments.
|
|
5
|
+
misp-mcp connects an MCP client to the MISP REST API. It can search events and indicators of compromise (IOCs), look up correlations, check warninglists, and export indicators. The MCP server starts in read-only mode. Operators can enable specific tools that change MISP data.
|
|
36
6
|
|
|
37
|
-
##
|
|
7
|
+
## Install
|
|
38
8
|
|
|
39
|
-
|
|
9
|
+
The published package is `misp-mcp@2.0.0`. It requires Node.js 20.18.1 or later. The repository tests Node.js 20 and 22 in CI. The install and configuration below describe the npm release. The development commands run from a source checkout. [Package manifest](package.json) · [CI workflow](.github/workflows/ci.yml)
|
|
40
10
|
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
--env MISP_URL=https://misp.example.com \
|
|
44
|
-
--env MISP_API_KEY=your-api-key-here \
|
|
45
|
-
--env MISP_VERIFY_SSL=false \
|
|
46
|
-
-- npx -y misp-mcp
|
|
11
|
+
```sh
|
|
12
|
+
npm install --global misp-mcp@2.0.0
|
|
47
13
|
```
|
|
48
14
|
|
|
49
|
-
|
|
15
|
+
The package installs the `misp-mcp` server and two names for the same CLI, `mispctrl` and `mispctl`. The CLI can check the MISP connection and list or fetch events. Either alias starts the stdio server with the `mcp` subcommand. Run `mispctrl --help` for the command list. [CLI source](src/cli.ts)
|
|
50
16
|
|
|
51
|
-
|
|
17
|
+
## Configure
|
|
52
18
|
|
|
53
|
-
|
|
54
|
-
MISP_URL=https://misp.example.com \
|
|
55
|
-
MISP_API_KEY=your-api-key-here \
|
|
56
|
-
MISP_VERIFY_SSL=false \
|
|
57
|
-
npx -p misp-mcp mispctrl status
|
|
58
|
-
```
|
|
19
|
+
Set these variables in the server process environment.
|
|
59
20
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
For Claude Desktop, Cursor, or any client that reads a JSON `mcpServers` block, add:
|
|
65
|
-
|
|
66
|
-
```json
|
|
67
|
-
{
|
|
68
|
-
"mcpServers": {
|
|
69
|
-
"misp": {
|
|
70
|
-
"command": "npx",
|
|
71
|
-
"args": ["-y", "misp-mcp"],
|
|
72
|
-
"env": {
|
|
73
|
-
"MISP_URL": "https://misp.example.com",
|
|
74
|
-
"MISP_API_KEY": "your-api-key-here",
|
|
75
|
-
"MISP_VERIFY_SSL": "false"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
21
|
+
```sh
|
|
22
|
+
export MISP_URL='https://misp.example'
|
|
23
|
+
export MISP_API_KEY='<misp-api-key>'
|
|
80
24
|
```
|
|
81
25
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
### Prerequisites
|
|
85
|
-
|
|
86
|
-
- Node.js 20 or later.
|
|
87
|
-
- A running MISP instance with API access.
|
|
88
|
-
- A MISP API key (MISP UI: Administration > List Auth Keys).
|
|
89
|
-
|
|
90
|
-
### Configuration
|
|
91
|
-
|
|
92
|
-
| Variable | Required | Default | Description |
|
|
93
|
-
|----------|----------|---------|-------------|
|
|
94
|
-
| `MISP_URL` | Yes | - | MISP instance base URL |
|
|
95
|
-
| `MISP_API_KEY` | Yes | - | API authentication key |
|
|
96
|
-
| `MISP_VERIFY_SSL` | No | `true` | Set `false` for self-signed certs |
|
|
97
|
-
| `MISP_TIMEOUT` | No | `30` | Request timeout in seconds |
|
|
98
|
-
| `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`. |
|
|
99
|
-
|
|
100
|
-
### Destructive action safety
|
|
101
|
-
|
|
102
|
-
State-changing and destructive tools are guarded and refuse to run unless explicitly confirmed:
|
|
103
|
-
|
|
104
|
-
- `misp_delete_event`, `misp_delete_attribute`, `misp_delete_object`, `misp_publish_event`, and `misp_tag_event` (when `remove: true`) require `confirm: true`.
|
|
105
|
-
- Setting `MISP_ALLOW_DESTRUCTIVE=true` pre-authorizes these so the `confirm` flag can be omitted (useful for trusted automation).
|
|
106
|
-
- 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`.
|
|
107
|
-
- Future destructive CLI commands use the same policy: `MISP_ALLOW_DESTRUCTIVE=true` plus `--confirm --destructive`, with `--confirm-hard` still required for permanent deletes.
|
|
108
|
-
|
|
109
|
-
A guarded call returns an error (`isError: true`) with a `Refused:` message and performs no MISP request.
|
|
110
|
-
|
|
111
|
-
## Tools
|
|
112
|
-
|
|
113
|
-
Verified against the server source (36 tools, registered in `src/tools/`).
|
|
114
|
-
|
|
115
|
-
### Event tools (6)
|
|
116
|
-
|
|
117
|
-
| Tool | Description |
|
|
118
|
-
|------|-------------|
|
|
119
|
-
| `misp_search_events` | Search events by IOC value, type, tags, date range, organization |
|
|
120
|
-
| `misp_get_event` | Get full event details including attributes, objects, galaxies, related events |
|
|
121
|
-
| `misp_create_event` | Create a new event with threat level, distribution, and analysis status |
|
|
122
|
-
| `misp_update_event` | Update event metadata (info, threat level, analysis, publish state) |
|
|
123
|
-
| `misp_publish_event` | Publish an event to trigger alerts to sharing partners (requires `confirm:true`) |
|
|
124
|
-
| `misp_tag_event` | Add or remove tags (TLP, MITRE ATT&CK, custom) from an event (removal requires `confirm:true`) |
|
|
125
|
-
|
|
126
|
-
### Attribute tools (4)
|
|
127
|
-
|
|
128
|
-
| Tool | Description |
|
|
129
|
-
|------|-------------|
|
|
130
|
-
| `misp_search_attributes` | Search IOCs across all events with type, category, and correlation filters |
|
|
131
|
-
| `misp_add_attribute` | Add a single IOC to an event |
|
|
132
|
-
| `misp_add_attributes_bulk` | Add multiple IOCs to an event in one operation |
|
|
133
|
-
| `misp_delete_attribute` | Soft or hard delete an attribute (requires `confirm:true`; hard delete also requires `confirmHard:true`) |
|
|
134
|
-
|
|
135
|
-
### Correlation & intelligence tools (3)
|
|
136
|
-
|
|
137
|
-
| Tool | Description |
|
|
138
|
-
|------|-------------|
|
|
139
|
-
| `misp_correlate` | Find all events and attributes matching a value, with cross-event correlations |
|
|
140
|
-
| `misp_get_related_events` | Discover events related through shared IOCs |
|
|
141
|
-
| `misp_describe_types` | Get all available attribute types and category mappings |
|
|
142
|
-
|
|
143
|
-
### Tag & taxonomy tools (2)
|
|
144
|
-
|
|
145
|
-
| Tool | Description |
|
|
146
|
-
|------|-------------|
|
|
147
|
-
| `misp_list_tags` | List available tags with usage statistics |
|
|
148
|
-
| `misp_search_by_tag` | Find events or attributes by tag |
|
|
149
|
-
|
|
150
|
-
### Export tools (2)
|
|
151
|
-
|
|
152
|
-
| Tool | Description |
|
|
153
|
-
|------|-------------|
|
|
154
|
-
| `misp_export_iocs` | Export IOCs in CSV, STIX, Suricata, Snort, text, or RPZ format |
|
|
155
|
-
| `misp_export_hashes` | Export file hashes (MD5, SHA1, SHA256) for HIDS integration |
|
|
156
|
-
|
|
157
|
-
### Sighting & warninglist tools (2)
|
|
158
|
-
|
|
159
|
-
| Tool | Description |
|
|
160
|
-
|------|-------------|
|
|
161
|
-
| `misp_add_sighting` | Report a sighting, false positive, or expiration for an IOC |
|
|
162
|
-
| `misp_check_warninglists` | Check if a value appears on known benign/false positive lists |
|
|
163
|
-
|
|
164
|
-
### Object tools (4)
|
|
165
|
-
|
|
166
|
-
| Tool | Description |
|
|
167
|
-
|------|-------------|
|
|
168
|
-
| `misp_list_object_templates` | List available MISP object templates (file, domain-ip, email, etc.) |
|
|
169
|
-
| `misp_get_object_template` | Get template details with required/optional attributes |
|
|
170
|
-
| `misp_add_object` | Add a structured object (grouped attributes) to an event |
|
|
171
|
-
| `misp_delete_object` | Delete an object from an event (requires `confirm:true`; hard delete also requires `confirmHard:true`) |
|
|
172
|
-
|
|
173
|
-
### Galaxy tools (4)
|
|
174
|
-
|
|
175
|
-
| Tool | Description |
|
|
176
|
-
|------|-------------|
|
|
177
|
-
| `misp_list_galaxies` | List galaxies (MITRE ATT&CK, threat actors, malware, tools, etc.) |
|
|
178
|
-
| `misp_get_galaxy` | Get galaxy details with all clusters |
|
|
179
|
-
| `misp_search_galaxy_clusters` | Search clusters by keyword (find ATT&CK techniques, threat actors) |
|
|
180
|
-
| `misp_attach_galaxy_cluster` | Attach a cluster (ATT&CK technique, etc.) to an event or attribute |
|
|
181
|
-
|
|
182
|
-
### Feed tools (4)
|
|
183
|
-
|
|
184
|
-
| Tool | Description |
|
|
185
|
-
|------|-------------|
|
|
186
|
-
| `misp_list_feeds` | List configured threat intel feeds |
|
|
187
|
-
| `misp_toggle_feed` | Enable or disable a feed |
|
|
188
|
-
| `misp_fetch_feed` | Trigger a fetch/pull from a feed |
|
|
189
|
-
| `misp_cache_feed` | Cache feed data locally for correlation |
|
|
190
|
-
|
|
191
|
-
### Organisation tools (2)
|
|
192
|
-
|
|
193
|
-
| Tool | Description |
|
|
194
|
-
|------|-------------|
|
|
195
|
-
| `misp_list_organisations` | List local and remote sharing partner organisations |
|
|
196
|
-
| `misp_get_organisation` | Get organisation details |
|
|
197
|
-
|
|
198
|
-
### Server & admin tools (3)
|
|
199
|
-
|
|
200
|
-
| Tool | Description |
|
|
201
|
-
|------|-------------|
|
|
202
|
-
| `misp_server_status` | Get MISP version, permissions, and diagnostics |
|
|
203
|
-
| `misp_list_sharing_groups` | List sharing groups for controlled distribution |
|
|
204
|
-
| `misp_delete_event` | Delete a MISP event (requires `confirm:true`) |
|
|
205
|
-
|
|
206
|
-
## Resources
|
|
207
|
-
|
|
208
|
-
| Resource URI | Description |
|
|
209
|
-
|-------------|-------------|
|
|
210
|
-
| `misp://types` | All supported attribute types, categories, and their mappings |
|
|
211
|
-
| `misp://statistics` | MISP instance statistics |
|
|
212
|
-
| `misp://taxonomies` | Available taxonomies (TLP, MITRE ATT&CK, etc.) |
|
|
213
|
-
|
|
214
|
-
## Prompts
|
|
215
|
-
|
|
216
|
-
| Prompt | Description |
|
|
217
|
-
|--------|-------------|
|
|
218
|
-
| `investigate-ioc` | Deep IOC investigation: search, correlate, check warninglists, summarize threat context |
|
|
219
|
-
| `create-incident-event` | Guided event creation from an incident description with IOC ingestion |
|
|
220
|
-
| `threat-report` | Generate a threat intelligence report from MISP data |
|
|
221
|
-
|
|
222
|
-
## Usage examples
|
|
223
|
-
|
|
224
|
-
### Search for an IOC
|
|
26
|
+
`MISP_URL` must be an absolute HTTPS base URL. Plain HTTP is accepted for loopback MISP instances. Supply credentials through `MISP_API_KEY` and leave credentials, query strings, and fragments out of the URL.
|
|
225
27
|
|
|
226
|
-
|
|
28
|
+
| Variable | Default | Behavior |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| `MISP_VERIFY_SSL` | `true` | Verify the MISP TLS certificate. |
|
|
31
|
+
| `MISP_TIMEOUT` | `30` | Upstream request timeout in seconds, including the response body. Enter a whole number from 1 to 3600. |
|
|
32
|
+
| `MISP_MAX_RESPONSE_BYTES` | `16777216` | Maximum upstream response body size. Enter a whole number from 1024 to 268435456 bytes. |
|
|
33
|
+
| `MISP_ALLOWED_MUTATIONS` | Empty | Comma-separated MCP tool names. See Safety below. |
|
|
34
|
+
| `MISP_ALLOW_DESTRUCTIVE` | `false` | Pre-authorize the first confirmation for enabled tools that require it. |
|
|
227
35
|
|
|
228
|
-
|
|
36
|
+
Boolean environment variables accept `true`, `1`, `false`, or `0`, ignoring case and surrounding whitespace. Unset or blank values use the default. Other values stop startup. [Configuration](src/config.ts) · [Boolean parser](src/env.ts) · [API client](src/client.ts)
|
|
229
37
|
|
|
230
|
-
###
|
|
38
|
+
### Transports
|
|
231
39
|
|
|
232
|
-
|
|
40
|
+
For **stdio**, configure the MCP client to launch `misp-mcp` with the environment above. To run the release without a global install, use this command.
|
|
233
41
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
### Create an incident event
|
|
237
|
-
|
|
238
|
-
<!-- content-guard: allow email -->
|
|
239
|
-
> "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"
|
|
240
|
-
|
|
241
|
-
Uses `misp_create_event` followed by `misp_add_attributes_bulk` to create a fully populated event.
|
|
242
|
-
|
|
243
|
-
### Export Suricata rules
|
|
244
|
-
|
|
245
|
-
> "Export all IOCs from the last 7 days as Suricata rules"
|
|
246
|
-
|
|
247
|
-
Uses `misp_export_iocs` with format "suricata" and last "7d".
|
|
248
|
-
|
|
249
|
-
### Check for false positives
|
|
250
|
-
|
|
251
|
-
> "Is 192.0.2.123 on any MISP warninglists?"
|
|
252
|
-
|
|
253
|
-
Uses `misp_check_warninglists` to verify if the value is a known benign indicator.
|
|
254
|
-
|
|
255
|
-
### Find MITRE ATT&CK techniques
|
|
256
|
-
|
|
257
|
-
> "Search for phishing techniques in MITRE ATT&CK"
|
|
258
|
-
|
|
259
|
-
Uses `misp_search_galaxy_clusters` to find relevant ATT&CK techniques, then `misp_attach_galaxy_cluster` to link them to events.
|
|
260
|
-
|
|
261
|
-
### Add structured objects
|
|
262
|
-
|
|
263
|
-
> "Add a file object to event 1 with filename encrypt.exe, SHA256 hash, and file size"
|
|
264
|
-
|
|
265
|
-
Uses `misp_add_object` with the "file" template to create a structured group of related attributes.
|
|
266
|
-
|
|
267
|
-
## Supported attribute types
|
|
268
|
-
|
|
269
|
-
| Type | Category | Example |
|
|
270
|
-
|------|----------|---------|
|
|
271
|
-
| `ip-src` | Network activity | Source IP address |
|
|
272
|
-
| `ip-dst` | Network activity | Destination IP address |
|
|
273
|
-
| `domain` | Network activity | Domain name |
|
|
274
|
-
| `hostname` | Network activity | Hostname |
|
|
275
|
-
| `url` | Network activity | Full URL |
|
|
276
|
-
| `email-src` | Payload delivery | Sender email address |
|
|
277
|
-
| `md5` | Payload delivery | MD5 file hash |
|
|
278
|
-
| `sha1` | Payload delivery | SHA1 file hash |
|
|
279
|
-
| `sha256` | Payload delivery | SHA256 file hash |
|
|
280
|
-
| `filename` | Payload delivery | File name |
|
|
281
|
-
|
|
282
|
-
Use `misp_describe_types` for the complete list of supported types and categories.
|
|
283
|
-
|
|
284
|
-
## Other clients & local development
|
|
285
|
-
|
|
286
|
-
<details>
|
|
287
|
-
<summary>Run from a source checkout, or wire up OpenClaw, Codex CLI, Hermes, Docker, or standalone Node.</summary>
|
|
288
|
-
|
|
289
|
-
### From source
|
|
290
|
-
|
|
291
|
-
```bash
|
|
292
|
-
git clone https://github.com/lidless-labs/misp-mcp.git
|
|
293
|
-
cd misp-mcp
|
|
294
|
-
npm install
|
|
295
|
-
npm run build
|
|
42
|
+
```sh
|
|
43
|
+
npm exec --yes --package=misp-mcp@2.0.0 -- misp-mcp
|
|
296
44
|
```
|
|
297
45
|
|
|
298
|
-
|
|
46
|
+
For **Streamable HTTP**, set `MISP_MCP_HTTP_TOKEN` to a separate bearer token of at least 32 characters, distinct from `MISP_API_KEY`, then start `misp-mcp --http`. The server listens on IPv4 loopback over plain HTTP. Point the client at the listener's `/mcp` endpoint on port 3000, or set `MISP_MCP_HTTP_PORT` to use another port. Send the HTTP token in the `Authorization: Bearer <token>` header. [Server entry point](src/mcp-bin.ts) · [Transport setup](src/mcp-server.ts)
|
|
299
47
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
--env MISP_API_KEY=your-api-key-here \
|
|
306
|
-
--env MISP_VERIFY_SSL=false \
|
|
307
|
-
-- node /absolute/path/to/misp-mcp/dist/mcp-bin.js
|
|
48
|
+
```mermaid
|
|
49
|
+
flowchart LR
|
|
50
|
+
Client[MCP client] -->|stdio| Server[misp-mcp]
|
|
51
|
+
Client -->|Loopback HTTP with separate bearer token| Server
|
|
52
|
+
Server -->|REST requests with MISP API key| MISP[MISP API]
|
|
308
53
|
```
|
|
309
54
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
```bash
|
|
313
|
-
openclaw mcp set misp '{
|
|
314
|
-
"command": "npx",
|
|
315
|
-
"args": ["-y", "misp-mcp"],
|
|
316
|
-
"env": {
|
|
317
|
-
"MISP_URL": "https://misp.example.com",
|
|
318
|
-
"MISP_API_KEY": "your-api-key-here",
|
|
319
|
-
"MISP_VERIFY_SSL": "false"
|
|
320
|
-
}
|
|
321
|
-
}'
|
|
322
|
-
```
|
|
55
|
+
In 2.0.0 each HTTP POST has one deadline across request parsing, upstream calls, and reply preparation. It uses the lesser of `MISP_TIMEOUT` and 55 seconds. Expiry aborts upstream I/O. Check MISP before retrying a timed-out write because MISP may have accepted it. HTTP tool results over 90,000 serialized UTF-8 bytes return a truncated preview and size metadata. [HTTP deadline](src/mcp-server.ts) · [Result limit](src/tool-registry.ts)
|
|
323
56
|
|
|
324
|
-
|
|
57
|
+
## Tools
|
|
325
58
|
|
|
326
|
-
|
|
327
|
-
systemctl --user restart openclaw-gateway
|
|
328
|
-
openclaw mcp list # confirm "misp" is registered
|
|
329
|
-
```
|
|
59
|
+
The server identifies itself as `misp-mcp` version `2.0.0` and lists 42 tools over both transports. Read-only mode still lists mutation tools. See the [tool inventory](src/tool-specs.ts) for each tool's policy.
|
|
330
60
|
|
|
331
|
-
|
|
61
|
+
| Tool | Operation |
|
|
62
|
+
| --- | --- |
|
|
63
|
+
| `misp_search_events` | Search MISP events. |
|
|
64
|
+
| `misp_search_attributes` | Search IOCs and other attributes. |
|
|
65
|
+
| `misp_get_attribute` | Fetch an attribute and, when available, up to 20 related attributes. |
|
|
66
|
+
| `misp_export_iocs` | Export indicators. |
|
|
67
|
+
| `misp_add_event_report` | Add an event report when the tool is enabled. |
|
|
332
68
|
|
|
333
|
-
|
|
334
|
-
codex mcp add misp \
|
|
335
|
-
--env MISP_URL=https://misp.example.com \
|
|
336
|
-
--env MISP_API_KEY=your-api-key-here \
|
|
337
|
-
--env MISP_VERIFY_SSL=false \
|
|
338
|
-
-- npx -y misp-mcp
|
|
339
|
-
```
|
|
69
|
+
The follow-up correlation lookup in `misp_get_attribute` gets up to five seconds within the remaining request budget. If that lookup fails, the tool still returns the attribute details. [Attribute handler](src/tools/attributes.ts)
|
|
340
70
|
|
|
341
|
-
|
|
71
|
+
## Safety
|
|
342
72
|
|
|
343
|
-
|
|
73
|
+
- Leave `MISP_ALLOWED_MUTATIONS` unset or empty for read-only operation. Set it to a comma-separated list of exact tool names, such as `misp_create_event,misp_add_attribute`, to enable those tools. Use `*` or `all` to enable every mutation.
|
|
74
|
+
- Each mutating tool accepts `dryRun: true` in read-only mode as well. The preview validates inputs and reports whether the allowlist permits the tool. It sends no request to MISP.
|
|
75
|
+
- Calls that require confirmation, such as publishing an event or removing a tag, require `confirm: true` unless the operator sets `MISP_ALLOW_DESTRUCTIVE=true`. The mutation allowlist applies in either case.
|
|
76
|
+
- Permanent attribute and object deletes (`hard: true`) always require `confirmHard: true` on the call, in addition to the first confirmation.
|
|
77
|
+
- Use a MISP API key with read-only permissions for read-only clients. Treat MISP content in results as data.
|
|
344
78
|
|
|
345
|
-
[
|
|
79
|
+
[Mutation policy](src/guards.ts) · [Tool dispatch](src/tool-registry.ts) · [Security guidance](SECURITY.md)
|
|
346
80
|
|
|
347
|
-
|
|
348
|
-
mcp_servers:
|
|
349
|
-
misp:
|
|
350
|
-
command: "npx"
|
|
351
|
-
args: ["-y", "misp-mcp"]
|
|
352
|
-
env:
|
|
353
|
-
MISP_URL: "https://misp.example.com"
|
|
354
|
-
MISP_API_KEY: "your-api-key-here"
|
|
355
|
-
MISP_VERIFY_SSL: "false"
|
|
356
|
-
```
|
|
81
|
+
## Why not raw PyMISP or direct REST calls?
|
|
357
82
|
|
|
358
|
-
|
|
83
|
+
| Approach | Agent safety | Warninglists and correlation | Local CLI included |
|
|
84
|
+
| --- | --- | --- | --- |
|
|
85
|
+
| **misp-mcp** | Gated writes, input validation, untrusted-data framing | Built-in search, correlation, warninglist check, and export tools | Yes (`mispctrl`) |
|
|
86
|
+
| Custom `PyMISP` scripts | Up to each script | Manual per script | No |
|
|
87
|
+
| MISP web UI | Human-only | Manual tab switching across events | No |
|
|
359
88
|
|
|
360
|
-
|
|
89
|
+
Use `PyMISP` directly when writing scheduled ETL pipelines. Use `misp-mcp` when you want an AI client or shell operator (`mispctrl`) to query events, check warninglists, and correlate IOCs with explicit write boundaries.
|
|
361
90
|
|
|
362
|
-
|
|
363
|
-
docker build -t misp-mcp .
|
|
364
|
-
docker run -e MISP_URL=https://misp.example.com -e MISP_API_KEY=your-key -e MISP_VERIFY_SSL=false misp-mcp
|
|
365
|
-
```
|
|
91
|
+
## FAQ
|
|
366
92
|
|
|
367
|
-
|
|
93
|
+
**Does `misp-mcp` work with Claude Code, Claude Desktop, Cursor, and Codex?**
|
|
94
|
+
Yes. Run `npx -y misp-mcp` over stdio, or enable loopback Streamable HTTP with bearer authentication.
|
|
368
95
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
MISP_URL=https://misp.example.com MISP_API_KEY=your-key node dist/cli.js status
|
|
372
|
-
```
|
|
96
|
+
**Can an agent publish or delete MISP events by default?**
|
|
97
|
+
No. Destructive and state-changing actions stay gated behind explicit configuration and confirmation flags.
|
|
373
98
|
|
|
374
|
-
|
|
99
|
+
**Does my MISP data leave the network?**
|
|
100
|
+
`misp-mcp` runs locally on your machine and connects straight to your configured `MISP_URL`. Only the tool output you return to your chosen LLM client leaves the host.
|
|
375
101
|
|
|
376
|
-
|
|
377
|
-
MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
378
|
-
```
|
|
102
|
+
## Part of Lidless Labs
|
|
379
103
|
|
|
380
|
-
|
|
104
|
+
`misp-mcp` is maintained by [Lidless Labs](https://lidless.dev) ([GitHub](https://github.com/lidless-labs)). Related SOC and threat-intel tools:
|
|
381
105
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
npm run test:watch # Watch mode
|
|
388
|
-
npm run lint # Type check
|
|
389
|
-
```
|
|
106
|
+
- [soc-stack](https://github.com/lidless-labs/soc-stack) - one-command Proxmox SOC lab with Wazuh, TheHive, Cortex, MISP, Zeek, and Suricata
|
|
107
|
+
- [wazuh-mcp](https://github.com/lidless-labs/wazuh-mcp) - read-only Wazuh SIEM/XDR alerts, agents, and CVE queries over MCP
|
|
108
|
+
- [thehive-mcp](https://github.com/lidless-labs/thehive-mcp) - TheHive 5 case management and alert triage over MCP
|
|
109
|
+
- [cortex-mcp](https://github.com/lidless-labs/cortex-mcp) - Cortex observable analyzer detonation and verdicts over MCP
|
|
110
|
+
- [mitre-mcp](https://github.com/lidless-labs/mitre-mcp) - local MITRE ATT&CK technique mapping and threat group profiling
|
|
390
111
|
|
|
391
|
-
|
|
112
|
+
## Development
|
|
392
113
|
|
|
393
|
-
|
|
114
|
+
Run these commands from the source checkout. The default test suite uses mocks.
|
|
394
115
|
|
|
116
|
+
```sh
|
|
117
|
+
npm ci
|
|
118
|
+
npm run lint
|
|
119
|
+
npm test
|
|
120
|
+
npm run build
|
|
395
121
|
```
|
|
396
|
-
misp-mcp/
|
|
397
|
-
src/
|
|
398
|
-
cli.ts # mispctrl CLI entry point
|
|
399
|
-
mcp-bin.ts # MCP stdio entry point
|
|
400
|
-
mcp-server.ts # Shared MCP server factory
|
|
401
|
-
index.ts # Library export surface
|
|
402
|
-
config.ts # Environment config + validation
|
|
403
|
-
client.ts # MISP REST API client
|
|
404
|
-
guards.ts # Destructive-action confirmation guards
|
|
405
|
-
types.ts # MISP API type definitions
|
|
406
|
-
resources.ts # MCP resources
|
|
407
|
-
prompts.ts # MCP prompts
|
|
408
|
-
tools/ # One module per tool family (events, attributes, ...)
|
|
409
|
-
tests/ # Unit + integration tests
|
|
410
|
-
Dockerfile
|
|
411
|
-
package.json
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
## Contributing
|
|
415
|
-
|
|
416
|
-
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).
|
|
417
|
-
|
|
418
|
-
## Why not the MISP web UI or raw API?
|
|
419
|
-
|
|
420
|
-
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.
|
|
421
|
-
|
|
422
|
-
## What misp-mcp is not
|
|
423
|
-
|
|
424
|
-
- **Not a MISP server.** It talks to an existing MISP instance over the REST API; it does not store, host, or replace MISP.
|
|
425
|
-
- **Not a general HTTP proxy.** It exposes a curated set of MISP operations as MCP tools, not arbitrary passthrough to every MISP endpoint.
|
|
426
|
-
- **Not a SIEM, EDR, or alerting system.** It reads and writes threat intelligence; it does not collect logs or generate alerts on its own.
|
|
427
|
-
- **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.
|
|
428
|
-
- **Not an autonomous deleter.** Destructive and publishing actions are confirmation-gated by design.
|
|
429
|
-
|
|
430
|
-
## License
|
|
431
|
-
|
|
432
|
-
[MIT](LICENSE)
|
|
433
|
-
|
|
434
|
-
---
|
|
435
122
|
|
|
436
|
-
|
|
123
|
+
### Publishing
|
|
437
124
|
|
|
438
|
-
|
|
125
|
+
The npm workflow runs on a `v*.*.*` tag push or manual dispatch. It type-checks, tests, builds, audits dependencies, and checks the package payload before publishing with provenance. The `v2.0.0` tag used npm trusted publishing through GitHub Actions OIDC. The workflow uses token authentication when `NPM_TOKEN` is configured. [Publish workflow](.github/workflows/publish.yml) · [v2.0.0 publish run](https://github.com/lidless-labs/misp-mcp/actions/runs/46905160819)
|
|
439
126
|
|
|
440
|
-
|
|
127
|
+
[Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md) · [MIT License](LICENSE)
|