home / mcp / active directory mcp server

Active Directory MCP Server

This read-only MCP Server allows you to connect to Active Directory data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out the first managed MCP platform: CData Connect AI (https://www.cdata.com/ai/).

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "cdatasoftware-active-directory-mcp-server-by-cdata": {
      "command": "java",
      "args": [
        "-jar",
        "CDataMCP-jar-with-dependencies.jar",
        "/PATH/TO/active-directory.prp"
      ]
    }
  }
}

This Active Directory MCP Server provides a read‑only interface to live Active Directory data via MCP, enabling large language models to query and reason over directory information without SQL. It wraps the CData JDBC Driver so you can request up‑to‑date directory details in natural language and get structured results.

How to use

You will run the MCP server locally and connect your MCP client (such as Claude Desktop) to it. The server exposes read‑only access to Active Directory data and can answer natural language questions like who an user is, which accounts exist in a group, or which attributes are available for a given container. Use the client’s built‑in MCP tools to discover tables, view columns, and run read queries against AD data.

To use it, start the server with your prepared configuration, then point your MCP client to the local process. The client will automatically use the available tools to read data and return results in a readable format. If you want to adjust which data you can access, you customize the set of tables in the configuration, or keep all data accessible by leaving the Tables field blank.

How to install

Prerequisites you need on your machine before installing: the Java Development Kit (JDK) and Maven for building Java projects.

Step 1: Clone the MCP server repository and navigate into it.

git clone https://github.com/cdatasoftware/active-directory-mcp-server-by-cdata.git
cd active-directory-mCP-server-by-cdata

Step 2: Build the server

Build the server to produce the runnable JAR that powers the MCP server.

mvn clean install

Step 3: Prepare the CData JDBC Driver for Active Directory

Download and install the CData JDBC Driver for Active Directory from the vendor, then license it so you can create a live connection string.

# Download driver from vendor site first, then license

Step 4: Configure the JDBC connection

Run the Connection String utility to configure your Active Directory connection. If OAuth is used, complete the browser authentication flow when prompted. When successful, copy the produced connection string for use in the MCP configuration.

java -jar cdata.jdbc.activedirectory.jar

Step 5: Create the MCP property file

Create a .prp file with the JDBC configuration you obtained. This file defines how the MCP server connects to Active Directory.

Prefix=activedirectory
ServerName=CDataActiveDirectory
ServerVersion=1.0
DriverPath=PATH\\TO\\cdata.jdbc.activedirectory.jar
DriverClass=cdata.jdbc.activedirectory.ActiveDirectoryDriver
JdbcUrl=jdbc:activedirectory:InitiateOAuth=GETANDREFRESH;
Tables=

Step 6: Run the MCP server locally

Start the MCP server process using the prepared .prp file. The server runs as a local process and communicates with clients on the same machine.

java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/active-directory.prp

Step 7: Connect from your MCP client

Configure your MCP client (for example Claude Desktop) to load the new MCP server configuration. Point the client to the local java process and the path to your active-directory.prp file. After saving the client config, restart the client if needed so the MCP server appears in the list of available servers.

Additional setup notes

The server is read‑only by design, so create, update, or delete operations are not exposed. If you need write access, explore the other MCP server variant that includes full read/write capabilities.

If you need to switch data sources or drivers, update the DriverPath and JdbcUrl in the .prp file and restart the server to apply changes.

Troubleshooting

If the MCP server does not appear in your MCP client, fully quit the client and relaunch it, then reopen the server configuration. Ensure the Java process is running and the .prp path is correct.

Double‑check that the JDBC driver is licensed and that the connection string is valid. Reopen the Connection String utility and test the connection; copy the resulting string back into your .prp file if needed.

If you still have issues, contact the CData Support Team for guidance or reach out to the CData Community for community‑driven help.

License

This MCP server is licensed under the MIT License. You may use, modify, and distribute it in accordance with the MIT terms.

All Supported Sources

Active Directory is among the supported data sources exposed through MCP, allowing you to query directory details in a familiar, relational style.

Available tools

activedir_get_tables

Retrieves a list of accessible data tables (logical groupings) from the Active Directory data source. Output is a CSV of table names, with the first line as headers.

activedir_get_columns

Retrieves a list of columns for a specified table. Output is a CSV with column headers and available attributes.

activedir_run_query

Executes a SQL SELECT query against the AD data source and returns matching rows.