Skip to main 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

Using the Configuration Manager (Recommended)

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:

Name Description
AD_SERVER The address of the Active Directory server.
AD_USER Username for authentication.
AD_PASSWORD Password for authentication.
BASE_DN Base DN for LDAP queries.
AD_WRITE_ENABLED Enable 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.

Metadata

Release files for koppla 0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for koppla 0.16
File Size Uploaded
koppla-0.16.tar.gz 15.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for koppla 0.16
File Interpreter ABI Platform
koppla-0.16-py3-none-any.whl Python 3 none any Details

Total release size: 30.7 kB

Release files / koppla-0.16.tar.gz

Download URL koppla-0.16.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c149687ab68185ccf5b30187ae908a347e03c757c13ba80b36f04d905b735d13
BLAKE2b-256 checksum
How to use checksums
b084e193d43fb83cbf0b0b92efbbb104473c03e903ce84d1e390335c4af7db68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / koppla-0.16-py3-none-any.whl

Download URL koppla-0.16-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
379c6a252deb788b4820999bea4786cb42bae506ed5bc16298a1a01a8a7b237b
BLAKE2b-256 checksum
How to use checksums
ad957f0ede72d390483476402bd2e9f0a7817bb452ae1cd0d69530bf1a38794a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.16 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page