gpo-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GPO_LOG_LEVEL | No | Python logging level (DEBUG, INFO, WARNING). Default: INFO. | |
| GPO_BACKUP_PATH | No | Default directory for get_gpo_backup. Default: C:\GPOBackups. | |
| GPO_TARGET_DOMAIN | No | Target Active Directory domain name. Default: current domain. | |
| GPO_COMMAND_TIMEOUT | No | Timeout in seconds for PowerShell commands. Default: 30. | |
| GPO_POWERSHELL_PATH | No | Explicit path to pwsh.exe or powershell.exe. If unset, the server auto-detects PowerShell. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Read-only MCP server for managing Active Directory Group Policy Objects (GPOs).
This server runs on a domain-joined Windows machine with the RSAT Group Policy Management Tools installed. It exposes 15 tools across four categories:
Read Tools — Inspect GPO metadata, settings, links, scope, and inheritance. Scope Tool — Show which users/computers are affected by a GPO (linked OUs + security filtering + WMI filter conditions). Search Tools — Find GPOs by setting content or security permission. Audit Tools — Compare GPOs, identify unlinked/disabled GPOs, and create backups.
All operations are strictly read-only. No GPO configuration is modified.
Prerequisites:
Windows, domain-joined machine
RSAT: Group Policy Management Tools installed
PowerShell 5.1+ (pwsh.exe or powershell.exe)
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_gposA | List all Group Policy Objects in the domain. Returns a summary of every GPO found, including name, GUID, status, creation/modification timestamps, owner, and description. |
| get_gpo_detailsB | Get detailed metadata for a specific Group Policy Object. Retrieves the full GPO object including version information, enabled status, WMI filter, owner, and timestamps. |
| get_gpo_reportA | Get the full settings report for a GPO in XML or HTML format. For XML reports, returns both the raw XML string and the parsed settings structure. For HTML reports, returns the raw HTML string suitable for display in a browser. |
| get_gpo_settingsB | Extract structured policy settings from a GPO. Fetches the XML report for the GPO and returns parsed settings in a clean, nested dictionary format without the raw XML overhead. |
| get_gpo_linksA | Show all Organizational Units, domains, and sites linked to a GPO. Parses the LinksTo section of the GPO XML report to show exactly where this GPO is applied, including whether each link is enabled and whether it is enforced (NoOverride). |
| get_gpo_scopeA | Show which users and computers are affected by a GPO. Determines the effective applicability scope of a GPO by combining:
|
| get_gpo_inheritanceA | Show the GPO inheritance chain for an Organizational Unit. Retrieves the ordered list of GPOs that apply to the specified OU, taking into account inheritance from parent OUs, block inheritance settings, and enforced (NoOverride) links. |
| get_rsopA | Get the Resultant Set of Policy (RSoP) for a user and/or computer. Calculates which policies actually apply to a specific user, computer, or user+computer combination after inheritance, security filtering, and WMI filter evaluation are taken into account. At least one of |
| test_connectionA | Verify that PowerShell and the GroupPolicy module are available. Tests the connection to PowerShell and confirms the GroupPolicy RSAT module is installed. Use this tool to diagnose configuration issues before running other GPO operations. |
| compare_gposA | Compare the settings between two Group Policy Objects. Fetches XML reports for both GPOs, parses them into structured settings, then computes a detailed diff. Useful for identifying configuration drift between a baseline GPO and a deployed GPO, or between two environment-specific GPOs. |
| find_unlinked_gposA | Find all GPOs that are not linked to any OU, site, or domain. Unlinked GPOs consume storage and processing resources but have no effect on any users or computers. They are often the result of deleted OUs, reorganized AD structure, or incomplete cleanup after GPO migration. Note: This tool issues one PowerShell call per GPO to fetch XML reports. It may be slow on domains with many GPOs. |
| find_disabled_gposA | Find GPOs that are fully or partially disabled. Identifies GPOs where all settings, computer settings only, or user settings only are disabled. Partially disabled GPOs can indicate intentional configuration (e.g., a Computer-only GPO with User settings disabled) or abandoned/forgotten GPOs. |
| get_gpo_backupA | Create a backup of a Group Policy Object to a specified path. Exports the GPO settings to a backup folder using Backup-GPO. The backup includes all policy settings, security settings, and WMI filters. It does NOT modify any GPO configuration — this is a read-only export operation. The backup can later be used to restore the GPO with Restore-GPO (outside the scope of this read-only server). |
| find_gpo_by_settingA | Search all GPOs for a specific policy setting by keyword. Iterates through every GPO in the domain, fetches its XML report, and searches for the given keyword in setting names, categories, and registry key paths. This operation can be slow on domains with many GPOs because it must fetch and parse each GPO report. |
| find_gpo_by_permissionA | Find GPOs where a specific user or group has a defined permission. Queries the security permissions on every GPO in the domain to find which GPOs a given user, group, or security principal has access to. Useful for auditing who can manage, apply, or read specific GPOs. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 15 tools
Most tools have clearly distinct targets (links, inheritance, RSoP, comparison, searches), but a few overlap: get_gpo_scope explicitly re-includes link status and WMI filter info already exposed by get_gpo_links and get_gpo_details, and get_gpo_report vs get_gpo_settings differ mainly in output format. Descriptions do a good job of steering an agent to the right one in most cases.
All names use snake_case with a leading verb (list_, get_, find_, compare_, test_), which is highly predictable. The one wrinkle is get_gpo_backup, whose 'get_' verb masks that it creates a backup folder — a create/export verb would be clearer.
Fifteen tools is well within the sweet spot for a read-only GPO auditing domain, and each tool maps to a distinct diagnostic question (links, scope, inheritance, RSoP, drift, unlinked, disabled, backup). Nothing feels like filler.
The read-only lifecycle is well covered: enumerate, inspect, parse settings, resolve effective scope/RSoP, compare, and export. Remaining gaps are minor and mostly acknowledged out of scope — no restore/import path and no direct tool for discovering OUs/sites/domains as entry points for inheritance or link queries.