Get the FREE Ultimate OpenClaw Setup Guide →

ldap -by-cdata

This read-only MCP Server allows you to connect to LDAP data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out our MCP Server for LDAP (https://www.cdata.com/drivers/ldap/download/mcp).

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio cdatasoftware-ldap-mcp-server-by-cdata java -jar CDataMCP-jar-with-dependencies.jar /PATH/TO/ldap.prp

How to use

This MCP server hosts a read-only interface to LDAP via the CData JDBC LDAP driver. It exposes a set of tools that let clients discover the available LDAP tables (logical representations of LDAP data) and their columns, and to run read-only SQL-like queries against the connected LDAP data source. The built-in tools are named using the server alias (ldap-by-cdata) followed by the specific action, for example ldap-by-cdata_get_tables, ldap-by-cdata_get_columns, and ldap-by-cdata_run_query. You can query live LDAP data without writing SQL against the source; the server converts your requests into appropriate LDAP operations under the hood. Typical usage involves first listing tables, then inspecting columns, and finally issuing a read-only query to retrieve data of interest. The system is designed to be used by AI clients (such as Claude Desktop) via JSON-RPC payloads or through a client that supports the MCP tool set.

Tools available:

  • ldap-by-cdata_get_tables: Retrieves a list of LDAP-backed tables (or logical views) exposed by the MCP server. Output is CSV with a header row listing columns.
  • ldap-by-cdata_get_columns: Retrieves the columns for a given table. Output is CSV with a header row listing column names and types.
  • ldap-by-cdata_run_query: Executes a read-only SQL-like SELECT query against the LDAP data source (translated to LDAP operations by the driver).

To use via JSON-RPC, construct requests where the method is tools/call and the name is one of the tools above, for example ldap-by-cdata_get_tables or ldap-by-cdata_run_query. See the README for concrete JSON-RPC payload examples.

How to install

Prerequisites:

  • Java Runtime Environment (JRE) or JDK installed and available on your PATH.
  • Maven is required for building the MCP server from source (as described below).

Installation steps:

  1. Clone the repository and navigate into it: git clone https://github.com/cdatasoftware/ldap-mcp-server-by-cdata.git cd ldap-mcp-server-by-cdata

  2. Build the MCP server JAR with dependencies: mvn clean install This will produce a JAR named CDataMCP-jar-with-dependencies.jar in the target directory.

  3. Install the CData JDBC Driver for LDAP (required to connect to LDAP):

    • Download the LDAP JDBC driver from: https://www.cdata.com/drivers/ldap/download/jdbc
    • Follow the driver installation instructions for your OS (including licensing steps in the lib directory).
    • Ensure you have a valid LDAP connection string ready to supply in a .prp file (see next step).
  4. Create a property file for the JDBC connection (ldap.prp):

    • This file defines Prefix, ServerName, ServerVersion, DriverPath, DriverClass, JdbcUrl, and Tables.
    • Example content (adjust paths to your environment): Prefix=ldap ServerName=CDataLDAP ServerVersion=1.0 DriverPath=/path/to/cdata.jdbc.ldap.jar DriverClass=cdata.jdbc.ldap.LDAPDriver JdbcUrl=jdbc:ldap:InitiateOAuth=GETANDREFRESH; Tables=
  5. Run the MCP server with the .prp file: java -jar /path/to/CDataMCP-jar-with-dependencies.jar /path/to/ldap.prp Note: The server uses stdio, so it is intended to be used with clients running on the same machine.

  6. Optional Claude Desktop setup (if you are using Claude):

    • Create claude_desktop_config.json with an entry for the LDAP MCP server, using the same command and arguments as shown in the README example (adjust paths accordingly).
    • Point Claude Desktop to that config and restart the application so the MCP server appears in the client.

Additional notes

Tips and notes:

  • This MCP server is read-only by design. It exposes read capabilities to query LDAP data through the MCP interface.
  • The server runs via Java and communicates over stdio, so it must be on the same machine as the client (Claude Desktop or any MCP-compatible client).
  • Before first use, ensure your ldap.prp contains a valid JDBC connection string derived from the CData LDAP Driver setup (DriverPath, DriverClass, and JdbcUrl).
  • If the MCP server does not appear in Claude Desktop, fully quit the application and relaunch to reload the MCP configuration.
  • If you encounter license or connection issues, consult the CData driver documentation and support resources linked in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers