MCP server for Active Directory user management with PowerShell backend
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"mcp-active-directory-server": {
"command": "<see-readme>",
"args": []
}
}
}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 management with Python server and PowerShell backend
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in devops / security
MCP server for using the GitLab API
An evil MCP server used for redteam testing
Yunxiao MCP Server provides AI assistants with the ability to interact with the Yunxiao platform. It provides a set of tools that interact with Yunxiao's API, allowing AI assistants to manage Codeup repository, Project, Pipeline, Packages etc.
Enhanced MCP server for GitLab: group projects listing and activity tracking
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)