Sponsored by Deepsite.site

Koppla Active Directory

Created By
ruudmens9 months ago
Content

Koppla

Koppla is a model-context-protocol server for Active Directory that enables you to manage users, groups, and computer objects using natural language.

Koppla Demo

With Koppla, you can seamlessly query and manage your Active Directory environment using Claude Desktop or other MCP capable AI agents.

🔹 What Can Koppla Do?

Koppla allows you to execute complex Active Directory queries and updates effortlessly. Examples:

  • "Find all inactive users who haven't logged in for 90 days."
  • "Add John Doe to the 'IT Admins' security group."
  • "List all locked-out user accounts."
  • "Find all users in the Sales department."
  • "Which groups does Jane Smith belong to?"
  • "Show me empty groups."
  • "Find users in group A but not in group B."

🚀 Getting Started

1️⃣ Prerequisites

  • Python 3.7 or higher
  • Active Directory environment
  • Claude Desktop application (for integration with Claude)

2️⃣ Installation

Koppla requires Python and can be installed using:

pip install koppla

3️⃣ Configuration

Koppla includes a secure configuration manager that handles encryption of sensitive credentials:

koppla-config configure

This interactive tool will:

  1. Prompt for your Active Directory connection details
  2. Securely encrypt your password using Fernet symmetric encryption
  3. Create or update the Claude Desktop configuration file with Koppla server settings
  4. Automatically create a backup of your existing Claude Desktop configuration
  5. Test the connection to verify your credentials

You can also:

  • Display current configuration: koppla-config show
  • Test your AD connection: koppla-config test

Manual Configuration

Koppla uses environment variables for configuration:

NameDescription
AD_SERVERThe address of the Active Directory server.
AD_USERUsername for authentication.
AD_PASSWORDPassword for authentication.
BASE_DNBase DN for LDAP queries.
AD_WRITE_ENABLEDEnable or disable write operations (true/false).

To manually configure Koppla with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:

{
  "mcpServers": {
    "Koppla-Active-Directory": {
        "command": "python",
        "args": ["-m", "koppla.server"],
        "env": {
            "AD_SERVER": "ldap://<domain-controller-name>:389",
            "AD_USER": "<domain\\username>",
            "AD_PASSWORD": "<password>",
            "BASE_DN": "DC=lazyadmin,DC=nl",
            "AD_WRITE_ENABLED": "false"
        }
    }
  }
}

🔒 Security Features

Password Encryption

  • Koppla uses Fernet symmetric encryption (from the cryptography package) to secure your Active Directory password
  • The encryption key is stored separately from the configuration in a key file with restricted permissions
  • When using the configuration manager, passwords are never stored in plain text
  • Encrypted passwords appear as ENCRYPTED:xxxx... in the configuration file

Backup System

  • Before any configuration changes, Koppla automatically creates timestamped backups of your Claude Desktop configuration
  • Backups are stored alongside your configuration with format: claude_desktop_config.json.backup_YYYYMMDD_HHMMSS

Write Protection

  • By default, all write operations (adding/removing users from groups, updating user attributes) are disabled
  • To enable write operations, set AD_WRITE_ENABLED to "true"
  • Critical accounts and groups have additional protection regardless of write settings

Supported Write Operations

Koppla supports the following write operations when AD_WRITE_ENABLED is set to "true":

  1. Update User Attributes

    • Modify standard user attributes like description, title, department, etc.
    • Protected fields (passwords, security identifiers, account control) cannot be modified
    • Protected accounts (administrators, service accounts, etc.) cannot be modified
  2. Add User to Group

    • Add standard users to security or distribution groups
    • Cannot add users to protected administrative groups
    • Protected accounts cannot be added to any groups
  3. Remove User from Group

    • Remove users from most security or distribution groups
    • Cannot remove users from critical system groups
    • Protected accounts cannot be removed from any groups

All write operations require explicit confirmation before execution.

Server Config

{
  "mcpServers": {
    "Koppla-Active-Directory": {
      "command": "python",
      "args": [
        "-m",
        "koppla.server"
      ],
      "env": {
        "AD_SERVER": "ldap://domain.com:389",
        "AD_USER": "lazyadmin\\srv-account",
        "AD_PASSWORD": "ENCRYPTED:PASSWORD",
        "BASE_DN": "DC=lazyadmin,DC=nl",
        "AD_WRITE_ENABLED": "false"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Tavily Mcp
Amap Maps高德地图官方 MCP Server
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
DeepChatYour AI Partner on Desktop
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Serper MCP ServerA Serper MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Playwright McpPlaywright MCP server