GitHits
Search public open-source code, documentation, metadata, vulnerabilities, changelogs, and examples.
Active Directory / LDAP MCP server: find users, groups, memberships; read-only security audits.
Lists are ordered by a usage score (out of 100) built from these parts
| Popularity | 0/80 | GitHub stars or weekly downloads: the larger counts 60, the smaller 20 |
|---|---|---|
| Freshness | 12/12 | Full marks for a release or code change within 30 days |
| Still answering | 0/8 | The cloud endpoint answered at the last check |
| Usage score | 12/100 |
Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)
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
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.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: 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
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
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
SettingsDeveloperEdit Config
{
"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
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
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 itMSAD_HOST Domain controller host (alternative to ~/.msad.toml)MSAD_BASE LDAP base DN, e.g. dc=example,dc=comMSAD_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
A · Use an app that can connect Active Directory / LDAP
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)
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.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: 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
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
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
Mac: press Command+Space and type Terminal · Windows: open PowerShell
claude mcp add --scope user active-directory-ldap --env MSAD_PASSWORD=your-value -- uvx mcpadReplace “your-value” with your key before pressing Enter
Paste the key only into the app’s field, never into a chat or to anyone
You should see Active Directory / LDAP listed as connected
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
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 itMSAD_HOST Domain controller host (alternative to ~/.msad.toml)MSAD_BASE LDAP base DN, e.g. dc=example,dc=comMSAD_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)
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.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: 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
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
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
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
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
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 itMSAD_HOST Domain controller host (alternative to ~/.msad.toml)MSAD_BASE LDAP base DN, e.g. dc=example,dc=comMSAD_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)
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.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: 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
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
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
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
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
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 itMSAD_HOST Domain controller host (alternative to ~/.msad.toml)MSAD_BASE LDAP base DN, e.g. dc=example,dc=comMSAD_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.
JSON settings are under “For developers” below
Claude Code
claude mcp add --scope user active-directory-ldap --env MSAD_PASSWORD=your-value -- uvx mcpadClaude 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"
}
}
}
}MSAD_DOMAIN envMSAD_HOST envMSAD_BASE envMSAD_USER envMSAD_PASSWORD secret required envMCPAD_ALLOW_WRITE envDescriptions are as written by the maker.
These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
pypi: mcpadBased 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
Runs on your computer; the tool list appears in your AI app after you install it.
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
The registry name was verified with the GitHub account matteoredaelli, which owns the repo
Code last changed yesterday
Uses GPL-3.0
This one runs on your computer; there is no internet endpoint
Runs on your computer and uses local settings instead
Runs on your computer; we can only read tool lists from internet endpoints
No entries on OSV.dev for mcpad@0.8.4
Checks only this package version, not every dependency · checked Nov 18, 2026
If you made this, paste this code into your README. The badge links back to this page.
[](https://mcp.popnx.com/en/servers/matteoredaelli-active-directory-ldap-mcp)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.
No reviews yet
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
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.
You need to fill in: MSAD_PASSWORD
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).
The GitHub repo last changed yesterday, and the latest version (0.8.4) reached the registry yesterday.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.
In the same category: GitHits, Dependency Management MCP Server, Snyk MCP, TokenSafe, Draugr
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
Search public open-source code, documentation, metadata, vulnerabilities, changelogs, and examples.
Sonatype component intelligence: versions, security analysis, and Trust Score recommendations
Easily find and fix security issues in your applications leveraging Snyk platform capabilities.
Security scanning for AI agents: SAST, SCA, secrets, IaC, DAST, ranked by real risk.
| This one Active Directory / LDAP | GitHits | Dependency Management MCP Server | Snyk MCP | TokenSafe | Draugr | |
|---|---|---|---|---|---|---|
| Runs where | Installs on your computer | Cloud or install on your computer | Runs in the cloud, nothing to install | Installs on your computer | Cloud or install on your computer | Installs on your computer |
| Needs a key | Yes | No | No | No | No | No |
| Add with + in Claude | No | No | No | No | No | No |
| Basic checks | 3/3 | 5/5 | 3/4 | 3/3 | 5/5 | 3/3 |
| License | GPL-3.0 | Apache-2.0 | – | Apache-2.0 | MIT | Apache-2.0 |
| Price | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry |
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.
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).
| Tool | Description |
|---|---|
find_users | Find users by name/surname/mail/sam/department/city/state/country (ANDed, * wildcards) |
get_user | Get a single user (exact match) |
find_groups | Find groups (* wildcards) |
get_group | Get a single group (exact match) |
find_computers | Find computers by name/dns/os (* wildcards); optionally exclude_domain_controllers |
get_computer | Get a single computer (sAMAccountName/cn/dNSHostName) |
find_contacts | Find AD contact objects by cn/mail/displayName (* wildcards) |
find_ous | Find organizational units by name (* wildcards) |
get_ou | Get a single OU by its ou name or full DN (exact match) |
get_ou_contents | List objects under an OU (optionally filtered by object_class) |
find_empty_ous | Organizational units with no nested sub-OU (hygiene/audit) |
find_inactive_users | Find users whose last logon is older than days (default 90) |
find_stale_computers | Find computers whose last logon is older than days (default 90) |
disabled_users | List disabled user accounts (audit; counterpart of is_disabled) |
locked_users | List locked-out user accounts (audit; counterpart of is_locked) |
never_expires_password | List users whose password never expires (audit) |
never_expiring_accounts | List users whose ACCOUNT (not password) never expires |
expired_accounts | List users whose accountExpires date is in the past |
password_not_required | Risk: users with the PASSWD_NOTREQD UAC flag (account may have no password) |
kerberos_preauth_not_required | Risk: users not requiring Kerberos pre-auth (AS-REP roasting exposure) |
not_delegated | Risk: accounts flagged "sensitive and cannot be delegated" |
find_service_accounts | Risk: users with a Service Principal Name set (Kerberoasting exposure) |
find_admin_count_accounts | Users with adminCount=1 (current or stale protected-admin marker) |
find_must_change_password | Enabled users who must change their password at next logon (pwdLastSet=0) |
find_users_without_email | Data-quality check: users with no mail attribute set |
find_almost_locked_out | Enabled users close to the lockout threshold (badPwdCount) |
find_credentials_in_description | Risk: users whose description may contain a plaintext credential |
find_shadow_credentials | Risk: users/computers with a msDS-KeyCredentialLink (Shadow Credentials) |
find_obsolete_os_computers | Computers running a commonly-cited end-of-life Windows version |
audit_admin_accounts | Members of well-known privileged groups (admin-account audit) |
list_fsmo_roles | Owners of the five FSMO roles (schema, domain-naming, PDC, RID, infrastructure) |
list_trusts | Domain trust relationships (trustedDomain objects) |
list_sites | Active Directory sites (from the Configuration naming context) |
list_domain_controllers | Domain controllers (computer accounts flagged SERVER_TRUST_ACCOUNT) |
summarize_computer_os | Count of computer accounts grouped by operating system |
list_empty_groups | Groups with no direct members (hygiene/audit) |
find_security_groups | List security-enabled groups, optionally by scope (global/domain_local/universal) |
find_distribution_groups | List distribution groups (complement of find_security_groups) |
find_admin_count_groups | Groups with adminCount=1 (current or stale protected-group marker) |
list_gpos | Group Policy Objects (groupPolicyContainer) |
get_gpo | A single GPO by its cn (GUID) or displayName |
list_fine_grained_password_policies | Fine-grained password policies (PSOs) |
find_recently_modified | Objects whose whenChanged is within the last days days, optionally by object_class |
find_recently_created | Objects whose whenCreated is within the last days days, optionally by object_class |
get_domain_info | Domain object: security-relevant settings and metadata (audit) |
get_password_policy | Default domain password policy (audit) |
get_password_policy_violations | Users whose password violates the policy (audit) |
get_privileged_groups | Well-known privileged groups with member counts (audit) |
get_by_dn | Fetch any entry directly by its DN (resolve manager / managedBy) |
get_dn | Resolve a sAMAccountName (or DN) to a distinguished name |
search_ldap | Run a raw, read-only LDAP search with a custom filter (power-user escape hatch) |
group_members | List group members (direct or nested) |
user_groups | List a user's groups (nested by default) |
is_member | Is a user a (nested) member of a group? |
is_disabled | Is an account disabled? |
is_locked | Is an account locked? |
test_connection | Test AD connectivity and bind (returns ok/target/auth/error) |
whoami | Identity bound as (RFC 4532 "Who Am I?"); works with Kerberos too |
health | Server 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.
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).
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(" ").
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.
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):
| Tool | Description |
|---|---|
add_group_member | Add a user to a group (both as sAMAccountName or DN) |
remove_group_member | Remove a user from a group (both as sAMAccountName or DN) |
unlock_account | Unlock 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.
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.
Even with writes enabled, membership changes that touch sensitive objects are refused (returned as status: "error"), regardless of confirm:
administrator, admin, krbtgt, guest, system, plus any name matching a service/machine pattern (*$ machine accounts, svc_*, service_*, sa_*, adm_*, sys_*).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:
| Variable | Effect |
|---|---|
MCPAD_PROTECTED_ACCOUNTS | Comma-separated extra account names to protect |
MCPAD_PROTECTED_GROUPS | Comma-separated extra group names to protect |
MCPAD_DISABLE_GUARDRAILS | Set truthy to turn the checks off (not recommended) |
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:
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").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