misp-mcp 1.2.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 +215 -209
- 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 -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,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": "
|
|
67
|
+
"command": "npx",
|
|
68
|
+
"args": ["-y", "misp-mcp"],
|
|
64
69
|
"env": {
|
|
65
70
|
"MISP_URL": "https://misp.example.com",
|
|
66
71
|
"MISP_API_KEY": "your-api-key-here",
|
|
@@ -71,137 +76,40 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
|
|
|
71
76
|
}
|
|
72
77
|
```
|
|
73
78
|
|
|
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:
|
|
116
|
-
|
|
117
|
-
```bash
|
|
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
|
-
```
|
|
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.
|
|
135
80
|
|
|
136
|
-
|
|
81
|
+
### Prerequisites
|
|
137
82
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
```
|
|
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).
|
|
148
86
|
|
|
149
|
-
|
|
150
|
-
|
|
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:
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
codex mcp add misp \
|
|
171
|
-
--env MISP_URL=https://misp.example.com \
|
|
172
|
-
--env MISP_API_KEY=your-api-key-here \
|
|
173
|
-
--env MISP_VERIFY_SSL=false \
|
|
174
|
-
-- node /absolute/path/to/misp-mcp/dist/index.js
|
|
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
|
-
```
|
|
87
|
+
### Configuration
|
|
182
88
|
|
|
183
|
-
|
|
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`. |
|
|
184
96
|
|
|
185
|
-
|
|
186
|
-
MISP_URL=https://misp.example.com MISP_API_KEY=your-key node dist/index.js
|
|
187
|
-
```
|
|
97
|
+
### Destructive action safety
|
|
188
98
|
|
|
189
|
-
|
|
99
|
+
State-changing and destructive tools are guarded and refuse to run unless explicitly confirmed:
|
|
190
100
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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.
|
|
195
105
|
|
|
196
|
-
|
|
106
|
+
A guarded call returns an error (`isError: true`) with a `Refused:` message and performs no MISP request.
|
|
197
107
|
|
|
198
|
-
|
|
199
|
-
MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
200
|
-
```
|
|
108
|
+
## Tools
|
|
201
109
|
|
|
202
|
-
|
|
110
|
+
Verified against the server source (36 tools, registered in `src/tools/`).
|
|
203
111
|
|
|
204
|
-
### Event
|
|
112
|
+
### Event tools (6)
|
|
205
113
|
|
|
206
114
|
| Tool | Description |
|
|
207
115
|
|------|-------------|
|
|
@@ -209,19 +117,19 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
209
117
|
| `misp_get_event` | Get full event details including attributes, objects, galaxies, related events |
|
|
210
118
|
| `misp_create_event` | Create a new event with threat level, distribution, and analysis status |
|
|
211
119
|
| `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 |
|
|
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`) |
|
|
214
122
|
|
|
215
|
-
### Attribute
|
|
123
|
+
### Attribute tools (4)
|
|
216
124
|
|
|
217
125
|
| Tool | Description |
|
|
218
126
|
|------|-------------|
|
|
219
127
|
| `misp_search_attributes` | Search IOCs across all events with type, category, and correlation filters |
|
|
220
128
|
| `misp_add_attribute` | Add a single IOC to an event |
|
|
221
129
|
| `misp_add_attributes_bulk` | Add multiple IOCs to an event in one operation |
|
|
222
|
-
| `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`) |
|
|
223
131
|
|
|
224
|
-
### Correlation &
|
|
132
|
+
### Correlation & intelligence tools (3)
|
|
225
133
|
|
|
226
134
|
| Tool | Description |
|
|
227
135
|
|------|-------------|
|
|
@@ -229,37 +137,37 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
229
137
|
| `misp_get_related_events` | Discover events related through shared IOCs |
|
|
230
138
|
| `misp_describe_types` | Get all available attribute types and category mappings |
|
|
231
139
|
|
|
232
|
-
### Tag &
|
|
140
|
+
### Tag & taxonomy tools (2)
|
|
233
141
|
|
|
234
142
|
| Tool | Description |
|
|
235
143
|
|------|-------------|
|
|
236
144
|
| `misp_list_tags` | List available tags with usage statistics |
|
|
237
145
|
| `misp_search_by_tag` | Find events or attributes by tag |
|
|
238
146
|
|
|
239
|
-
### Export
|
|
147
|
+
### Export tools (2)
|
|
240
148
|
|
|
241
149
|
| Tool | Description |
|
|
242
150
|
|------|-------------|
|
|
243
151
|
| `misp_export_iocs` | Export IOCs in CSV, STIX, Suricata, Snort, text, or RPZ format |
|
|
244
152
|
| `misp_export_hashes` | Export file hashes (MD5, SHA1, SHA256) for HIDS integration |
|
|
245
153
|
|
|
246
|
-
### Sighting &
|
|
154
|
+
### Sighting & warninglist tools (2)
|
|
247
155
|
|
|
248
156
|
| Tool | Description |
|
|
249
157
|
|------|-------------|
|
|
250
158
|
| `misp_add_sighting` | Report a sighting, false positive, or expiration for an IOC |
|
|
251
159
|
| `misp_check_warninglists` | Check if a value appears on known benign/false positive lists |
|
|
252
160
|
|
|
253
|
-
### Object
|
|
161
|
+
### Object tools (4)
|
|
254
162
|
|
|
255
163
|
| Tool | Description |
|
|
256
164
|
|------|-------------|
|
|
257
165
|
| `misp_list_object_templates` | List available MISP object templates (file, domain-ip, email, etc.) |
|
|
258
166
|
| `misp_get_object_template` | Get template details with required/optional attributes |
|
|
259
167
|
| `misp_add_object` | Add a structured object (grouped attributes) to an event |
|
|
260
|
-
| `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`) |
|
|
261
169
|
|
|
262
|
-
### Galaxy
|
|
170
|
+
### Galaxy tools (4)
|
|
263
171
|
|
|
264
172
|
| Tool | Description |
|
|
265
173
|
|------|-------------|
|
|
@@ -268,7 +176,7 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
268
176
|
| `misp_search_galaxy_clusters` | Search clusters by keyword (find ATT&CK techniques, threat actors) |
|
|
269
177
|
| `misp_attach_galaxy_cluster` | Attach a cluster (ATT&CK technique, etc.) to an event or attribute |
|
|
270
178
|
|
|
271
|
-
### Feed
|
|
179
|
+
### Feed tools (4)
|
|
272
180
|
|
|
273
181
|
| Tool | Description |
|
|
274
182
|
|------|-------------|
|
|
@@ -277,20 +185,20 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
277
185
|
| `misp_fetch_feed` | Trigger a fetch/pull from a feed |
|
|
278
186
|
| `misp_cache_feed` | Cache feed data locally for correlation |
|
|
279
187
|
|
|
280
|
-
### Organisation
|
|
188
|
+
### Organisation tools (2)
|
|
281
189
|
|
|
282
190
|
| Tool | Description |
|
|
283
191
|
|------|-------------|
|
|
284
192
|
| `misp_list_organisations` | List local and remote sharing partner organisations |
|
|
285
193
|
| `misp_get_organisation` | Get organisation details |
|
|
286
194
|
|
|
287
|
-
### Server &
|
|
195
|
+
### Server & admin tools (3)
|
|
288
196
|
|
|
289
197
|
| Tool | Description |
|
|
290
198
|
|------|-------------|
|
|
291
199
|
| `misp_server_status` | Get MISP version, permissions, and diagnostics |
|
|
292
200
|
| `misp_list_sharing_groups` | List sharing groups for controlled distribution |
|
|
293
|
-
| `misp_delete_event` | Delete a MISP event |
|
|
201
|
+
| `misp_delete_event` | Delete a MISP event (requires `confirm:true`) |
|
|
294
202
|
|
|
295
203
|
## Resources
|
|
296
204
|
|
|
@@ -308,7 +216,7 @@ MISP_URL=https://misp.example.com MISP_API_KEY=your-key npm run dev
|
|
|
308
216
|
| `create-incident-event` | Guided event creation from an incident description with IOC ingestion |
|
|
309
217
|
| `threat-report` | Generate a threat intelligence report from MISP data |
|
|
310
218
|
|
|
311
|
-
## Usage
|
|
219
|
+
## Usage examples
|
|
312
220
|
|
|
313
221
|
### Search for an IOC
|
|
314
222
|
|
|
@@ -318,14 +226,14 @@ Uses `misp_search_events` and `misp_search_attributes` to find all events and at
|
|
|
318
226
|
|
|
319
227
|
### Investigate a suspicious domain
|
|
320
228
|
|
|
321
|
-
> "Investigate
|
|
229
|
+
> "Investigate suspicious-domain.example in MISP"
|
|
322
230
|
|
|
323
231
|
Triggers the `investigate-ioc` prompt workflow: searches for the domain, checks correlations, queries warninglists, and provides a structured threat assessment.
|
|
324
232
|
|
|
325
233
|
### Create an incident event
|
|
326
234
|
|
|
327
235
|
<!-- content-guard: allow email -->
|
|
328
|
-
> "Create a MISP event for a phishing campaign targeting our finance team. The phishing emails came from attacker@
|
|
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"
|
|
329
237
|
|
|
330
238
|
Uses `misp_create_event` followed by `misp_add_attributes_bulk` to create a fully populated event.
|
|
331
239
|
|
|
@@ -337,7 +245,7 @@ Uses `misp_export_iocs` with format "suricata" and last "7d".
|
|
|
337
245
|
|
|
338
246
|
### Check for false positives
|
|
339
247
|
|
|
340
|
-
> "Is
|
|
248
|
+
> "Is 192.0.2.123 on any MISP warninglists?"
|
|
341
249
|
|
|
342
250
|
Uses `misp_check_warninglists` to verify if the value is a known benign indicator.
|
|
343
251
|
|
|
@@ -353,7 +261,7 @@ Uses `misp_search_galaxy_clusters` to find relevant ATT&CK techniques, then `mis
|
|
|
353
261
|
|
|
354
262
|
Uses `misp_add_object` with the "file" template to create a structured group of related attributes.
|
|
355
263
|
|
|
356
|
-
## Supported
|
|
264
|
+
## Supported attribute types
|
|
357
265
|
|
|
358
266
|
| Type | Category | Example |
|
|
359
267
|
|------|----------|---------|
|
|
@@ -370,54 +278,152 @@ Uses `misp_add_object` with the "file" template to create a structured group of
|
|
|
370
278
|
|
|
371
279
|
Use `misp_describe_types` for the complete list of supported types and categories.
|
|
372
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
|
+
|
|
373
379
|
## Testing
|
|
374
380
|
|
|
375
381
|
```bash
|
|
376
|
-
npm test
|
|
377
|
-
npm run test:integration # Integration tests against live MISP
|
|
378
|
-
npm run test:watch
|
|
379
|
-
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
|
|
380
386
|
```
|
|
381
387
|
|
|
382
388
|
Integration tests require `MISP_URL`, `MISP_API_KEY`, and optionally `MISP_VERIFY_SSL=false` environment variables.
|
|
383
389
|
|
|
384
|
-
## Project
|
|
390
|
+
## Project structure
|
|
385
391
|
|
|
386
392
|
```
|
|
387
393
|
misp-mcp/
|
|
388
394
|
src/
|
|
389
|
-
|
|
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
|
|
390
399
|
config.ts # Environment config + validation
|
|
391
400
|
client.ts # MISP REST API client
|
|
401
|
+
guards.ts # Destructive-action confirmation guards
|
|
392
402
|
types.ts # MISP API type definitions
|
|
393
403
|
resources.ts # MCP resources
|
|
394
404
|
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
|
|
405
|
+
tools/ # One module per tool family (events, attributes, ...)
|
|
406
|
+
tests/ # Unit + integration tests
|
|
412
407
|
Dockerfile
|
|
413
408
|
package.json
|
|
414
|
-
tsconfig.json
|
|
415
|
-
tsup.config.ts
|
|
416
|
-
vitest.config.ts
|
|
417
|
-
vitest.integration.config.ts
|
|
418
|
-
README.md
|
|
419
409
|
```
|
|
420
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
|
+
|
|
421
427
|
## License
|
|
422
428
|
|
|
423
|
-
MIT
|
|
429
|
+
[MIT](LICENSE)
|