home / mcp / skills mcp ad mcp server
Provides enterprise AD management via MCP with 45 tools, multi-client support, and secure HTTP and local runtime options.
Configuration
View docs{
"mcpServers": {
"devskillsit-skills-mcp-ad": {
"url": "http://localhost:8850/mcp",
"headers": {
"AUTH_TOKEN": "your_token_here"
}
}
}
}Skills MCP AD is a production-ready MCP server that enables AI assistants to securely manage Active Directory across multiple clients from a single codebase. It provides a rich toolset for AD lifecycle operations, enterprise-grade security with Bearer Token authentication, and scalable multi-client deployment suitable for MSPs and IT teams.
You connect an MCP client to Skill MCP AD using HTTP transport or by running the MCP server locally. Use the HTTP method when you want a remote or centralized MCP endpoint; use the local method when you prefer an in-process setup for testing or tight integration with other Python components.
From your MCP client, authenticate requests with a Bearer token that your server validates. You can perform a wide range of AD operations, such as managing users, groups, OUs, computers, and GPOs, as well as performing searches, reports, and security audits. Start by ensuring your client points to the MCP endpoint http://localhost:8850/mcp for HTTP usage, and supply your token in the Authorization header.
Prerequisites: ensure you have Python 3.11+ installed, or Docker available on your system. You also need LDAP access to Active Directory with a service account that has appropriate permissions.
Installation (Docker recommended) follows a simple flow: clone the project, configure your AD connection, and start the services with Docker Compose.
Installation (Python) follows an equivalent flow using a virtual environment and the Python package stack, then running the HTTP server entry point.
# Docker installation flow
# 1. Create a working directory and pull the containerized deployment
# 2. Configure your Active Directory connection in ad-config/ad-config.json
# 3. Start the services
# 4. Verify health via HTTP health endpoint
# Python installation flow
# 1. Create a virtual environment
python -m venv .venv
source .venv/bin/activate # Linux/Mac
# .\venv\Scripts\activate # Windows
# 2. Install dependencies
pip install -r requirements.txt
# 3. Configure Active Directory in ad-config/ad-config.json
# 4. Run the HTTP server
python -m src.server_httpCreate the AD configuration file at ad-config/ad-config.json with your LDAP server details, base DN, and a secure bearer token used for MCP authentication.
{
"ldap_server": "ldap://dc.yourdomain.com",
"ldap_port": 389,
"use_ssl": false,
"base_dn": "DC=yourdomain,DC=com",
"bind_user": "CN=MCPService,CN=Users,DC=yourdomain,DC=com",
"bind_password": "YourSecurePassword123!",
"default_user_ou": "OU=Users,DC=yourdomain,DC=com",
"default_group_ou": "OU=Groups,DC=yourdomain,DC=com",
"default_computer_ou": "OU=Computers,DC=yourdomain,DC=com",
"auth_token": "your_secure_bearer_token_here"
}All requests require a Bearer token for authentication. Rotate credentials regularly, use LDAPS in production, and apply the principle of least privilege to the service account. Enable audit logging to keep a trace of operations.
For multi-client deployments, each client operates in isolation with dedicated credentials and tokens. You can run multiple MCP instances on separate ports for different AD domains.
Verify the server is healthy and connected to LDAP by querying the health endpoint with your token.
curl http://localhost:8850/health \
-H "Authorization: Bearer your_token_here"If you encounter issues, check connectivity to the LDAP server, verify the MCP authentication token, and review logs for errors related to LDAP binding or permissions. Use the provided health and logs endpoints to pinpoint problems.
You can add new client domains using the included script and manage each client with isolated configurations and tokens. Run the client creation script with the appropriate slug, name, and port to provision a new MCP instance for a new AD domain.
# Example: add ACME Corporation on port 8853
./scripts/install-client.sh acme-corp "ACME Corporation" 8853List domain users with optional filtering
Retrieve detailed information for a specific user
Search users by attributes
Return information about the authenticated user
Create a new user in the directory
Update attributes for an existing user
Remove a user from the directory
Enable a disabled user account
Disable an active user account
Unlock a locked user account
Add a user to one or more groups
Remove a user from one or more groups
List a user's group memberships
Authenticate user credentials against AD
Reset a user's password
Set a new password for a user
Require password change on next login
Check password expiration date for a user
List domain groups
Retrieve detailed information for a group
Search groups by attributes
Create a new security or distribution group
Update group attributes
Delete a group from AD
Add a member to a group
Remove a member from a group
List members of a group (recursive)
Analyze nested group structures
List organizational units with hierarchy
Get details of an OU
Create a new OU
Update OU attributes
Delete an OU
Move an object between OUs
List contents of an OU
Get OU hierarchy tree
List computer accounts
Get computer details
Create a computer object
Remove a computer account
Disable a computer account
Find inactive computers (90+ days)
Reset computer account password
List GPOs in the domain
Get details of a GPO
Get information about GPO links