mcpAD
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HOST | No | Host/interface to bind when using an HTTP or SSE transport. Default is commonly 127.0.0.1 for local setups. | |
| MCP_PORT | No | Port to listen on when using an HTTP or SSE transport. Default is typically 8000 in the provided Makefile examples. | |
| MSAD_DOMAIN | No | Default domain when a tool call omits `domain`. Overrides the `[defaults] domain` setting in the msad config file. | |
| MCP_TRANSPORT | No | MCP transport to use. Can be 'stdio', 'streamable-http', or 'sse'. Defaults to 'stdio'. | stdio |
| MSAD_CONFIG_FILE | No | Path to an alternative TOML configuration file. Defaults to ~/.msad.toml if not set. | |
| KRB5_CLIENT_KTNAME | No | Path to a Kerberos keytab file, used when running as an unattended service instead of relying on a kinit ticket cache. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| test_connectionA | Test connectivity and bind to the AD server without raising. Returns a status dict with |
| whoamiA | Report the identity the connection is bound as. Uses the RFC 4532 "Who Am I?" extended operation: the directory server
reports the identity it actually authenticated, working with Kerberos/
SASL-GSSAPI as well as simple user/password bind. Returns
|
| healthB | Server health check: reports server name, mcpAD/msad version and AD connectivity. |
| find_usersB | Find AD users by field. Criteria are ANDed; values may contain * wildcards.
|
| get_userA | Get a single AD user by sAMAccountName, UPN, mail or cn (exact match). |
| find_groupsB | Find AD groups by cn/name/sAMAccountName/displayName (supports * wildcards). Pass |
| get_groupA | Get a single AD group by sAMAccountName or cn (exact match). |
| get_by_dnA | Fetch any AD entry directly by its distinguished name (DN). Use this to resolve DN-valued attributes into full records, e.g. the
|
| find_contactsA | Find AD contact objects by cn/mail/displayName (supports * wildcards). Passing no |
| find_computersA | Find AD computers by cn (name), dNSHostName (dns) or operatingSystem (os). Criteria are ANDed; values may contain * wildcards. Set
|
| get_computerA | Get a single AD computer by sAMAccountName, cn or dNSHostName (exact match). |
| find_ousB | Find AD organizational units (OUs) by name (matches Pass |
| get_ouA | Get a single AD organizational unit by its |
| find_empty_ousA | Find organizational units with no nested sub-OU (hygiene/audit). Matches OUs whose |
| get_ou_contentsB | List the objects contained under an OU (given its DN). Optionally restrict to a single |
| find_inactive_usersA | Find users whose last logon is older than Matches |
| find_stale_computersB | Find computers whose last logon is older than Matches |
| get_domain_infoB | Read the domain object: security-relevant settings and metadata (audit). |
| get_password_policyB | Read the default domain password policy (maxPwdAge, minPwdLength, ...). |
| get_password_policy_violationsA | Find users whose password violates the domain policy (audit). Flags enabled users whose password has expired (older than the domain
|
| get_privileged_groupsA | Report on well-known privileged groups (Domain Admins, ...) with counts. Each entry includes the group's attributes plus |
| group_membersB | List members of a group. Set nested=True for recursive membership. |
| user_groupsB | List the groups a user belongs to (nested/recursive by default). |
| is_memberB | Return True if the user is a (nested) member of the group. |
| is_disabledB | Return True if the account is disabled, None if the user is not found. |
| is_lockedB | Return True if the account is locked, None if the user is not found. |
| disabled_usersA | List disabled user accounts (userAccountControl flag 2). Audit counterpart of |
| locked_usersA | List locked-out user accounts (lockoutTime >= 1). Audit counterpart of |
| never_expires_passwordA | List users whose password never expires (userAccountControl flag 65536). A common security-audit check. Pass |
| never_expiring_accountsA | List users whose ACCOUNT (not password) never expires. Matches |
| expired_accountsB | List users whose Pass |
| password_not_requiredA | Risk: list users with the PASSWD_NOTREQD UAC flag (account may have no password). These accounts may have no password at all, letting anyone authenticate as
them and set their own. Pass |
| kerberos_preauth_not_requiredA | Risk: list users not requiring Kerberos pre-authentication. These accounts are vulnerable to offline (AS-REP roasting) password
guessing. Pass |
| not_delegatedA | Risk: list accounts flagged "sensitive and cannot be delegated". Worth auditing when a sensitive privilege was granted without also
excluding the account from delegation (or vice versa). Pass |
| find_service_accountsB | Risk: list users with a Service Principal Name (SPN) set. Any account with an SPN can have a Kerberos service ticket requested for
it by any authenticated user, then cracked offline ("Kerberoasting") if
its password is weak. Pass |
| find_admin_count_accountsB | Find users with adminCount=1 (current or stale protected-admin marker). AD sets adminCount=1 via AdminSDHolder on members of protected groups
(Domain Admins, Enterprise Admins, ...) and does not automatically clear
it once the account is later removed from every such group. Accounts
that still carry adminCount=1 but are no longer privileged keep a
non-inherited, hardened ACL and are a common audit finding. Pass |
| find_must_change_passwordA | Find enabled users who must change their password at next logon. Matches pwdLastSet=0, excluding disabled accounts. Pass |
| find_users_without_emailA | Data-quality check: list users with no Accounts without an email address often can't receive password-expiry
notices, MFA prompts or other automated notifications. Pass |
| get_dnA | Resolve a sAMAccountName (or DN) to a distinguished name (DN). Returns the value unchanged if it already looks like a DN, otherwise looks
it up. Returns None if not found. Handy before |
| audit_admin_accountsA | Audit administrative accounts: members of well-known privileged groups. Builds on |
| list_fsmo_rolesA | Report the owner of each of the five FSMO roles (audit). Returns one entry per role ( |
| list_trustsA | List the domain's trust relationships (audit). Reads |
| list_sitesA | List the Active Directory sites (audit). Reads |
| list_domain_controllersB | List the domain controllers (computer accounts flagged as DCs). Matches the |
| list_empty_groupsA | List groups with no direct members (hygiene/audit). Matches groups whose |
| find_security_groupsA | List security-enabled groups (as opposed to distribution groups). Pass |
| find_distribution_groupsB | List distribution groups (complement of find_security_groups). Pass |
| summarize_computer_osA | Summarize computer accounts grouped by operating system (audit/report). Returns |
| list_gposB | List Group Policy Objects (audit). Reads |
| get_gpoA | Get a single Group Policy Object by its The GUID may be given with or without braces. Returns None if not found. |
| list_fine_grained_password_policiesA | List fine-grained password policies (PSOs) (audit). Reads |
| find_recently_modifiedA | Find objects whose whenChanged is within the last Useful for a "what changed recently in AD" audit. Pass |
| find_recently_createdA | Find objects whose whenCreated is within the last Pass |
| search_ldapA | Run a raw LDAP search with a custom filter (read-only, power-user escape hatch). Use this when the typed tools ( |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| security_audit | Guide a read-only security audit of the Active Directory domain. |
| find_inactive | Guide finding and triaging inactive users and stale computers. |
| group_membership_report | Guide a membership report for a specific group. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 54 tools
Most tools target a distinct object class plus action, and adjacent tools (find_users vs get_user vs get_by_dn, find_inactive_users vs find_stale_computers, is_disabled vs disabled_users) are explicitly cross-referenced in descriptions. The main soft spot is audit_admin_accounts, which is essentially get_privileged_groups(with_members=True, nested=True) wrapped in another tool, and search_ldap overlaps with the entire typed surface as an escape hatch.
The dominant pattern is verb_noun (find_users, get_group, list_gpos, get_ou_contents), but a large audit subset abandons verbs entirely for bare-noun or predicate phrasing: disabled_users, locked_users, password_not_required, not_delegated, never_expiring_accounts, group_members, user_groups. Predicate-named tools like password_not_required function as list queries, which reads oddly next to list_gpos. Still parseable, but three conventions coexist.
54 tools is far beyond a comfortable set; dozens are narrow single-purpose audit queries (kerberos_preauth_not_required, never_expires_password, find_users_without_email) that could collapse into a parameterized audit or search_ldap filter. The breadth reflects a genuinely large domain (users, groups, computers, OUs, GPOs, trusts, sites, FSMO, password policies), but the surface is too heavy for reliable tool selection.
Read-side coverage is excellent: nearly every AD object class and audit scenario has a dedicated query, plus search_ldap as a fallback. However, the surface is entirely read-only, so an agent that finds a stale or risky account has no path to disable, unlock, reset a password, or modify group membership, which is a notable dead end for an AD server.