
LDAP Assistant MCP
io.github.droideck由 GitHub 账号 droideck 发布v0.5.0更新于 Oct 25, 2026
MCP server for 389 Directory Server health diagnostics, log analysis, and SOS-report investigation
概览
本地 MCP 服务器,让 AI 助手对 389 Directory Server 进行只读诊断,覆盖在线、停机和归档实例,并给出按优先级排序的发现。
- 可以做什么
- 运行健康检查和多服务器总览,包括完整的 healthcheck 等价功能,以及在线或基于 dse.ldif 的插件与后端配置查看。检查复制状态、拓扑、延迟、协议和冲突条目,并汇总性能、缓存、连接、操作和线程统计及调优建议。分析索引配置,从访问日志中查找未建索引的搜索,并分析访问、错误和审计日志(传统与 JSON 格式)。调查 SOS 报告及配置或日志归档:清单、离线配置检查、dse.ldif 差异对比。列出和搜索用户与群组,运行监控查询和通用 LDAP 搜索,隐私模式下仅返回计数。
- 适用场景
- 适合排查 389 Directory Server 问题:健康巡检、复制故障定位、性能调优、索引审查,或在提交支持工单前汇总客户的 SOS 报告。适用于针对在线服务器、停机实例或归档的内部运维与支持工作。
- 运行要求
- 通过 uvx(PyPI 包)或源码在本地以 stdio 运行。需要 Linux 或 macOS(Windows 仅限 WSL2)、Python 3.11+、uv 包管理器,以及构建 python-ldap 所需的系统开发库。需要设置 LDAP_SERVERS_CONFIG 环境变量,指向 servers.json 的绝对路径;该文件包含 LDAP 地址、绑定 DN 和绑定密码。在线模式需要能访问目标 LDAP 服务器的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 LDAP Assistant MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
LDAP Assistant MCP
Beta — read-only 389 Directory Server diagnostics, suitable for evaluation and internal troubleshooting. Tool schemas, output formats, and configuration fields may still change before 1.0.0.
LDAP Assistant MCP turns your AI assistant into a 389 Directory Server support engineer. Point it at live servers, stopped instances, or an SOS report from a customer case, and ask:
- "What's wrong with my directory servers?"
- "Summarize this SOS report before I open the case."
- "Replication looks broken between these servers — why?"
It answers with prioritized findings (severity, impact, remediation) from 42 read-only diagnostic tools built on lib389, the official 389 DS administration library. Privacy mode is on by default: DNs, hostnames, and IPs are redacted before anything reaches the LLM.
Supported provider: 389 Directory Server. (OpenLDAP provider code exists experimentally behind an opt-in flag, with no privacy guarantees, and is not part of the support contract — see Environment Variables.)
Install
Prerequisites
-
Linux (primary) or macOS. Windows is not supported natively (python-ldap has no official Windows wheels) — use WSL2 (see the install playbook)
-
Python 3.11+ (3.13 is what CI tests against)
-
uvpackage manager -
MCP client (Claude Desktop, Claude Code, Cursor, Gemini CLI, etc.)
-
System development libraries (needed to build
python-ldap):Fedora / RHEL / CentOS:
Ubuntu / Debian:
macOS (Homebrew):
Anything failing during install? → Installation troubleshooting playbook
From PyPI (recommended)
No clone needed — your MCP client runs the published package via uvx. Skip ahead to Configure your servers, then use this client configuration (Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Use an absolute path for LDAP_SERVERS_CONFIG — relative paths resolve against the MCP client's working directory, which is usually not where you think.
From source (development)
Then set LDAP_SERVERS_CONFIG in the generated client entry as above. See the Development Guide for test containers and architecture.
Configure your servers
Create a servers.json with your LDAP server(s). Note: the name field is never redacted in privacy mode — it is passed as-is to AI agents so they can reference servers across tool calls. Do not put hostnames, IPs, or other private information in server names.
Note: serverid is the instance name without the slapd- prefix (e.g. localhost for the instance slapd-localhost).
The four server modes
Tools that need a live connection tell you so — the error names the tools that do work in that server's mode, so the investigation continues instead of dead-ending.
Remote LDAPS certificate verification: remote ldaps:// servers verify the server certificate by default ("tls_verify": true, or the LDAP_TLS_VERIFY environment variable for env-based config). To connect to a server with a self-signed or otherwise untrusted certificate, set "tls_verify": false on that server entry — this disables certificate verification entirely, so use it only for trusted lab environments. Local instances (is_local: true) instead use the instance's own NSS certificate directory.
After editing the client config or servers.json, restart your MCP client, then verify: ask "Which LDAP servers are configured?"
Privacy mode
By default, privacy mode is enabled — sensitive data (DNs, hostnames, IPs, user details) is redacted from tool outputs. Tools that expose individual entries (get_user_details, ldap_search) are disabled; list tools return counts only. Diagnostic metrics (counts, ratios, percentages) remain visible.
To enable full data access in trusted environments only:
Important: Only enable this with local models, private cloud LLM instances, or when working with test/sample data. Avoid enabling with public LLMs when connected to production directories — your directory information could be included in their training data or logs.
When privacy mode is enabled (default):
- Hostnames, DNs, IP addresses, and suffixes are anonymized
- Configuration values are redacted
- Sensitive tools are disabled
- Diagnostic metrics (counts, ratios, percentages) remain visible
- Server names (the
namefield inservers.json) are never redacted — they are user-chosen labels that must remain stable across tool calls. Do not put hostnames, IPs, or other private information in server names.
Data handling
- No telemetry. The server collects nothing and phones home to no one.
- Everything runs locally. Directory data is read from your LDAP servers, local instances, or archive files and returned only to your MCP client — which forwards tool results to whatever LLM you have configured. Privacy mode (on by default) redacts sensitive values before they leave the server process.
- Credentials stay in your local
servers.json/ environment variables; they are never included in tool output and tool errors are sanitized.
First questions to ask
Playbooks (symptom → tools → what they can't know → how to verify by hand):
Tools by group
42 read-only tools — full reference with parameters in TOOLS.md.
Environment Variable Reference
Single-server fallback (used only when LDAP_SERVERS_CONFIG is not set):
Troubleshooting
No LDAP server to test against? The Development Guide spins up test containers with Docker.
Limitations
- Beta — Tool schemas, output formats, and configuration fields may change before 1.0.0
- LLM interpretation — Tools return accurate data, but the LLM interprets it. Hallucinations are possible. Always verify recommendations before acting.
- Read-only — No write operations yet
- Plain text passwords — Use restrictive file permissions on config files
- STDIO transport only — No HTTP/SSE support yet
Documentation
License
GPL-3.0-or-later. Built on lib389 (the official 389 Directory Server administration library) and FastMCP.
References
- PyPI package
- Official MCP Registry — listed as
io.github.droideck/ldap-assistant-mcp - Model Context Protocol
- 389 Directory Server
- FastMCP 2.0
来源:README.md,提交 7037137
工具
0版本历史
1- v0.5.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分