About Ldap MCP
Ldap MCP is an MCP server published by trxo in the Developer Tools category: ldap-mcp server.
The repository has 12 stars and 2 forks, with the last commit 12 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/trxo/ldap-mcpThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Ldap MCP
Powered by Claude · Grounded in docs
Security checks
Static checks derived from the repository 6 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository ships documentation.
- !License declaredNo license file. Legally you have no right to use it in a product.
- !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
1 check has not been run yet.
README
LDAP MCP Server
LDAP MCP Server exposes an LDAP directory through the Model Context Protocol (MCP), enabling MCP clients to run common directory searches and CRUD operations using the standard tool/resource workflow.
Features
- Search, retrieve, add, modify, and delete LDAP entries through MCP tools.
- Optional read-only mode that limits MCP clients to safe operations.
- Support for StartTLS upgrades, LDAPS endpoints, and configurable TLS verification.
- Built-in MCP resources for the directory root DSE and arbitrary entries by DN.
- Graceful shutdown handling and automatic LDAP reconnection logic.
Requirements
- Go 1.24 or newer
- Access to an LDAP server (OpenLDAP, Active Directory, etc.)
- MCP client capable of speaking the SSE transport (e.g., Claude Desktop)
Building and Testing
cd /opt/code/github/ldap-mcp
go test ./...
The repository currently ships without unit tests, so a successful run confirms the project compiles and all dependencies resolve.
Running the Server
cd /opt/code/github/ldap-mcp
go run ./cmd/server \
-url ldap://localhost:389 \
-bind-dn "cn=admin,dc=example,dc=com" \
-bind-password secret
Key flags:
-addr: MCP listen address (default:8080, overridable viaMCP_PORT).-url: LDAP server URL such asldap://host:389orldaps://host:636.-bind-dn/-bind-password: Credentials for binding to the directory. You can also supply the password via theLDAP_BIND_PASSWORDenvironment variable.-starttls: Upgrade a plain LDAP connection to TLS. Only valid when usingldap://URLs.-insecure: Skip TLS certificate verification (useful for testing with self-signed certs).-read-write: Enable add/modify/delete tools. If omitted the server operates in read-only mode.-timeout: Per-request timeout when talking to the LDAP server (default 30s).
Use -help to print the full list of flags and environment variables.
MCP Surface
Tools
search_entries: Execute LDAP searches with paging, scope selection, alias dereferencing, and size limits.get_entry: Fetch a single entry by distinguished name.add_entry: Create new entries (requires-read-write).modify_entry: Apply attribute modifications (requires-read-write).delete_entry: Delete entries (requires-read-write).
Resources
ldap://root-dse: Returns the directory root DSE as JSON.ldap://entry/{dn}: Fetches a specific entry when provided with a DN.
Development Notes
- The LDAP client wrapper (
internal/ldapclient) manages connection reuse, StartTLS negotiation, and automatic reconnection on transport errors. - MCP tool handlers (
internal/tools) validate inputs before invoking LDAP operations; for example thepage_sizeargument is clamped to theuint32range used by paged results controls. - Format Go sources with
gofmtand keep module dependencies tidy viago mod tidywhen dependencies change.
README fetched from the repository 6 days ago. The original is authoritative.