|
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 | + |
| 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! |
0 commit comments