Skip to content

Commit a4f0bf9

Browse files
committed
Initial commit with readme.
1 parent 40b35c4 commit a4f0bf9

File tree

10 files changed

+1800
-2
lines changed

10 files changed

+1800
-2
lines changed

.dxtignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
__pycache__/
2+
.claude/
3+
.ruff_cache/
4+
.venv/
5+
build/
6+
lib/
7+
scripts/
8+
docs/
9+
*.egg-info/

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

README.md

Lines changed: 144 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,144 @@
1-
# mcp-server-ntm
2-
The official MCP server for Threat Manager.
1+
# Netwrix Threat Manager MCP Server
2+
3+
This [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server enables AI assistants to interface directly with Netwrix Threat Manager (NTM), enhancing your organization's threat management capabilities.
4+
5+
## Use Cases
6+
- **Threat Monitoring:** View the most recent threats or those within a specified time frame.
7+
- **Filtering:** Filter threats by one or more perpetrators or by threat types.
8+
- **Details and Events:** Dive into the details and get the events that triggered a given threat.
9+
- **Searching:** Find objects and users, search by name or tag, and list tags.
10+
- **Links:** Usable links back to NTM (login required).
11+
- **Complex Queries:** Ask more complex questions that combine tools intelligently for a more targetted answer.
12+
13+
## Example Usages
14+
Here are some example prompts, and which tools are invoked, and how the LLM may respond. See below for tool details.
15+
16+
- "Show me the most recent threats."
17+
- `get_recent_threats`, no threat IDs, no perp IDs, default `skip` and `take` values.
18+
- _The LLM may ask if you want to see more threats once this is complete, which will set the `skip` and `take` params accordingly._
19+
20+
- "Find any users with the surname Hunter."
21+
- `find_users_by_name`: using the string "Hunter" as `name_search`.
22+
- _The tool will find any user with Hunter in their name, so it would also find those with a first name of Hunter. The LLM in this case will probably differentiate between those with the surname "Hunter" and those with it as a first name._
23+
24+
- "I want to know which objects are stale."
25+
- `get_all_tags`: the LLM will consider using get_objects_with_tag but then realises it needs to call this tool first.
26+
- `get_objects_with_tag`: set `tag_id` parameter using tag ID for "stale" as found in previous tool.
27+
28+
- "Find me all threats for last Wednesday by users tagged as stale."
29+
- `get_all_tags`: to fetch all tag IDs, then find the one for "stale".
30+
- `get_users_with_tag`: to fetch all users tagged as stale.
31+
- `get_threats_within_time_range`: using the user IDs found, will fetch the 20 most recent threats from "last Wednesday".
32+
- _The LLM may repeat calls to the last tool to get all threats. For example if the first call returns 20, a safe assumption to make is that there is more, less than 20 means there is no point skipping and taking more._
33+
34+
![MCP Server for NTM in Claude Desktop](docs/images/Threats%20Last%20Monday%20Privileged.gif)
35+
36+
## Tools
37+
38+
### Threat Discovery and Details
39+
40+
- **get_threat_types** - View all types of threats, their level, and if they are enabled.
41+
42+
- **get_recent_threats** - Gets the most recent threats, optionally filtered by threat type, and optionally filtered by perpetrator.
43+
- `threat_type_ids`: Filter on threat types, obtained by get_threat_types tool. Empty list assumes all threats. (array, required)
44+
- `perp_ids`: Filter on perpetrators, obtained by get_threat_types tool. Empty list assumes all perpetrators. (array, required)
45+
- `skip`: Skip a number of records. Defaults to 0.
46+
- `take`: Take a number of records. Defaults to 20, maximum of 20.
47+
48+
- **get_threats_within_time_range** - Gets threats within the given date and time range, optionally filtered by threat type, and optionally filtered by perpetrator.
49+
- `start_time` start date and time to search from. (datetime, required)
50+
- `end_time` end date and time to search until. (datetime, required)
51+
- `threat_type_ids`: Filter on threat types, obtained by get_threat_types tool. Empty list assumes all threats. (array, required)
52+
- `perp_ids`: Filter on perpetrators, obtained by get_threat_types tool. Empty list assumes all perpetrators. (array, required)
53+
- `skip`: Skip a number of records. Defaults to 0.
54+
- `take`: Take a number of records. Defaults to 20, maximum of 20.
55+
56+
- **get_details_for_threat** - Gets details for the given threat.
57+
- `threat_id`: Threat ID, obtained by get_recent_threats and get_threats_within_time_range tools. (GUID, required)
58+
59+
- **get_recent_events_for_threat** - Gets threats within the given date and time range, optionally filtered by threat type, and optionally filtered by perpetrator.
60+
- `threat_id`: Threat ID, obtained by get_recent_threats and get_threats_within_time_range tools. (GUID, required)
61+
- `skip`: Skip a number of records. Defaults to 0.
62+
- `take`: Take a number of records. Defaults to 20, maximum of 20.
63+
64+
### User and Object Searching
65+
66+
- **find_users_by_name** - Finds all users by name. Partial matches will also be returned.
67+
- `name_search`: Partial or full name of user to search for, case is ignored. (string, required)
68+
69+
- **get_all_tags** - Get tags available in NTM.
70+
- `skip`: Skip a number of records. Defaults to 0.
71+
- `take`: Take a number of records. Defaults to 20, maximum of 20.
72+
73+
- **get_objects_with_tag** - Get all objects with the given tag ID.
74+
- `tag_id`: The tag ID to filter objects by. (integer, required)
75+
76+
- **get_users_with_tag** - Get all users with the given tag ID.
77+
- `tag_id`: The tag ID to filter objects by, from get_all_tags tool. (integer, required)
78+
79+
### Version
80+
- **get_ntm_version** - Get the version of your Netwrix Threat Manager server.
81+
82+
## Installation
83+
84+
Prequisites:
85+
86+
- Install [uv](https://docs.astral.sh/uv/getting-started/installation/), a Python project manager
87+
88+
- Clone the repository (or download it as a zip)
89+
90+
To clone the repository:
91+
```bash
92+
git clone https://github.com/netwrix/mcp-server-ntm.git
93+
```
94+
95+
### Install in Claude Desktop via Desktop Extensions (Recommended)
96+
97+
#### Option 1: One-click Installation
98+
99+
- Download the latest `mcp_server_ntm.dxt` file from [releases](https://github.com/netwrix/mcp-server-ntm/releases)
100+
101+
- Double-click to open with Claude Desktop (may have to find Claude Desktop to "Open with...")
102+
103+
- Click "Install"
104+
105+
#### Option 2: Upload Desktop Extension File Manually
106+
107+
- Download the latest `mcp_server_ntm.dxt` file from [releases](https://github.com/netwrix/mcp-server-ntm/releases)
108+
- Navigate to `File -> Settings -> Extensions -> Advanced settings -> Install Extension...`
109+
- Fill out the required fields, select Install and Enable
110+
111+
### Install in Claude Desktop via Configuration File
112+
113+
- Navigate to `File -> Settings -> Developer -> Edit Config`
114+
115+
Open the `claude_desktop_config.json` file and add the following:
116+
117+
```json
118+
{
119+
"mcpServers": {
120+
"mcp-server-ntm": {
121+
"command": "uv",
122+
"args": [
123+
"run",
124+
"path/to/src/mcp_server_ntm/server.py"
125+
],
126+
"env": {
127+
"NTM_URL": "https://example.com",
128+
"NTM_USERNAME": "your_ntm_username",
129+
"NTM_PASSWORD": "your_ntm_password"
130+
}
131+
}
132+
}
133+
}
134+
```
135+
136+
Then, restart Claude Desktop.
137+
138+
## License
139+
140+
This project is licensed under the terms of the MIT open source license. Please refer to [MIT](./LICENSE) for the full terms.
141+
142+
## Connect with Us
143+
144+
If you need help using this MCP server, want to better understand your results, or would like to share feedback, visit the [Netwrix Community](https://community.netwrix.com/) - we’re here to help and eager to hear about your experience!
841 KB
Loading

manifest.json

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"dxt_version": "0.1",
3+
"name": "mcp-server-ntm",
4+
"display_name": "Netwrix Threat Manager MCP Server",
5+
"version": "0.0.1",
6+
"description": "Monitor and assess threats.",
7+
"author": {
8+
"name": "Netwrix Corporation"
9+
},
10+
"keywords": [
11+
"netwrix",
12+
"security",
13+
"threat",
14+
"monitoring"
15+
],
16+
"license": "MIT",
17+
"icon": "assets/icon.png",
18+
"server": {
19+
"type": "python",
20+
"entry_point": "server.py",
21+
"mcp_config": {
22+
"command": "uv",
23+
"args": [
24+
"run",
25+
"--directory",
26+
"${__dirname}",
27+
"python",
28+
"${__dirname}/server.py"
29+
],
30+
"env": {
31+
"PYTHONPATH": "${__dirname}/lib",
32+
"NTM_URL": "${user_config.ntm_url}",
33+
"NTM_USERNAME": "${user_config.ntm_username}",
34+
"NTM_PASSWORD": "${user_config.ntm_password}",
35+
"NTM_VERIFY_TRUST": "false",
36+
"MCP_TRANSPORT": "stdio"
37+
}
38+
}
39+
},
40+
"tools": [
41+
{
42+
"name": "get_threat_types",
43+
"description": "Get all threat types in NTM. This will return all enabled and disabled threats."
44+
},
45+
{
46+
"name": "get_recent_threats",
47+
"description": "Gets the most recent threats, optionally filtered by threat type, and optionally filtered by perpetrator."
48+
},
49+
{
50+
"name": "get_threats_within_time_range",
51+
"description": "Gets threats within the given date and time range, optionally filtered by threat type, and optionally filtered by perpetrator."
52+
},
53+
{
54+
"name": "get_details_for_threat",
55+
"description": "Gets details for the given threat. Only one threat at a time is supported."
56+
},
57+
{
58+
"name": "get_recent_events_for_threat",
59+
"description": "Gets most recent events for the given threat ID."
60+
},
61+
{
62+
"name": "find_users_by_name",
63+
"description": "Finds all users by name using a case-insensitive search. Partial matches will also be returned."
64+
},
65+
{
66+
"name": "get_all_tags",
67+
"description": "Get tags available in NTM."
68+
},
69+
{
70+
"name": "get_objects_with_tag",
71+
"description": "Get all objects with the given tag ID."
72+
},
73+
{
74+
"name": "get_users_with_tag",
75+
"description": "Get all users with the given tag ID."
76+
},
77+
{
78+
"name": "get_ntm_version",
79+
"description": "Get the version of NTM (Netwrix Threat Manager)."
80+
}
81+
],
82+
"user_config": {
83+
"ntm_url": {
84+
"type": "string",
85+
"title": "NTM Server URL",
86+
"description": "The URL for your Threat Manager server (e.g., https://ntm.example.com)",
87+
"required": true
88+
},
89+
"ntm_username": {
90+
"type": "string",
91+
"title": "Username",
92+
"description": "Your Threat Manager username",
93+
"required": true
94+
},
95+
"ntm_password": {
96+
"type": "string",
97+
"title": "Password",
98+
"description": "Your Threat Manager password",
99+
"sensitive": true,
100+
"required": true
101+
}
102+
},
103+
"compatibility": {
104+
"dxt_version": ">=0.1",
105+
"platforms": [
106+
"win32"
107+
],
108+
"runtimes": {
109+
"python": ">=3.12"
110+
}
111+
}
112+
}

mcp_server_ntm/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)