ldap-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ldap-mcpshow members of the engineering group"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ldap-mcp
MCP server for read-only LDAP directory operations.
Installation
uv add ldap-mcp
# or
pip install ldap-mcpRelated MCP server: readonly-mcp-akamai
Configuration
Set environment variables before running:
export LDAP_URI="ldaps://ldap.example.com:636"
export LDAP_BASE_DN="dc=example,dc=com"
export LDAP_BIND_DN="cn=readonly,dc=example,dc=com"
export LDAP_BIND_PASSWORD="secret"
# Optional: only return employee accounts in all searches
export LDAP_DEFAULT_FILTER="(employeeType=employee)"All Environment Variables
Variable | Required | Default | Description |
| Yes | - | Server URI (ldap:// or ldaps://) |
| Yes | - | Default search base DN |
| No | - | Bind DN (empty = anonymous) |
| No | - | Bind password |
| No | - | Filter ANDed to all searches |
| No |
|
|
| No |
| Upgrade to TLS on port 389 |
| No |
| Verify TLS certificates |
| No | - | Path to CA certificate |
| No |
| Connection timeout (seconds) |
Usage
Run the server:
uvx ldap-mcp # stdio transport (default)
uvx ldap-mcp --transport sse # SSE transportOr if installed in a project:
uv run ldap-mcpAdd to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"ldap": {
"command": "uvx",
"args": ["ldap-mcp"],
"env": {
"LDAP_URI": "ldaps://ldap.example.com:636",
"LDAP_BASE_DN": "dc=example,dc=com",
"LDAP_BIND_DN": "cn=readonly,dc=example,dc=com",
"LDAP_BIND_PASSWORD": "secret"
}
}
}
}Add via CLI:
claude mcp add --transport stdio \
--env LDAP_URI=ldaps://ldap.example.com:636 \
--env LDAP_BASE_DN=dc=example,dc=com \
--env LDAP_BIND_DN=cn=readonly,dc=example,dc=com \
--env LDAP_BIND_PASSWORD=secret \
ldap -- uvx ldap-mcpOr add to .mcp.json in your project root:
{
"mcpServers": {
"ldap": {
"type": "stdio",
"command": "uvx",
"args": ["ldap-mcp"],
"env": {
"LDAP_URI": "ldaps://ldap.example.com:636",
"LDAP_BASE_DN": "dc=example,dc=com",
"LDAP_BIND_DN": "${LDAP_BIND_DN}",
"LDAP_BIND_PASSWORD": "${LDAP_BIND_PASSWORD}"
}
}
}
}Add to ~/.config/opencode/config.json (or opencode.json in project root):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"ldap": {
"type": "local",
"command": ["uvx", "ldap-mcp"],
"environment": {
"LDAP_URI": "ldaps://ldap.example.com:636",
"LDAP_BASE_DN": "dc=example,dc=com",
"LDAP_BIND_DN": "{env:LDAP_BIND_DN}",
"LDAP_BIND_PASSWORD": "{env:LDAP_BIND_PASSWORD}"
}
}
}
}Tools
ldap_search
Search LDAP directory with filters.
filter: "(objectClass=person)"
base_dn: "ou=users,dc=example,dc=com" # optional
scope: "subtree" # base, one, or subtree
attributes: ["cn", "mail", "uid"] # optional
size_limit: 100ldap_get_entry
Get a single entry by DN with all attributes.
dn: "cn=jdoe,ou=users,dc=example,dc=com"
attributes: ["*"] # optional, defaults to all
include_operational: true # include createTimestamp, etc.ldap_get_schema
Browse LDAP schema definitions.
schema_type: "all" # object_classes, attribute_types, or all
name_filter: "person" # optional substring filterldap_compare
Compare an attribute value without retrieving the entry.
dn: "cn=jdoe,ou=users,dc=example,dc=com"
attribute: "memberOf"
value: "cn=admins,ou=groups,dc=example,dc=com"Prompts
user_lookup
Guided workflow for finding users by name, email, or uid.
group_members
List members of an LDAP group with optional name resolution.
group_membership
Find all groups a user belongs to.
search_guide
LDAP filter syntax reference with examples.
Development
# Install dev dependencies
uv sync --group dev
# Run checks
make check # lint + format + typecheck + test
# Run tests only
make test
# Auto-fix issues
make fixLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA comprehensive MCP server for managing Active Directory environments through LDAP, enabling user, group, computer, and OU management, as well as security auditing and policy compliance checks.Last updated38MIT
- AlicenseAqualityDmaintenanceRead-only MCP server for Akamai CDN that enables searching properties, browsing EdgeWorker code, querying DNS zones, inspecting network lists, and translating error codes via natural language.Last updated161MIT
- Flicense-qualityCmaintenanceAn MCP server that exposes LDAP directory operations to AI agents, supporting full CRUD, dual transport modes (stdio and SSE), and LDIF/JSON output with authentication.Last updated
- Flicense-qualityDmaintenanceMCP server that connects Claude Code to LDAP/Active Directory for user lookup, group management, authentication, and role mapping.Last updated
Related MCP Connectors
Official Microsoft MCP Server to query Microsoft Entra data using natural language
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
MCP server for Open Archives: Dutch genealogical records and historical page transcriptions.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/major/ldap-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server