Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

Active Directory / LDAP

by matteoredaelliversion 0.8.4i★ 1 (Stars for the whole repo)iRuns on your computerRepository ↗
Registry nameio.github.matteoredaelli/active-directory-ldap-mcp

How to install

What it does

Active Directory / LDAP MCP server: find users, groups, memberships; read-only security audits.

  • Connects Runs on your computer
  • Account or key Needs MSAD_PASSWORD
  • Category Cybersecurity

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity0/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score12/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Active Directory / LDAP. Follow https://mcp.popnx.com/i/matteoredaelli-active-directory-ldap-mcp.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 18, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

You need a Active Directory / LDAP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Active Directory / LDAP for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "active-directory-ldap": { "command": "uvx", "args": [ "mcpad" ], "env": { "MSAD_PASSWORD": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MSAD_PASSWORD, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Active Directory / LDAP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Active Directory / LDAP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  4. Paste these settings and save the file

    {
      "mcpServers": {
        "active-directory-ldap": {
          "command": "uvx",
          "args": [
            "mcpad"
          ],
          "env": {
            "MSAD_PASSWORD": "your-value"
          }
        }
      }
    }

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Quit Claude and open it again

  6. Try it

    Use Active Directory / LDAP and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Active Directory / LDAP or shows a Active Directory / LDAP tool in the answer, you are connected

5 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MSAD_DOMAIN Default AD domain (section of ~/.msad.toml) when a tool call omits it
  • MSAD_HOST Domain controller host (alternative to ~/.msad.toml)
  • MSAD_BASE LDAP base DN, e.g. dc=example,dc=com
  • MSAD_USER Bind user (user/password auth)
  • MCPAD_ALLOW_WRITE Set truthy to enable group-membership write tools (default: read-only)

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Active Directory / LDAP yet

Active Directory / LDAP runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Active Directory / LDAP

  • You need a Active Directory / LDAP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • You need a Active Directory / LDAP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)
  • You need a Active Directory / LDAP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)
  • You need a Active Directory / LDAP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

B · Others in Cybersecurity that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

You need a Active Directory / LDAP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Active Directory / LDAP for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user active-directory-ldap --env MSAD_PASSWORD=your-value -- uvx mcpad 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MSAD_PASSWORD, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Active Directory / LDAP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Active Directory / LDAP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  4. Paste this command and press Enter

    claude mcp add --scope user active-directory-ldap --env MSAD_PASSWORD=your-value -- uvx mcpad

    Replace “your-value” with your key before pressing Enter

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Type /mcp in Claude Code

    You should see Active Directory / LDAP listed as connected

  6. Try it

    Use Active Directory / LDAP and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Active Directory / LDAP or shows a Active Directory / LDAP tool in the answer, you are connected

5 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MSAD_DOMAIN Default AD domain (section of ~/.msad.toml) when a tool call omits it
  • MSAD_HOST Domain controller host (alternative to ~/.msad.toml)
  • MSAD_BASE LDAP base DN, e.g. dc=example,dc=com
  • MSAD_USER Bind user (user/password auth)
  • MCPAD_ALLOW_WRITE Set truthy to enable group-membership write tools (default: read-only)

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

You need a Active Directory / LDAP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Active Directory / LDAP for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "active-directory-ldap": { "command": "uvx", "args": [ "mcpad" ], "env": { "MSAD_PASSWORD": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MSAD_PASSWORD, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Active Directory / LDAP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Active Directory / LDAP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  4. Fill in your key

    In the Active Directory / LDAP settings, MSAD_PASSWORD is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in Cursor in Agent mode

  6. Try it

    Use Active Directory / LDAP and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Active Directory / LDAP or shows a Active Directory / LDAP tool in the answer, you are connected

5 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MSAD_DOMAIN Default AD domain (section of ~/.msad.toml) when a tool call omits it
  • MSAD_HOST Domain controller host (alternative to ~/.msad.toml)
  • MSAD_BASE LDAP base DN, e.g. dc=example,dc=com
  • MSAD_USER Bind user (user/password auth)
  • MCPAD_ALLOW_WRITE Set truthy to enable group-membership write tools (default: read-only)

Descriptions are as written by the maker.

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

You need a Active Directory / LDAP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Active Directory / LDAP for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "active-directory-ldap": { "type": "stdio", "command": "uvx", "args": [ "mcpad" ], "env": { "MSAD_PASSWORD": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MSAD_PASSWORD, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Active Directory / LDAP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Active Directory / LDAP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  4. Fill in your key

    In the Active Directory / LDAP settings, MSAD_PASSWORD is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in VS Code in Agent mode

  6. Try it

    Use Active Directory / LDAP and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Active Directory / LDAP or shows a Active Directory / LDAP tool in the answer, you are connected

5 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MSAD_DOMAIN Default AD domain (section of ~/.msad.toml) when a tool call omits it
  • MSAD_HOST Domain controller host (alternative to ~/.msad.toml)
  • MSAD_BASE LDAP base DN, e.g. dc=example,dc=com
  • MSAD_USER Bind user (user/password auth)
  • MCPAD_ALLOW_WRITE Set truthy to enable group-membership write tools (default: read-only)

Descriptions are as written by the maker.

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Active Directory / LDAP💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user active-directory-ldap --env MSAD_PASSWORD=your-value -- uvx mcpad

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "active-directory-ldap": {
      "command": "uvx",
      "args": [
        "mcpad"
      ],
      "env": {
        "MSAD_PASSWORD": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "active-directory-ldap": {
      "command": "uvx",
      "args": [
        "mcpad"
      ],
      "env": {
        "MSAD_PASSWORD": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "active-directory-ldap": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcpad"
      ],
      "env": {
        "MSAD_PASSWORD": "your-value"
      }
    }
  }
}

Values you fill in

  • MSAD_DOMAIN env
    Default AD domain (section of ~/.msad.toml) when a tool call omits it
  • MSAD_HOST env
    Domain controller host (alternative to ~/.msad.toml)
  • MSAD_BASE env
    LDAP base DN, e.g. dc=example,dc=com
  • MSAD_USER env
    Bind user (user/password auth)
  • MSAD_PASSWORD secret required env
    Bind password (user/password auth)
  • MCPAD_ALLOW_WRITE env
    Set truthy to enable group-membership write tools (default: read-only)

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

GitHub starsi
1 (Stars for the whole repo)
This repo holds several MCP listings; its stars count once in rankings
Downloads per weeki
122/wk
Licencei
GPL-3.0
Connection
Runs on your computer
Latest versioni
0.8.4
Published to registryi
Nov 18, 2026
Code last changedi
Nov 18, 2026
Maker
matteoredaelli
Packages
pypi: mcpad
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 19, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account matteoredaelli, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed yesterday

  • ✓ Pass

    Has a licence

    Uses GPL-3.0

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for mcpad@0.8.4

Checks only this package version, not every dependency · checked Nov 18, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/matteoredaelli-active-directory-ldap-mcp.svg)](https://mcp.popnx.com/en/servers/matteoredaelli-active-directory-ldap-mcp)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Cybersecurityi

  • More stars than 0% of the other 1106 servers in this category
  • Published to the registry more recently than 97% of the other 1106 servers in this category
  • Basic checks equal to or better than 99% of the other 1106 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Active Directory / LDAP safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

You need to fill in: MSAD_PASSWORD

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed yesterday, and the latest version (0.8.4) reached the registry yesterday.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.

What can I use instead?

In the same category: GitHits, Dependency Management MCP Server, Snyk MCP, TokenSafe, Draugr

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

GitHits

Search public open-source code, documentation, metadata, vulnerabilities, changelogs, and examples.

by githits-comGrowing↓ 3.8K/wk★ 138Updated 10 days ago

Computer or cloud✓ service owner · githits.com

Snyk MCP

Easily find and fix security issues in your applications leveraging Snyk platform capabilities.

by snykWidely used↓ 762.1K/wk★ 61Updated 7 months ago

Runs on your computer✓ service owner · snyk.io

TokenSafe

Your AI agent is smart enough to code all day. Local firewall & zero-loss runtime.

by tokensafe-devWidely used↓ 6.8K/wk★ 46Updated today

Computer or cloud✓ service owner · tokensafe.dev

Draugr

Security scanning for AI agents: SAST, SCA, secrets, IaC, DAST, ranked by real risk.

by draugr-devEarly★ 30Updated 2 days ago

Runs on your computer✓ service owner · draugr.dev
Compared with similar ones
This one
Active Directory / LDAP
GitHitsDependency Management MCP ServerSnyk MCPTokenSafeDraugr
Runs whereInstalls on your computerCloud or install on your computerRuns in the cloud, nothing to installInstalls on your computerCloud or install on your computerInstalls on your computer
Needs a keyYesNoNoNoNoNo
Add with + in ClaudeNoNoNoNoNoNo
Basic checks3/35/53/43/35/53/3
LicenseGPL-3.0Apache-2.0–Apache-2.0MITApache-2.0
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

mcpAD

A FastMCP server that exposes the msad Active Directory / LDAP library as MCP tools.

Built with Python 3.14 and uv. It reuses the typed, public msad API (search users/groups, memberships, account status, read-only security audits). All tools are read-only by default; optional group-membership write tools are disabled unless MCPAD_ALLOW_WRITE is enabled (see Write tools).

Tools

ToolDescription
find_usersFind users by name/surname/mail/sam/department/city/state/country (ANDed, * wildcards)
get_userGet a single user (exact match)
find_groupsFind groups (* wildcards)
get_groupGet a single group (exact match)
find_computersFind computers by name/dns/os (* wildcards); optionally exclude_domain_controllers
get_computerGet a single computer (sAMAccountName/cn/dNSHostName)
find_contactsFind AD contact objects by cn/mail/displayName (* wildcards)
find_ousFind organizational units by name (* wildcards)
get_ouGet a single OU by its ou name or full DN (exact match)
get_ou_contentsList objects under an OU (optionally filtered by object_class)
find_empty_ousOrganizational units with no nested sub-OU (hygiene/audit)
find_inactive_usersFind users whose last logon is older than days (default 90)
find_stale_computersFind computers whose last logon is older than days (default 90)
disabled_usersList disabled user accounts (audit; counterpart of is_disabled)
locked_usersList locked-out user accounts (audit; counterpart of is_locked)
never_expires_passwordList users whose password never expires (audit)
never_expiring_accountsList users whose ACCOUNT (not password) never expires
expired_accountsList users whose accountExpires date is in the past
password_not_requiredRisk: users with the PASSWD_NOTREQD UAC flag (account may have no password)
kerberos_preauth_not_requiredRisk: users not requiring Kerberos pre-auth (AS-REP roasting exposure)
not_delegatedRisk: accounts flagged "sensitive and cannot be delegated"
find_service_accountsRisk: users with a Service Principal Name set (Kerberoasting exposure)
find_admin_count_accountsUsers with adminCount=1 (current or stale protected-admin marker)
find_must_change_passwordEnabled users who must change their password at next logon (pwdLastSet=0)
find_users_without_emailData-quality check: users with no mail attribute set
find_almost_locked_outEnabled users close to the lockout threshold (badPwdCount)
find_credentials_in_descriptionRisk: users whose description may contain a plaintext credential
find_shadow_credentialsRisk: users/computers with a msDS-KeyCredentialLink (Shadow Credentials)
find_obsolete_os_computersComputers running a commonly-cited end-of-life Windows version
audit_admin_accountsMembers of well-known privileged groups (admin-account audit)
list_fsmo_rolesOwners of the five FSMO roles (schema, domain-naming, PDC, RID, infrastructure)
list_trustsDomain trust relationships (trustedDomain objects)
list_sitesActive Directory sites (from the Configuration naming context)
list_domain_controllersDomain controllers (computer accounts flagged SERVER_TRUST_ACCOUNT)
summarize_computer_osCount of computer accounts grouped by operating system
list_empty_groupsGroups with no direct members (hygiene/audit)
find_security_groupsList security-enabled groups, optionally by scope (global/domain_local/universal)
find_distribution_groupsList distribution groups (complement of find_security_groups)
find_admin_count_groupsGroups with adminCount=1 (current or stale protected-group marker)
list_gposGroup Policy Objects (groupPolicyContainer)
get_gpoA single GPO by its cn (GUID) or displayName
list_fine_grained_password_policiesFine-grained password policies (PSOs)
find_recently_modifiedObjects whose whenChanged is within the last days days, optionally by object_class
find_recently_createdObjects whose whenCreated is within the last days days, optionally by object_class
get_domain_infoDomain object: security-relevant settings and metadata (audit)
get_password_policyDefault domain password policy (audit)
get_password_policy_violationsUsers whose password violates the policy (audit)
get_privileged_groupsWell-known privileged groups with member counts (audit)
get_by_dnFetch any entry directly by its DN (resolve manager / managedBy)
get_dnResolve a sAMAccountName (or DN) to a distinguished name
search_ldapRun a raw, read-only LDAP search with a custom filter (power-user escape hatch)
group_membersList group members (direct or nested)
user_groupsList a user's groups (nested by default)
is_memberIs a user a (nested) member of a group?
is_disabledIs an account disabled?
is_lockedIs an account locked?
test_connectionTest AD connectivity and bind (returns ok/target/auth/error)
whoamiIdentity bound as (RFC 4532 "Who Am I?"); works with Kerberos too
healthServer health check (server name, msad version, connectivity)

The find_users, find_groups, find_computers and find_ous tools accept an optional base (a DN, e.g. an OU) to restrict the search to that subtree instead of the whole domain.

Tool annotations

Every tool advertises standard MCP behavior hints so a client can reason about its risk without parsing the name or docstring. All the tools above are read-only (readOnlyHint: true); the optional write tools (see below) are marked destructiveHint: true (and readOnlyHint: false).

Returned attributes

By default get_user / find_users return a useful attribute set: identity fields plus manager — the distinguished name (DN) of the user's manager, e.g. CN=Anna Bianchi,OU=Staff,DC=group,DC=example,DC=com — as well as memberOf (direct group DNs), userAccountControl, accountExpires, lastLogonTimestamp and whenCreated. Group lookups include managedBy (the DN of the group's owner), member, groupType and whenCreated.

To expand a manager (or any DN-valued field) into a full record, call get_by_dn with that DN. This is a direct, efficient lookup (the DN is used as the search base), so an agent can do: get_user("mrossi") → read manager → get_by_dn(" ").

Decoded attributes

By default the server also adds decoded companion keys next to the raw attributes, so a client doesn't have to interpret AD's opaque numbers and binary blobs:

  • userAccountControl_decoded — a flag list plus booleans (disabled, locked, password_never_expires, ...);
  • groupType_decoded — scope (global / domain_local / universal) and security vs. distribution;
  • objectSid_decoded / objectGUID_decoded — canonical S-1-5-... / GUID strings;
  • _iso — an ISO-8601 timestamp for FILETIME attributes (accountExpires, lastLogonTimestamp, pwdLastSet, lockoutTime, ...), omitted for the "never"/unset sentinels.

The raw attributes are always preserved. Decoding is on by default; set MCPAD_DECODE_ATTRS to a falsy value (0, false, no, off) to return raw attributes only.

Write tools

The tools above are all read-only. Two optional write tools modify AD group membership and are therefore disabled by default. They are registered only when the MCPAD_ALLOW_WRITE environment variable is set to a truthy value (1, true, yes, on):

ToolDescription
add_group_memberAdd a user to a group (both as sAMAccountName or DN)
remove_group_memberRemove a user from a group (both as sAMAccountName or DN)
unlock_accountUnlock a locked-out user account (resets lockoutTime to 0)
MCPAD_ALLOW_WRITE=1 uv run mcpad      # write tools registered

uv run mcpad # read-only (default)

The service account used by msad must have the directory permissions to modify the target groups; otherwise the call fails with an MsadError. When writes are disabled the tools are not advertised at all, so an agent cannot invoke them.

Two-phase confirmation

All write tools are two-phase. The first call (confirm=false, the default) makes no change and returns a preview:

{ "status": "confirmation_required", "ok": false, "group": "Sales", "user": "jdoe",

"message": "Would add user 'jdoe' to group 'Sales'. Re-call with confirm=true ..." }

Call again with confirm=true — only after explicit human approval — to apply the change. An agent must never set confirm=true on its own.

Safety guard-rails

Even with writes enabled, membership changes that touch sensitive objects are refused (returned as status: "error"), regardless of confirm:

  • Protected accounts — administrator, admin, krbtgt, guest, system, plus any name matching a service/machine pattern (*$ machine accounts, svc_*, service_*, sa_*, adm_*, sys_*).
  • Protected groups — Domain Admins, Enterprise Admins, Schema Admins, Administrators, the operator groups, Group Policy Creator Owners, DnsAdmins, and Domain Users (critical system group).

Matching is case-insensitive and works whether you pass a sAMAccountName or a full DN. Extend or tune via environment variables:

VariableEffect
MCPAD_PROTECTED_ACCOUNTSComma-separated extra account names to protect
MCPAD_PROTECTED_GROUPSComma-separated extra group names to protect
MCPAD_DISABLE_GUARDRAILSSet truthy to turn the checks off (not recommended)

Audit logging

Set MCPAD_AUDIT_LOG to a file path to record every tool call (read-only and write alike) as one JSON object per line (JSON-lines). Logging is off by default.

MCPAD_AUDIT_LOG=/var/log/mcpad/audit.log uv run mcpad

Each entry carries the UTC timestamp, the tool name, the (redacted) arguments, the status, the business outcome, the duration, and — on failure — the error:

{"ts": "2026-10-18T20:09:34.029995+00:00", "tool": "add_group_member",

"params": {"group": "Sales", "user": "jdoe", "confirm": true}, "status": "ok", "outcome": "applied", "duration_ms": 12.4}

Notes:

  • Sensitive argument values (password, new_password, old_password, token, ...) are replaced with ***REDACTED***.
  • status records only whether the Python call returned (ok) or raised (error). The `outcome` field records what actually happened:
  • completed — a read-only tool returned normally (the common case);
  • preview — a two-phase write returned its confirmation preview and changed nothing (confirm=false);
  • blocked — a safety guard-rail refused the write;
  • applied — a write was confirmed and executed;
  • failed — the call raised (paired with status: "error").
  • The parent directory is created if needed; if the path cannot be opened the server logs a warning and continues without audit logging (tool calls are never blocked by an unwritable log).

Result limits

Every tool's limit argument is clamped to a hard ceiling so a single call can't pull an unbounded number of rows from a domain controller. The default ceiling is 1000; a limit above it — or limit=0, which the underlying msad library treats as "no limit" — is rewritten to the ceiling. A limit below the ceiling is used as-is.

MCPAD_MAX_LIMIT=500 uv run mcpad      # lower the ceiling to 500

MCPAD_MAX_LIMIT must be a

Only the beginning is shown; read the rest in the repo