lumu-mcp-server 1.0.0__tar.gz

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.
@@ -0,0 +1,52 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ share/python-wheels/
20
+ *.egg-info/
21
+ .installed.cfg
22
+ *.egg
23
+ MANIFEST
24
+
25
+ # Virtual environments
26
+ venv/
27
+ env/
28
+ ENV/
29
+ .venv/
30
+
31
+ # IDE
32
+ .vscode/
33
+ .idea/
34
+ *.swp
35
+ *.swo
36
+
37
+ # OS
38
+ .DS_Store
39
+ Thumbs.db
40
+
41
+ # Test files
42
+ test_*.py
43
+ *_test.py
44
+ TEST_*.md
45
+
46
+ # API keys and secrets
47
+ .env
48
+ .env.local
49
+ claude_desktop_config.json
50
+
51
+ # Development files
52
+ PUBLISH*.md
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Juan Pablo Gonzalez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ recursive-include lumu_mcp_server *.py
@@ -0,0 +1,419 @@
1
+ Metadata-Version: 2.4
2
+ Name: lumu-mcp-server
3
+ Version: 1.0.0
4
+ Summary: MCP server for Lumu Defender API integration with Claude Desktop
5
+ Project-URL: Homepage, https://github.com/jpyoda/lumu-mcp
6
+ Project-URL: Repository, https://github.com/jpyoda/lumu-mcp
7
+ Project-URL: Documentation, https://github.com/jpyoda/lumu-mcp#readme
8
+ Project-URL: Bug Tracker, https://github.com/jpyoda/lumu-mcp/issues
9
+ Author-email: Juan Pablo Gonzalez <your-email@example.com>
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: ai,claude,cybersecurity,lumu,mcp,security
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Information Technology
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Security
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: httpx>=0.27.0
25
+ Requires-Dist: mcp>=1.0.0
26
+ Description-Content-Type: text/markdown
27
+
28
+ # 🛡️ Lumu MCP Server
29
+
30
+ > **Supercharge Claude Desktop with Lumu Defender security incident analysis**
31
+
32
+ An MCP (Model Context Protocol) server that seamlessly integrates Claude Desktop with the Lumu Defender API, enabling AI-powered security incident analysis and management.
33
+
34
+ [![PyPI version](https://badge.fury.io/py/lumu-mcp-server.svg)](https://badge.fury.io/py/lumu-mcp-server)
35
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
36
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
37
+
38
+ ## ✨ Features
39
+
40
+ - 🔍 **Incident Retrieval**: Get security incidents with advanced filtering
41
+ - 🎯 **Smart Analysis**: AI-powered incident analysis through Claude
42
+ - 📊 **Full Management**: Mark as read, mute, unmute, and close incidents
43
+ - 🖥️ **Endpoint Insights**: Analyze affected endpoints and network contacts
44
+ - 📈 **Real-time Monitoring**: Track incident updates and activity
45
+ - 🔐 **Secure Integration**: Environment-based API key management
46
+ - ⚡ **Easy Setup**: One-command installation with pip
47
+
48
+ ## 🚀 Quick Start
49
+
50
+ ### 1. Install
51
+
52
+ ```bash
53
+ pip install lumu-mcp-server
54
+ ```
55
+
56
+ ### 2. Configure Claude Desktop
57
+
58
+ Add to your `claude_desktop_config.json`:
59
+
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "lumu-mcp-server": {
64
+ "command": "lumu-mcp-server",
65
+ "env": {
66
+ "LUMU_DEFENDER_API_KEY": "your-api-key-here"
67
+ }
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ ### 3. Start Using
74
+
75
+ Ask Claude: _"Get security incidents from Lumu Defender"_
76
+
77
+ > 💡 **Need help finding your config file?** See [Configuration Locations](#configuration-file-locations) below.
78
+
79
+ ## 🔧 Configuration
80
+
81
+ ### Get Your Lumu Defender API Key
82
+
83
+ 1. Log in to your [Lumu Defender account](https://defender.lumu.io)
84
+ 2. Navigate to **Settings** → **API Keys**
85
+ 3. Generate or copy your API key
86
+
87
+ ### Configuration File Locations
88
+
89
+ - **🍎 macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
90
+ - **🪟 Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
91
+ - **🐧 Linux**: `~/.config/Claude/claude_desktop_config.json`
92
+
93
+ ### Configuration Options
94
+
95
+ #### Standard Configuration (Recommended)
96
+
97
+ ```json
98
+ {
99
+ "mcpServers": {
100
+ "lumu-mcp-server": {
101
+ "command": "lumu-mcp-server",
102
+ "env": {
103
+ "LUMU_DEFENDER_API_KEY": "your-api-key-here"
104
+ }
105
+ }
106
+ }
107
+ }
108
+ ```
109
+
110
+ #### Alternative Configuration
111
+
112
+ If the command isn't found, use the Python module directly:
113
+
114
+ ```json
115
+ {
116
+ "mcpServers": {
117
+ "lumu-mcp-server": {
118
+ "command": "python",
119
+ "args": ["-m", "lumu_mcp_server.server"],
120
+ "env": {
121
+ "LUMU_DEFENDER_API_KEY": "your-api-key-here"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ ```
127
+
128
+ ### Activate the Integration
129
+
130
+ 1. **Restart Claude Desktop** completely
131
+ 2. Look for the **🔌 MCP icon** in Claude Desktop
132
+ 3. Test with: _"Check the health of the lumu-mcp-server"_
133
+
134
+ ## 💬 Usage Examples
135
+
136
+ Once configured, you can interact with Lumu Defender through natural language:
137
+
138
+ ### 🩺 Health & Status
139
+
140
+ - _"Check the health of the lumu-mcp-server"_
141
+ - _"Is the Lumu integration working?"_
142
+
143
+ ### 🔍 Incident Discovery
144
+
145
+ - _"Get security incidents from Lumu Defender"_
146
+ - _"Show me open security incidents from the last 30 days"_
147
+ - _"Find all C2C and Malware incidents"_
148
+ - _"Get incidents with status 'open' or 'muted'"_
149
+
150
+ ### 📋 Incident Analysis
151
+
152
+ - _"Get details for incident [UUID]"_
153
+ - _"Show me the full information about incident abc-123-def"_
154
+ - _"Get the context for incident [UUID]"_
155
+ - _"Show me related incidents and affected assets"_
156
+
157
+ ### 📝 Incident Management
158
+
159
+ - _"Add a comment to incident [UUID]: 'Investigating with network team'"_
160
+ - _"Mark incident [UUID] as read"_
161
+ - _"Mute incident [UUID] with comment 'False positive'"_
162
+ - _"Close incident [UUID] with comment 'Threat resolved'"_
163
+
164
+ ### 🖥️ Network Analysis
165
+
166
+ - _"Get endpoints for incident [UUID]"_
167
+ - _"Show me which endpoints were affected by this incident"_
168
+ - _"Analyze the network impact of incident abc-123-def"_
169
+
170
+ ### 📊 Real-time Monitoring
171
+
172
+ - _"Get incident updates from the last 10 minutes"_
173
+ - _"Show me what happened in the last hour with incidents"_
174
+ - _"Check for recent incident activity"_
175
+
176
+ ### 🔄 Advanced Workflows
177
+
178
+ - _"Get all open Malware incidents, then show details for the most recent one"_
179
+ - _"Find critical incidents that are still open and summarize their impact"_
180
+ - _"List all muted C2C incidents and help me decide which to unmute"_
181
+ - _"Get incident endpoints and mark the incident as read when done"_
182
+
183
+ ## Available Tools
184
+
185
+ ### 1. `health_check`
186
+
187
+ Returns the server status and API key configuration status.
188
+
189
+ ### 2. `get_incidents`
190
+
191
+ Retrieves security incidents with optional filters.
192
+
193
+ **Parameters**:
194
+
195
+ - `from_date` (optional): Start date in ISO format (default: 7 days ago)
196
+ - `to_date` (optional): End date in ISO format (default: now)
197
+ - `status` (optional): Array of statuses ["open", "muted", "closed"]
198
+ - `adversary_types` (optional): Array of types ["C2C", "Malware", "DGA", "Mining", "Spam", "Phishing"]
199
+ - `labels` (optional): Array of label IDs
200
+
201
+ ### 3. `get_incident_details`
202
+
203
+ Get detailed information about a specific security incident.
204
+
205
+ **Parameters**:
206
+
207
+ - `incident_id` (required): The UUID of the incident
208
+
209
+ **Returns**: Detailed incident information including status, IOCs, recommended actions, and more.
210
+
211
+ ### 4. `get_incident_context`
212
+
213
+ Get context information for a specific security incident.
214
+
215
+ **Parameters**:
216
+
217
+ - `incident_id` (required): The UUID of the incident
218
+ - `hash_type` (optional): Hash type for filtering context
219
+
220
+ **Returns**: Context including related incidents, affected assets, threat intelligence, and timeline.
221
+
222
+ ### 5. `comment_incident`
223
+
224
+ Add a comment to a specific security incident.
225
+
226
+ **Parameters**:
227
+
228
+ - `incident_id` (required): The UUID of the incident
229
+ - `comment` (required): The comment text to add
230
+
231
+ **Returns**: Confirmation of the comment being added.
232
+
233
+ ### 6. `get_open_incidents`
234
+
235
+ Retrieve only open security incidents.
236
+
237
+ **Parameters**:
238
+
239
+ - `adversary_types` (optional): Array of types ["C2C", "Malware", "DGA", "Mining", "Spam", "Phishing"]
240
+ - `labels` (optional): Array of label IDs
241
+
242
+ **Returns**: List of open incidents with filtering options.
243
+
244
+ ### 7. `get_muted_incidents`
245
+
246
+ Retrieve only muted security incidents.
247
+
248
+ **Parameters**:
249
+
250
+ - `adversary_types` (optional): Array of types ["C2C", "Malware", "DGA", "Mining", "Spam", "Phishing"]
251
+ - `labels` (optional): Array of label IDs
252
+
253
+ **Returns**: List of muted incidents with filtering options.
254
+
255
+ ### 8. `get_closed_incidents`
256
+
257
+ Retrieve only closed security incidents.
258
+
259
+ **Parameters**:
260
+
261
+ - `adversary_types` (optional): Array of types ["C2C", "Malware", "DGA", "Mining", "Spam", "Phishing"]
262
+ - `labels` (optional): Array of label IDs
263
+
264
+ **Returns**: List of closed incidents with filtering options.
265
+
266
+ ### 9. `get_incident_endpoints`
267
+
268
+ Retrieve endpoints and contacts for a specific security incident.
269
+
270
+ **Parameters**:
271
+
272
+ - `incident_id` (required): The UUID of the incident
273
+ - `endpoints` (optional): Filter by specific endpoint IPs or names
274
+ - `labels` (optional): Array of label IDs
275
+
276
+ **Returns**: Detailed endpoint and contact information for the incident.
277
+
278
+ ### 10. `mark_incident_as_read`
279
+
280
+ Mark a security incident as read.
281
+
282
+ **Parameters**:
283
+
284
+ - `incident_id` (required): The UUID of the incident to mark as read
285
+
286
+ **Returns**: Confirmation that the incident was marked as read.
287
+
288
+ ### 11. `mute_incident`
289
+
290
+ Mute a security incident.
291
+
292
+ **Parameters**:
293
+
294
+ - `incident_id` (required): The UUID of the incident to mute
295
+ - `comment` (optional): Comment explaining why the incident was muted
296
+
297
+ **Returns**: Confirmation that the incident was muted.
298
+
299
+ ### 12. `unmute_incident`
300
+
301
+ Unmute a security incident.
302
+
303
+ **Parameters**:
304
+
305
+ - `incident_id` (required): The UUID of the incident to unmute
306
+ - `comment` (optional): Comment explaining why the incident was unmuted
307
+
308
+ **Returns**: Confirmation that the incident was unmuted.
309
+
310
+ ### 13. `get_incident_updates`
311
+
312
+ Get real-time updates on incident operations (alternative to WebSocket).
313
+
314
+ **Parameters**:
315
+
316
+ - `offset` (optional): Starting offset for pagination (default: 0)
317
+ - `items` (optional): Number of items to return, 1-100 (default: 50)
318
+ - `time` (optional): Time window in minutes for updates (default: 5)
319
+
320
+ **Returns**: List of incident updates with timestamps in UTC (RFC 3339/ISO 8601 format).
321
+
322
+ ### 14. `close_incident`
323
+
324
+ Close a security incident.
325
+
326
+ **Parameters**:
327
+
328
+ - `incident_id` (required): The UUID of the incident to close
329
+ - `comment` (optional): Comment explaining why the incident was closed
330
+
331
+ **Returns**: Confirmation that the incident was closed.
332
+
333
+ ## 🔧 Troubleshooting
334
+
335
+ ### Server Not Appearing in Claude Desktop
336
+
337
+ 1. **Check Claude Desktop logs**: Help → Show Logs
338
+ 2. **Verify installation**: `pip list | grep lumu-mcp-server`
339
+ 3. **Test command**: Run `lumu-mcp-server --help` in terminal
340
+ 4. **Restart Claude Desktop** completely
341
+
342
+ ### API Key Issues
343
+
344
+ - ✅ Ensure API key is correctly set in `claude_desktop_config.json`
345
+ - ✅ Verify API key is valid in [Lumu Defender portal](https://portal.lumu.io)
346
+ - ✅ Check Claude Desktop logs for authentication errors
347
+ - ✅ Test with: _"Check the health of the lumu-mcp-server"_
348
+
349
+ ### No Incidents Returned
350
+
351
+ - 📅 **Date Range**: Try broader date ranges (e.g., last 30 days)
352
+ - 🔍 **Filters**: Remove status/type filters to see all incidents
353
+ - 🔑 **Permissions**: Ensure API key has proper incident access
354
+ - 💡 **Tip**: Ask Claude _"Get incidents from the last 30 days"_
355
+
356
+ ### Connection Issues
357
+
358
+ - 🌐 **Network**: Verify internet connection to `defender.lumu.io`
359
+ - 🔒 **Firewall**: Ensure HTTPS traffic is allowed
360
+ - 🚀 **Proxy**: Configure proxy settings if needed
361
+
362
+ ### Need More Help?
363
+
364
+ - 📖 Check [QUICK_START.md](QUICK_START.md) for simplified setup
365
+ - 🐛 [Report issues](https://github.com/jpyoda/lumu-mcp/issues) on GitHub
366
+ - 💬 [Ask questions](https://github.com/jpyoda/lumu-mcp/discussions) in discussions
367
+
368
+ ## 🔒 Security & Privacy
369
+
370
+ - 🔐 **API keys** stored in environment variables, never in code
371
+ - 🌐 **HTTPS** encryption for all API communications
372
+ - 🚫 **No data storage** - all data fetched in real-time from Lumu
373
+ - 🛡️ **Error sanitization** prevents sensitive information leakage
374
+ - 📝 **Audit trail** through Lumu Defender's native logging
375
+
376
+ ## 🤝 Contributing
377
+
378
+ We welcome contributions! Please see our contribution guidelines:
379
+
380
+ ### Quick Development Setup
381
+
382
+ ```bash
383
+ git clone https://github.com/jpyoda/lumu-mcp.git
384
+ cd lumu-mcp-server
385
+ python -m venv venv
386
+ source venv/bin/activate # Windows: venv\Scripts\activate
387
+ pip install -e .
388
+ ```
389
+
390
+ ### Adding New Features
391
+
392
+ 1. **API Methods**: Add to `lumu_mcp_server/lumu_client.py`
393
+ 2. **Tool Registration**: Update `handle_list_tools()` in `server.py`
394
+ 3. **Handler Implementation**: Add to `handle_call_tool()` in `server.py`
395
+ 4. **Testing**: Ensure functionality works with real API
396
+
397
+ ## 📄 License
398
+
399
+ MIT License - see [LICENSE](LICENSE) file for details.
400
+
401
+ ## 🆘 Support
402
+
403
+ ### Get Help
404
+
405
+ - 🚀 **Quick Setup**: [QUICK_START.md](QUICK_START.md)
406
+ - 🐛 **Bug Reports**: [GitHub Issues](https://github.com/jpyoda/lumu-mcp/issues)
407
+ - 💬 **Questions**: [GitHub Discussions](https://github.com/jpyoda/lumu-mcp/discussions)
408
+ - 📧 **Lumu API Issues**: [Contact Lumu Support](https://help.lumu.io)
409
+
410
+ ### Project Stats
411
+
412
+ ![GitHub stars](https://img.shields.io/github/stars/jpyoda/lumu-mcp?style=social)
413
+ ![GitHub forks](https://img.shields.io/github/forks/jpyoda/lumu-mcp?style=social)
414
+ ![GitHub issues](https://img.shields.io/github/issues/jpyoda/lumu-mcp)
415
+
416
+ ---
417
+
418
+ **Built with ❤️ for the cybersecurity community**
419
+ _Enhance your security operations with AI-powered incident analysis_
@@ -0,0 +1,63 @@
1
+ # 🚀 Quick Start for Users
2
+
3
+ ## Install in 2 Steps
4
+
5
+ ### 1️⃣ Install the Package
6
+
7
+ ```bash
8
+ pip install lumu-mcp-server
9
+ ```
10
+
11
+ ### 2️⃣ Add to Claude Desktop Config
12
+
13
+ Add this to your `claude_desktop_config.json` file:
14
+
15
+ **🍎 macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
16
+ **🪟 Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
17
+ **🐧 Linux**: `~/.config/Claude/claude_desktop_config.json`
18
+
19
+ ```json
20
+ {
21
+ "mcpServers": {
22
+ "lumu-mcp-server": {
23
+ "command": "lumu-mcp-server",
24
+ "env": {
25
+ "LUMU_DEFENDER_API_KEY": "your-lumu-api-key"
26
+ }
27
+ }
28
+ }
29
+ }
30
+ ```
31
+
32
+ ### 3️⃣ Restart Claude Desktop
33
+
34
+ - Quit Claude Desktop completely
35
+ - Reopen Claude Desktop
36
+ - Look for the 🔌 icon to verify connection
37
+
38
+ ## ✅ Test It Works
39
+
40
+ Ask Claude:
41
+
42
+ ```
43
+ "Check the health of the lumu-mcp-server"
44
+ ```
45
+
46
+ or
47
+
48
+ ```
49
+ "Get security incidents from Lumu Defender"
50
+ ```
51
+
52
+ ## 🔑 Get Your API Key
53
+
54
+ 1. Log in to [Lumu Defender](https://portal.lumu.io)
55
+ 2. Go to Settings → API Keys
56
+ 3. Generate or copy your API key
57
+ 4. Replace `your-lumu-api-key` in the config above
58
+
59
+ ## 🆘 Need Help?
60
+
61
+ - 📖 [Full Documentation](README.md)
62
+ - 🐛 [Report Issues](https://github.com/jpyoda/lumu-mcp/issues)
63
+ - 💬 [Ask Questions](https://github.com/jpyoda/lumu-mcp/discussions)