misp-mcp 1.2.0 → 1.3.5
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 +226 -209
- package/dist/chunk-GTLBUJZI.js +2491 -0
- package/dist/chunk-GTLBUJZI.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 -2368
- 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 +16 -9
package/README.md
CHANGED
|
@@ -1,66 +1,74 @@
|
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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>
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
<p align="center"><strong>Query and manage your MISP threat-intelligence platform from any MCP client.</strong></p>
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://lidless.dev/misp-mcp"><strong>Website & docs → lidless.dev/misp-mcp</strong></a>
|
|
14
|
+
</p>
|
|
11
15
|
|
|
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
|
|
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>
|
|
20
22
|
|
|
21
|
-
|
|
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.
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
- A running MISP instance with API access
|
|
25
|
-
- MISP API key (generated from MISP UI: Administration > List Auth Keys)
|
|
25
|
+
## What it does
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
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.
|
|
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.
|
|
36
|
+
|
|
37
|
+
## Quickstart
|
|
38
|
+
|
|
39
|
+
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
40
|
|
|
29
41
|
```bash
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
claude mcp add misp \
|
|
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
|
|
34
47
|
```
|
|
35
48
|
|
|
36
|
-
|
|
49
|
+
Add `--scope user` to make it available from any directory instead of only the current project.
|
|
37
50
|
|
|
38
|
-
|
|
51
|
+
Before wiring a client, verify that the package can reach MISP with the same environment:
|
|
39
52
|
|
|
40
53
|
```bash
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
|
44
58
|
```
|
|
45
59
|
|
|
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
|
|
60
|
+
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
61
|
|
|
55
|
-
###
|
|
62
|
+
### MCP client config (copy-paste)
|
|
56
63
|
|
|
57
|
-
|
|
64
|
+
For Claude Desktop, Cursor, or any client that reads a JSON `mcpServers` block, add:
|
|
58
65
|
|
|
59
66
|
```json
|
|
60
67
|
{
|
|
61
68
|
"mcpServers": {
|
|
62
69
|
"misp": {
|
|
63
|
-
"command": "
|
|
70
|
+
"command": "npx",
|
|
71
|
+
"args": ["-y", "misp-mcp"],
|
|
64
72
|
"env": {
|
|
65
73
|
"MISP_URL": "https://misp.example.com",
|
|
66
74
|
"MISP_API_KEY": "your-api-key-here",
|
|
@@ -71,137 +79,40 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
|
|
|
71
79
|
}
|
|
72
80
|
```
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
claude mcp add misp \
|
|
78
|
-
--env MISP_URL=https://misp.example.com \
|
|
79
|
-
--env MISP_API_KEY=your-api-key-here \
|
|
80
|
-
--env MISP_VERIFY_SSL=false \
|
|
81
|
-
-- misp-mcp
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Add `--scope user` to make it available from any directory instead of only the current project.
|
|
85
|
-
|
|
86
|
-
### OpenClaw
|
|
87
|
-
|
|
88
|
-
If you're running from a source checkout instead of the npm-installed binary, point `command`/`args` at the built `dist/index.js`:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
openclaw mcp set misp '{
|
|
92
|
-
"command": "node",
|
|
93
|
-
"args": ["/absolute/path/to/misp-mcp/dist/index.js"],
|
|
94
|
-
"env": {
|
|
95
|
-
"MISP_URL": "https://misp.example.com",
|
|
96
|
-
"MISP_API_KEY": "your-api-key-here",
|
|
97
|
-
"MISP_VERIFY_SSL": "false"
|
|
98
|
-
}
|
|
99
|
-
}'
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Or, with the global npm install:
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
openclaw mcp set misp '{
|
|
106
|
-
"command": "misp-mcp",
|
|
107
|
-
"env": {
|
|
108
|
-
"MISP_URL": "https://misp.example.com",
|
|
109
|
-
"MISP_API_KEY": "your-api-key-here",
|
|
110
|
-
"MISP_VERIFY_SSL": "false"
|
|
111
|
-
}
|
|
112
|
-
}'
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Then restart the OpenClaw gateway so the new server is picked up:
|
|
82
|
+
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.
|
|
116
83
|
|
|
117
|
-
|
|
118
|
-
systemctl --user restart openclaw-gateway
|
|
119
|
-
openclaw mcp list # confirm "misp" is registered
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Hermes Agent
|
|
123
|
-
|
|
124
|
-
[Hermes Agent](https://github.com/NousResearch/hermes-agent) reads MCP config from `~/.hermes/config.yaml` under the `mcp_servers` key. Add an entry:
|
|
125
|
-
|
|
126
|
-
```yaml
|
|
127
|
-
mcp_servers:
|
|
128
|
-
misp:
|
|
129
|
-
command: "misp-mcp"
|
|
130
|
-
env:
|
|
131
|
-
MISP_URL: "https://misp.example.com"
|
|
132
|
-
MISP_API_KEY: "your-api-key-here"
|
|
133
|
-
MISP_VERIFY_SSL: "false"
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Or, when running from a source checkout instead of the global npm install:
|
|
137
|
-
|
|
138
|
-
```yaml
|
|
139
|
-
mcp_servers:
|
|
140
|
-
misp:
|
|
141
|
-
command: "node"
|
|
142
|
-
args: ["/absolute/path/to/misp-mcp/dist/index.js"]
|
|
143
|
-
env:
|
|
144
|
-
MISP_URL: "https://misp.example.com"
|
|
145
|
-
MISP_API_KEY: "your-api-key-here"
|
|
146
|
-
MISP_VERIFY_SSL: "false"
|
|
147
|
-
```
|
|
84
|
+
### Prerequisites
|
|
148
85
|
|
|
149
|
-
|
|
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).
|
|
150
89
|
|
|
151
|
-
|
|
152
|
-
/reload-mcp
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### Codex CLI
|
|
156
|
-
|
|
157
|
-
[Codex CLI](https://github.com/openai/codex) registers MCP servers via `codex mcp add`:
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
codex mcp add misp \
|
|
161
|
-
--env MISP_URL=https://misp.example.com \
|
|
162
|
-
--env MISP_API_KEY=your-api-key-here \
|
|
163
|
-
--env MISP_VERIFY_SSL=false \
|
|
164
|
-
-- misp-mcp
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Or, when running from a source checkout:
|
|
90
|
+
### Configuration
|
|
168
91
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
Codex writes the entry to `~/.codex/config.toml` under `[mcp_servers.misp]`. Verify with:
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
codex mcp list
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
### Standalone
|
|
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`. |
|
|
184
99
|
|
|
185
|
-
|
|
186
|
-
MISP_URL=https://misp.example.com MISP_API_KEY=your-key node dist/index.js
|
|
187
|
-
```
|
|
100
|
+
### Destructive action safety
|
|
188
101
|
|
|
189
|
-
|
|
102
|
+
State-changing and destructive tools are guarded and refuse to run unless explicitly confirmed:
|
|
190
103
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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.
|
|
195
108
|
|
|
196
|
-
|
|
109
|
+
A guarded call returns an error (`isError: true`) with a `Refused:` message and performs no MISP request.
|
|
197
110
|
|
|
198
|
-
|
|
199
|
-
MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
200
|
-
```
|
|
111
|
+
## Tools
|
|
201
112
|
|
|
202
|
-
|
|
113
|
+
Verified against the server source (36 tools, registered in `src/tools/`).
|
|
203
114
|
|
|
204
|
-
### Event
|
|
115
|
+
### Event tools (6)
|
|
205
116
|
|
|
206
117
|
| Tool | Description |
|
|
207
118
|
|------|-------------|
|
|
@@ -209,19 +120,19 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
209
120
|
| `misp_get_event` | Get full event details including attributes, objects, galaxies, related events |
|
|
210
121
|
| `misp_create_event` | Create a new event with threat level, distribution, and analysis status |
|
|
211
122
|
| `misp_update_event` | Update event metadata (info, threat level, analysis, publish state) |
|
|
212
|
-
| `misp_publish_event` | Publish an event to trigger alerts to sharing partners |
|
|
213
|
-
| `misp_tag_event` | Add or remove tags (TLP, MITRE ATT&CK, custom) from an event |
|
|
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`) |
|
|
214
125
|
|
|
215
|
-
### Attribute
|
|
126
|
+
### Attribute tools (4)
|
|
216
127
|
|
|
217
128
|
| Tool | Description |
|
|
218
129
|
|------|-------------|
|
|
219
130
|
| `misp_search_attributes` | Search IOCs across all events with type, category, and correlation filters |
|
|
220
131
|
| `misp_add_attribute` | Add a single IOC to an event |
|
|
221
132
|
| `misp_add_attributes_bulk` | Add multiple IOCs to an event in one operation |
|
|
222
|
-
| `misp_delete_attribute` | Soft or hard delete an attribute |
|
|
133
|
+
| `misp_delete_attribute` | Soft or hard delete an attribute (requires `confirm:true`; hard delete also requires `confirmHard:true`) |
|
|
223
134
|
|
|
224
|
-
### Correlation &
|
|
135
|
+
### Correlation & intelligence tools (3)
|
|
225
136
|
|
|
226
137
|
| Tool | Description |
|
|
227
138
|
|------|-------------|
|
|
@@ -229,37 +140,37 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
229
140
|
| `misp_get_related_events` | Discover events related through shared IOCs |
|
|
230
141
|
| `misp_describe_types` | Get all available attribute types and category mappings |
|
|
231
142
|
|
|
232
|
-
### Tag &
|
|
143
|
+
### Tag & taxonomy tools (2)
|
|
233
144
|
|
|
234
145
|
| Tool | Description |
|
|
235
146
|
|------|-------------|
|
|
236
147
|
| `misp_list_tags` | List available tags with usage statistics |
|
|
237
148
|
| `misp_search_by_tag` | Find events or attributes by tag |
|
|
238
149
|
|
|
239
|
-
### Export
|
|
150
|
+
### Export tools (2)
|
|
240
151
|
|
|
241
152
|
| Tool | Description |
|
|
242
153
|
|------|-------------|
|
|
243
154
|
| `misp_export_iocs` | Export IOCs in CSV, STIX, Suricata, Snort, text, or RPZ format |
|
|
244
155
|
| `misp_export_hashes` | Export file hashes (MD5, SHA1, SHA256) for HIDS integration |
|
|
245
156
|
|
|
246
|
-
### Sighting &
|
|
157
|
+
### Sighting & warninglist tools (2)
|
|
247
158
|
|
|
248
159
|
| Tool | Description |
|
|
249
160
|
|------|-------------|
|
|
250
161
|
| `misp_add_sighting` | Report a sighting, false positive, or expiration for an IOC |
|
|
251
162
|
| `misp_check_warninglists` | Check if a value appears on known benign/false positive lists |
|
|
252
163
|
|
|
253
|
-
### Object
|
|
164
|
+
### Object tools (4)
|
|
254
165
|
|
|
255
166
|
| Tool | Description |
|
|
256
167
|
|------|-------------|
|
|
257
168
|
| `misp_list_object_templates` | List available MISP object templates (file, domain-ip, email, etc.) |
|
|
258
169
|
| `misp_get_object_template` | Get template details with required/optional attributes |
|
|
259
170
|
| `misp_add_object` | Add a structured object (grouped attributes) to an event |
|
|
260
|
-
| `misp_delete_object` | Delete an object from an event |
|
|
171
|
+
| `misp_delete_object` | Delete an object from an event (requires `confirm:true`; hard delete also requires `confirmHard:true`) |
|
|
261
172
|
|
|
262
|
-
### Galaxy
|
|
173
|
+
### Galaxy tools (4)
|
|
263
174
|
|
|
264
175
|
| Tool | Description |
|
|
265
176
|
|------|-------------|
|
|
@@ -268,7 +179,7 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
268
179
|
| `misp_search_galaxy_clusters` | Search clusters by keyword (find ATT&CK techniques, threat actors) |
|
|
269
180
|
| `misp_attach_galaxy_cluster` | Attach a cluster (ATT&CK technique, etc.) to an event or attribute |
|
|
270
181
|
|
|
271
|
-
### Feed
|
|
182
|
+
### Feed tools (4)
|
|
272
183
|
|
|
273
184
|
| Tool | Description |
|
|
274
185
|
|------|-------------|
|
|
@@ -277,20 +188,20 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
277
188
|
| `misp_fetch_feed` | Trigger a fetch/pull from a feed |
|
|
278
189
|
| `misp_cache_feed` | Cache feed data locally for correlation |
|
|
279
190
|
|
|
280
|
-
### Organisation
|
|
191
|
+
### Organisation tools (2)
|
|
281
192
|
|
|
282
193
|
| Tool | Description |
|
|
283
194
|
|------|-------------|
|
|
284
195
|
| `misp_list_organisations` | List local and remote sharing partner organisations |
|
|
285
196
|
| `misp_get_organisation` | Get organisation details |
|
|
286
197
|
|
|
287
|
-
### Server &
|
|
198
|
+
### Server & admin tools (3)
|
|
288
199
|
|
|
289
200
|
| Tool | Description |
|
|
290
201
|
|------|-------------|
|
|
291
202
|
| `misp_server_status` | Get MISP version, permissions, and diagnostics |
|
|
292
203
|
| `misp_list_sharing_groups` | List sharing groups for controlled distribution |
|
|
293
|
-
| `misp_delete_event` | Delete a MISP event |
|
|
204
|
+
| `misp_delete_event` | Delete a MISP event (requires `confirm:true`) |
|
|
294
205
|
|
|
295
206
|
## Resources
|
|
296
207
|
|
|
@@ -308,7 +219,7 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
308
219
|
| `create-incident-event` | Guided event creation from an incident description with IOC ingestion |
|
|
309
220
|
| `threat-report` | Generate a threat intelligence report from MISP data |
|
|
310
221
|
|
|
311
|
-
## Usage
|
|
222
|
+
## Usage examples
|
|
312
223
|
|
|
313
224
|
### Search for an IOC
|
|
314
225
|
|
|
@@ -318,14 +229,14 @@ Uses `misp_search_events` and `misp_search_attributes` to find all events and at
|
|
|
318
229
|
|
|
319
230
|
### Investigate a suspicious domain
|
|
320
231
|
|
|
321
|
-
> "Investigate
|
|
232
|
+
> "Investigate suspicious-domain.example in MISP"
|
|
322
233
|
|
|
323
234
|
Triggers the `investigate-ioc` prompt workflow: searches for the domain, checks correlations, queries warninglists, and provides a structured threat assessment.
|
|
324
235
|
|
|
325
236
|
### Create an incident event
|
|
326
237
|
|
|
327
238
|
<!-- content-guard: allow email -->
|
|
328
|
-
> "Create a MISP event for a phishing campaign targeting our finance team. The phishing emails came from attacker@
|
|
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"
|
|
329
240
|
|
|
330
241
|
Uses `misp_create_event` followed by `misp_add_attributes_bulk` to create a fully populated event.
|
|
331
242
|
|
|
@@ -337,7 +248,7 @@ Uses `misp_export_iocs` with format "suricata" and last "7d".
|
|
|
337
248
|
|
|
338
249
|
### Check for false positives
|
|
339
250
|
|
|
340
|
-
> "Is
|
|
251
|
+
> "Is 192.0.2.123 on any MISP warninglists?"
|
|
341
252
|
|
|
342
253
|
Uses `misp_check_warninglists` to verify if the value is a known benign indicator.
|
|
343
254
|
|
|
@@ -353,7 +264,7 @@ Uses `misp_search_galaxy_clusters` to find relevant ATT&CK techniques, then `mis
|
|
|
353
264
|
|
|
354
265
|
Uses `misp_add_object` with the "file" template to create a structured group of related attributes.
|
|
355
266
|
|
|
356
|
-
## Supported
|
|
267
|
+
## Supported attribute types
|
|
357
268
|
|
|
358
269
|
| Type | Category | Example |
|
|
359
270
|
|------|----------|---------|
|
|
@@ -370,54 +281,160 @@ Uses `misp_add_object` with the "file" template to create a structured group of
|
|
|
370
281
|
|
|
371
282
|
Use `misp_describe_types` for the complete list of supported types and categories.
|
|
372
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
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Then point any client's `command`/`args` at `node /absolute/path/to/misp-mcp/dist/mcp-bin.js` instead of `npx -y misp-mcp`.
|
|
299
|
+
|
|
300
|
+
### Claude Code (source checkout)
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
claude mcp add misp \
|
|
304
|
+
--env MISP_URL=https://misp.example.com \
|
|
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
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### OpenClaw
|
|
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
|
+
```
|
|
323
|
+
|
|
324
|
+
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:
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
systemctl --user restart openclaw-gateway
|
|
328
|
+
openclaw mcp list # confirm "misp" is registered
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Codex CLI
|
|
332
|
+
|
|
333
|
+
```bash
|
|
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
|
+
```
|
|
340
|
+
|
|
341
|
+
Codex writes the entry to `~/.codex/config.toml` under `[mcp_servers.misp]`. Verify with `codex mcp list`.
|
|
342
|
+
|
|
343
|
+
### Hermes Agent
|
|
344
|
+
|
|
345
|
+
[Hermes Agent](https://github.com/NousResearch/hermes-agent) reads MCP config from `~/.hermes/config.yaml` under `mcp_servers`:
|
|
346
|
+
|
|
347
|
+
```yaml
|
|
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
|
+
```
|
|
357
|
+
|
|
358
|
+
Then `/reload-mcp` inside a Hermes session.
|
|
359
|
+
|
|
360
|
+
### Docker
|
|
361
|
+
|
|
362
|
+
```bash
|
|
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
|
+
```
|
|
366
|
+
|
|
367
|
+
### Standalone
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
MISP_URL=https://misp.example.com MISP_API_KEY=your-key node dist/mcp-bin.js
|
|
371
|
+
MISP_URL=https://misp.example.com MISP_API_KEY=your-key node dist/cli.js status
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### Development
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
</details>
|
|
381
|
+
|
|
373
382
|
## Testing
|
|
374
383
|
|
|
375
384
|
```bash
|
|
376
|
-
npm test
|
|
377
|
-
npm run test:integration # Integration tests against live MISP
|
|
378
|
-
npm run test:watch
|
|
379
|
-
npm run lint
|
|
385
|
+
npm test # Unit tests (mocked)
|
|
386
|
+
npm run test:integration # Integration tests against a live MISP instance
|
|
387
|
+
npm run test:watch # Watch mode
|
|
388
|
+
npm run lint # Type check
|
|
380
389
|
```
|
|
381
390
|
|
|
382
391
|
Integration tests require `MISP_URL`, `MISP_API_KEY`, and optionally `MISP_VERIFY_SSL=false` environment variables.
|
|
383
392
|
|
|
384
|
-
## Project
|
|
393
|
+
## Project structure
|
|
385
394
|
|
|
386
395
|
```
|
|
387
396
|
misp-mcp/
|
|
388
397
|
src/
|
|
389
|
-
|
|
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
|
|
390
402
|
config.ts # Environment config + validation
|
|
391
403
|
client.ts # MISP REST API client
|
|
404
|
+
guards.ts # Destructive-action confirmation guards
|
|
392
405
|
types.ts # MISP API type definitions
|
|
393
406
|
resources.ts # MCP resources
|
|
394
407
|
prompts.ts # MCP prompts
|
|
395
|
-
tools/
|
|
396
|
-
|
|
397
|
-
attributes.ts # Attribute management tools
|
|
398
|
-
correlation.ts # Correlation & intelligence tools
|
|
399
|
-
tags.ts # Tag and taxonomy tools
|
|
400
|
-
exports.ts # Export format tools
|
|
401
|
-
sightings.ts # Sighting tools
|
|
402
|
-
warninglists.ts # Warninglist checks
|
|
403
|
-
objects.ts # Object template & CRUD tools
|
|
404
|
-
galaxies.ts # Galaxy & cluster tools (MITRE ATT&CK)
|
|
405
|
-
feeds.ts # Feed management tools
|
|
406
|
-
organisations.ts # Organisation management tools
|
|
407
|
-
servers.ts # Server admin & sharing group tools
|
|
408
|
-
tests/
|
|
409
|
-
client.test.ts # API client unit tests
|
|
410
|
-
tools.test.ts # Tool handler unit tests
|
|
411
|
-
integration.test.ts # Live MISP API integration tests
|
|
408
|
+
tools/ # One module per tool family (events, attributes, ...)
|
|
409
|
+
tests/ # Unit + integration tests
|
|
412
410
|
Dockerfile
|
|
413
411
|
package.json
|
|
414
|
-
tsconfig.json
|
|
415
|
-
tsup.config.ts
|
|
416
|
-
vitest.config.ts
|
|
417
|
-
vitest.integration.config.ts
|
|
418
|
-
README.md
|
|
419
412
|
```
|
|
420
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
|
+
|
|
421
430
|
## License
|
|
422
431
|
|
|
423
|
-
MIT
|
|
432
|
+
[MIT](LICENSE)
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
<p align="center"><a href="https://lidless.dev">Part of <strong>Lidless Labs</strong></a> · the eye does not close</p>
|
|
437
|
+
|
|
438
|
+
<p align="center"><sub><strong>Security / SOC:</strong> <a href="https://github.com/lidless-labs/soc-stack">soc-stack</a> · <a href="https://github.com/lidless-labs/wazuh-mcp">wazuh-mcp</a> · <a href="https://github.com/lidless-labs/suricata-mcp">suricata-mcp</a> · <a href="https://github.com/lidless-labs/thehive-mcp">thehive-mcp</a> · <a href="https://github.com/lidless-labs/cortex-mcp">cortex-mcp</a> · <a href="https://github.com/lidless-labs/mitre-mcp">mitre-mcp</a> · <a href="https://github.com/lidless-labs/zeek-mcp">zeek-mcp</a> · <a href="https://github.com/lidless-labs/hotwash">hotwash</a></sub></p>
|
|
439
|
+
|
|
440
|
+
<p align="center"><sub><a href="https://lidless.dev">All tools</a> · <a href="https://github.com/lidless-labs">Lidless Labs on GitHub</a></sub></p>
|