mcp-freeipa
MCP server for FreeIPA / Red Hat IdM — user, group, host, DNS, HBAC, and sudo management via the Model Context Protocol.
README
mcp-freeipa
MCP server for FreeIPA / Red Hat IdM — user, group, host, DNS, HBAC, and sudo management via the Model Context Protocol.
Features
- Users — list, get, create, enable, disable, delete, and reset passwords
- Groups — list, get, and manage group memberships
- Hosts — list and inspect enrolled hosts
- DNS — list zones, list and get records (A, AAAA, CNAME, MX, PTR, TXT, SRV, …)
- Sudo rules — list and inspect sudo policy rules
- HBAC rules — list and inspect host-based access control rules
Requirements
- FreeIPA 4.6+ or Red Hat IdM 7.6+ (any modern version with the JSON-RPC API)
- Node.js 18+
- An admin account or a dedicated service account with read access to the relevant objects
FreeIPA permissions
The minimum required privileges depend on which tools you use:
| Area | Required privilege |
|---|---|
| Users | User Administrators role or System: Read Users permission |
| Groups | Group Administrators role or System: Read Groups permission |
| Hosts | Host Administrators role or System: Read Hosts permission |
| DNS | DNS Administrators role or System: Read DNS Entries permission |
| Sudo | Sudo Administrator role or System: Read Sudo Rules permission |
| HBAC | HBAC Administrator role or System: Read HBAC Rules permission |
For read-only usage, you can create a dedicated service account and grant it only the System: Read * permissions via an RBAC role.
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
FREEIPA_HOST |
Yes | — | FreeIPA server hostname (e.g. ipa.example.com) |
FREEIPA_PASSWORD |
Yes | — | Password for the FreeIPA account |
FREEIPA_USERNAME |
No | admin |
FreeIPA account username |
FREEIPA_ALLOW_SELF_SIGNED |
No | true |
Allow self-signed TLS certificates (true/false) |
Installation
npm install
npm run build
Claude Desktop configuration
Add to claude_desktop_config.json:
{
"mcpServers": {
"freeipa": {
"command": "node",
"args": ["/absolute/path/to/mcp-freeipa/dist/index.js"],
"env": {
"FREEIPA_HOST": "ipa.example.com",
"FREEIPA_USERNAME": "admin",
"FREEIPA_PASSWORD": "your-password-here",
"FREEIPA_ALLOW_SELF_SIGNED": "true"
}
}
}
}
If you have installed the package globally via npm install -g mcp-freeipa:
{
"mcpServers": {
"freeipa": {
"command": "mcp-freeipa",
"env": {
"FREEIPA_HOST": "ipa.example.com",
"FREEIPA_USERNAME": "admin",
"FREEIPA_PASSWORD": "your-password-here"
}
}
}
}
Available tools
Users
| Tool | Description |
|---|---|
list_users |
List users, with optional uid / cn / mail filters |
get_user |
Get full details for a user by UID |
enable_user |
Enable a disabled user account |
disable_user |
Disable (lock) a user account |
add_user |
Create a new user account |
delete_user |
Permanently delete a user account |
reset_password |
Reset a user's password |
Groups
| Tool | Description |
|---|---|
list_groups |
List groups with optional name filter |
get_group |
Get full details for a group by name |
add_user_to_group |
Add one or more users to a group |
remove_user_from_group |
Remove one or more users from a group |
Hosts
| Tool | Description |
|---|---|
list_hosts |
List enrolled hosts with optional FQDN filter |
get_host |
Get full details for a host by FQDN |
DNS
| Tool | Description |
|---|---|
list_dns_zones |
List all DNS zones |
list_dns_records |
List all records in a DNS zone |
get_dns_record |
Get all record types for a specific name in a zone |
Sudo
| Tool | Description |
|---|---|
list_sudo_rules |
List all sudo rules |
get_sudo_rule |
Get full details of a sudo rule |
HBAC
| Tool | Description |
|---|---|
list_hbac_rules |
List all host-based access control rules |
get_hbac_rule |
Get full details of an HBAC rule |
FreeIPA API notes
The server uses the FreeIPA JSON-RPC API (/ipa/session/json). It authenticates with a username and password via form-encoded login (/ipa/session/login_password) and stores the resulting ipa_session cookie for all subsequent requests. The session cookie is refreshed automatically on expiry (HTTP 401).
FreeIPA returns all attribute values as arrays even for scalar fields (e.g., {"uid": ["john"]}). The server normalises these automatically, extracting the first element for scalar fields and preserving full arrays for list fields such as memberof_group.
Development
npm run dev # run with tsx (no build step)
npm run build # compile TypeScript to dist/
npm start # run compiled output
License
See LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。