active-directory -by-cdata
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/).
claude mcp add --transport stdio cdatasoftware-active-directory-mcp-server-by-cdata java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/active-directory.prp
How to use
This MCP server provides a read-only interface to Active Directory data via the CData JDBC Driver, exposing the directory data as relational tables and simple MCP tools. After starting the server, clients (such as Claude Desktop or other MCP-enabled frontends) can query live Active Directory information without writing SQL directly. The server exposes a set of tools that map to typical data actions: retrieving the available tables, listing columns for a given table, and running SQL SELECT queries against the data source. The tools follow a conventional naming pattern based on your configured server name (e.g., active_directory_get_tables, active_directory_get_columns, active_directory_run_query). You can drive these tools through JSON-RPC payloads or via your MCP client’s tool invocation UI to discover schema, inspect data, and fetch results in CSV or structured formats. Note that the server is read-only by design in this setup, focusing on safe querying of AD data.
How to install
Prerequisites:
- JDK 8+ installed on the host machine capable of running the MCP server jar
- Maven (for building the MCP server) if you need to compile locally
- The CData JDBC Driver for Active Directory installed and licensed on the machine where you will provide the JDBC connection (as described in the README)
- A configured .prp file (e.g., active-directory.prp) with correct JDBC connection parameters and driver details
Installation steps:
-
Clone the repository and navigate to it git clone https://github.com/cdatasoftware/active-directory-mcp-server-by-cdata.git cd active-directory-mcp-server-by-cdata
-
Build the MCP server jar (if you are building from source) mvn clean install This yields a jar named similar to CDataMCP-jar-with-dependencies.jar
-
Ensure the CData JDBC Driver for Active Directory is downloaded, installed, and licensed according to the instructions in the README. Obtain the JDBC connection string and create the active-directory.prp file with your configuration: 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=
-
Run the MCP server using the prepared .prp file java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/active-directory.prp
Optional: If you need Claude Desktop integration, create the claude_desktop_config.json with an entry under mcpServers pointing to this jar and the path to the .prp file as shown in the README.
Additional notes
Tips and common considerations:
- The MCP server uses stdio for communication, so it must run on the same machine as clients that interact with it.
- This setup is read-only; write, update, or delete capabilities are not exposed in this configuration.
- Ensure the LDAP/AD connectivity details (JDBC URL, credentials, and any OAuth flows) are correctly configured in the .prp file. If OAuth is used, you may need to authenticate in a browser during driver setup.
- If Claude Desktop or your MCP client cannot detect the server, fully quit and restart the client, or reimport the configuration to refresh the server list.
- When querying, you can retrieve metadata with the _get_tables tool and then inspect columns with the _get_columns tool before running a targeted _run_query.
- For troubleshooting, verify that the Java process has access to the AD environment and that the JDBC driver jar path is correct in the .prp file.