MCP server for Active Directory user management with PowerShell backend
{
"mcpServers": {
"mcp-active-directory-server": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MCP server for Active Directory user management with PowerShell backend
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
MIT. View license →
Is it maintained?
Last commit 281 days ago. 14 stars.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
Context cost
14 tools. ~700 tokens (0.3% of 200K).
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
Create-UserNew-ADUser operations to create new Active Directory users
Modify-UserSet-ADUser operations to modify existing Active Directory users
Add-UserToGroupAdd-ADGroupMember to add users to Active Directory groups
Remove-UserFromGroupRemove-ADGroupMember to remove users from Active Directory groups
Get-UserInfoGet-ADUser with all properties to retrieve user information
Test-ADConnectionDomain connectivity test to verify Active Directory connection
Get-DomainInfoGet-ADDomain equivalent to retrieve domain information
Get-ForestInfoGet-ADForest equivalent to retrieve forest information
Get-TrustInfoGet-ADTrust relationships to retrieve trust information
Get-DomainPasswordPolicyGet-ADDefaultDomainPasswordPolicy to retrieve domain password policy
This server is missing a description.If you've used it, help the community.
Add informationHave you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Persistent memory using a knowledge graph
Privacy-first. MCP is the protocol for tool access. We're the virtualization layer for context.
Pre-build reality check. Scans GitHub, HN, npm, PyPI, Product Hunt — returns 0-100 signal.
Monitor browser logs directly from Cursor and other MCP compatible IDEs.
MCP Security Weekly
Get CVE alerts and security updates for Mcp Active Directory Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
MCP server for Active Directory management with Python server and PowerShell backend
Claude Desktop ↔ MCP Protocol ↔ Python Server ↔ PowerShell ↔ Active Directory
The system uses a 3-tier architecture:
1. simple_mcp_server.py - The MCP Protocol Bridge 🌉
Role: Acts as the main orchestrator and protocol translator
What it does:
Protocol Handler : Implements the Model Context Protocol (MCP) JSON-RPC 2.0 specification
Tool Registry: Defines 14 available tools for Claude to use:
Credential Manager: Securely retrieves AD service account credentials from Windows Credential Manager
PowerShell Orchestrator: Executes the PowerShell script with appropriate parameters
Response Formatter: Converts PowerShell JSON output into MCP-compliant responses
Key Functions:
async def handle_request(request) # Handles MCP protocol requests
async def run_powershell_script() # Executes PowerShell operations
async def get_credentials_from_credential_manager() # Security layer
2. ad_operations.ps1 - The Active Directory Workhorse ⚙️
Role: Contains all actual Active Directory operations and business logic
What it does:
Function Categories:
Basic Operations (6):
Create-User # New-ADUser operations
Modify-User # Set-ADUser operations
Add-UserToGroup # Add-ADGroupMember
Remove-UserFromGroup # Remove-ADGroupMember
Get-UserInfo # Get-ADUser with all properties
Test-ADConnection # Domain connectivity test
Enhanced Operations (8):
Get-DomainInfo # Get-ADDomain equivalent
Get-ForestInfo # Get-ADForest equivalent
Get-TrustInfo # Get-ADTrust relationships
Get-DomainPasswordPolicy # Get-ADDefaultDomainPasswordPolicy
Get-ReplicationStatus # AD replication health
Get-AllUserAttributes # Deep user inspection
Get-AllComputerAttributes # Deep computer inspection
Get-SitesAndServices # Sites, links, subnets
3. Security & Configuration Layer 🔐
Credential Management:
Configuration Variables:
$TargetOU = "OU=ManagedUsers,DC=demo,DC=local" # Managed OU
$DomainName = "demo.local" # Domain name
$DefaultPassword = "TempPassword123!" # Initial password (this will be used if no password is supplied)
1. Request Flow (Claude → AD)
Claude Desktop
↓ (User request: "Create user John Smith")
Python MCP Server
↓ (Validates request, formats parameters)
↓ (Retrieves credentials from Credential Manager)
↓ (Calls PowerShell with JSON data)
PowerShell Script
↓ (Parses JSON, authenticates to AD)
↓ (Executes New-ADUser cmdlet)
Active Directory
2. Response Flow (AD → Claude)
Active Directory
↓ (Returns AD object/status)
PowerShell Script
↓ (Formats as JSON with success/error status)
Python MCP Server
↓ (Receives JS
... [View full README on GitHub](https://github.com/rosingul/mcp-active-directory-server#readme)