RedHatLDAP-MCP
Click on "Deploy 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., "@RedHatLDAP-MCP search for John Doe"
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.
RedHat LDAP MCP Server
A specialized Model Context Protocol (MCP) server designed for corporate LDAP directories, with optimizations for Red Hat's LDAP environment and other OpenLDAP-based corporate systems.
๐ฏ Purpose
This MCP server provides read-only access to corporate LDAP directories, enabling AI assistants to:
Search for people and organizational information
Navigate corporate hierarchies and reporting structures
Access contact information and organizational data
Export directory information for business use
Related MCP server: mcp-activedirectory
๐ Features
Corporate LDAP Optimized
Anonymous bind support for read-only corporate directories
Red Hat LDAP integration with rhatPerson schema support
Schema auto-detection for different LDAP environments
Corporate hierarchy tools for org charts and reporting structures
Read-Only & Secure
No modification operations - purely informational
Corporate firewall friendly - optimized for enterprise networks
Flexible authentication - anonymous, simple, and SASL support planned
AI Assistant Ready
MCP protocol compliance for Claude, Cursor, and other AI tools
Structured responses with consistent JSON formatting
Rich search capabilities across multiple person attributes
Export functionality for contact lists and org charts
๐ง Available MCP Tools
People Search
search_people- Search for people by name, email, uid, departmentget_person_details- Get detailed information about a specific person
Organization Charts
get_organization_chart- Build hierarchical org charts from any managerfind_manager_chain- Get the complete management chain for any person
Groups & Teams
search_groups- Search for groups and teamsget_person_groups- Find all groups a person belongs toget_group_members- List all members of a specific group
Locations & Offices
find_locations- Discover office locations and people countsget_people_at_location- Find all colleagues at a specific office
Utilities
test_connection- Test LDAP connectivity and configuration
๐ ๏ธ Installation
# Clone the repository
git clone https://github.com/jlaska/RedHatLDAP-MCP.git
cd RedHatLDAP-MCP
# Create virtual environment and install
uv venv
uv pip install -e ".[dev]"โ๏ธ Configuration
Create a configuration file (e.g., config/redhat-ldap.json):
{
"ldap": {
"server": "ldap://ldap.corp.redhat.com",
"base_dn": "dc=redhat,dc=com",
"auth_method": "anonymous",
"timeout": 30
},
"schema": {
"person_object_class": "rhatPerson",
"person_search_base": "ou=users,dc=redhat,dc=com",
"group_search_base": "ou=adhoc,ou=managedGroups,dc=redhat,dc=com",
"corporate_attributes": [
"rhatJobTitle", "rhatCostCenter", "rhatLocation",
"rhatBio", "manager", "rhatGeo"
]
},
"logging": {
"level": "INFO",
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
}
}๐ Usage
Claude CLI Integration (Recommended)
For the easiest setup with Claude CLI, use the included wrapper script:
# Add to Claude CLI (from project directory)
claude mcp add redhat-ldap /absolute/path/to/RedHatLDAP-MCP/scripts/run_mcp_server.sh
# Verify connection
claude mcp list
# Use in Claude CLI conversations
claude chat
> What's John Doe's mobile number?The wrapper script automatically configures the environment and uses the local configuration.
Stdio Mode (for other MCP clients)
REDHAT_LDAP_CONFIG="config/redhat-ldap.json" uv run python -m redhat_ldap_mcp.serverHTTP Mode (for testing/development)
REDHAT_LDAP_CONFIG="config/redhat-ldap.json" uv run python -m redhat_ldap_mcp.server_http --host 0.0.0.0 --port 8813๐ง MCP Client Configuration
Claude CLI
claude mcp add redhat-ldap "scripts/run_mcp_server.sh" -e REDHAT_LDAP_CONFIG=$PWD/config/redhat-ldap.json๐ Available Tools
search_people- Find people by name, email, uid, or other attributesget_person_details- Get detailed information about a specific personget_organization_chart- Generate hierarchical org charts from any managerfind_manager_chain- Get the complete management chain for any personsearch_groups- Search for groups and teamsget_person_groups- Find all groups a person belongs toget_group_members- List all members of a specific groupfind_locations- Discover office locations and people countsget_people_at_location- Find all colleagues at a specific officetest_connection- Test LDAP connectivity and configuration
๐งช Development
# Run tests
pytest
# Format code
black src/ tests/
# Lint code
ruff check src/ tests/
# Type checking
mypy src/๐ License
MIT License - see LICENSE file for details.
๐ค Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Run the test suite
Submit a pull request
๐ Acknowledgments
Built on the excellent architecture patterns from ActiveDirectoryMCP
Powered by the Model Context Protocol SDK
LDAP integration via the ldap3 library
Available Tools
12 toolsfind_locationsFind LocationsC
Find office locations and people counts.
Inputs: query. Returns: result
find_manager_chainFind Manager ChainA
Find the management chain for a person (all managers up to the top).
Inputs: person_id (required). Returns: result
get_group_membersGet Group MembersA
Get all members of a specific group.
Inputs: group_name (required). Returns: result
get_organization_chartGet Organization ChartA
Get organization chart starting from a specific manager.
Returns a hierarchical view of the organization structure.
Inputs: manager_id (required), max_depth. Returns: result
get_organization_chart_summaryGet Organization Chart SummaryA
Get lightweight organization chart for reduced token usage.
Returns a hierarchical view with minimal person data (uid, name, title, department, country). Ideal for large organization charts where token usage is a concern.
Inputs: manager_id (required), max_depth. Returns: result
get_people_at_locationGet People At LocationB
Get all people at a specific location.
Inputs: location (required), max_results. Returns: result
get_person_detailsGet Person DetailsD
Get detailed information about a specific person.
Inputs: identifier (required). Returns: result
get_person_groupsGet Person GroupsA
Get all groups that a person is a member of.
Inputs: person_id (required). Returns: result
search_groupsSearch GroupsC
Search for groups in the directory.
Inputs: query (required), max_results. Returns: result
search_peopleSearch PeopleA
Search for people in the corporate directory.
Supports searching by:
Name (first, last, or full name)
Email address
Username (uid)
Employee ID
Department
Inputs: query (required), max_results. Returns: result
search_people_summarySearch People SummaryA
Search for people with lightweight summaries for reduced token usage.
Returns minimal person data (uid, name, title, department, country) instead of full details. Ideal when you need to search many people but don't need comprehensive information.
Inputs: query (required), max_results. Returns: result
test_connectionTest ConnectionA
Test the LDAP connection and return connection status.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 12 tools
Most tools target distinct resources or actions, but search_people and search_people_summary (and the two organization chart variants) are intentionally similar and could be confused. The descriptions clearly distinguish them by output detail and token usage, so misselection is unlikely but possible.
Tool names consistently follow a verb_noun pattern (search_, get_, find_, test_). Minor inconsistencies exist between singular/plural forms like person vs people and synonym verbs like search vs find, but the overall pattern is predictable.
12 tools is well-scoped for an LDAP directory server, covering people, groups, organizational hierarchy, locations, and connection testing. Each tool serves a clear purpose without unnecessary bloat.
The tool set provides strong read-only coverage of the corporate directory domain: people search and details, org charts, management chains, groups, and locations. Minor gaps like direct-reports lookup or dedicated group details are workable through existing tools.
Related MCP Connectors
Search B2B people, companies and local businesses and build lead lists from your AI assistant.
People search, available contact data and authorized email outreach for your AI assistant.
Search companies, enrich contacts, and reveal emails and phones from your AI agent.
Read-only access to a company's ERP for Claude, ChatGPT and Gemini, with OAuth and an audit trail.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access and search Google Contacts through per-user OAuth authentication on serverless AWS Lambda. Provides read-only access to personal contacts with zero data storage and real-time API queries.2Creative Commons Attribution Non Commercial Share Alike 4.0 International
- FlicenseAqualityDmaintenanceProvides AI assistants with unified access to on-prem Active Directory via LDAP and Azure AD / Entra ID through the Microsoft Graph API. It enables comprehensive management and search of users, groups, computers, and cloud devices using 18 specialized tools.18-
- AlicenseNot gradedqualityDmaintenanceExposes internal employee directories and project management systems to AI models through standardized tools and resources. It enables AI assistants to search for team members, query project statuses, and explore organizational hierarchies with secure role-based access control.MIT
- AlicenseBqualityBmaintenanceEnables read-only querying of Active Directory/LDAP resources such as users, groups, and computers, including group memberships, account status, and manager resolution.54351 PyPI1GPL 3.0