Foreman MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FOREMAN_URL | Yes | Base URL of your Foreman instance (e.g., https://foreman.example.com) | |
| FOREMAN_PASSWORD | Yes | Personal Access Token (not your web login password - create this in User Administration → Personal Access Tokens) | |
| FOREMAN_USERNAME | Yes | Foreman username | |
| FOREMAN_VERIFY_SSL | No | Whether to verify SSL certificates (default: true) | true |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_hostsA | List hosts from Foreman with optional search filter and field filtering. CONTEXT OPTIMIZATION: Default per_page=10 to prevent overflow. Use search filters like 'location ~ SYD03' or 'os ~ Windows' to narrow results. Total hosts available: ~1000+. Always use search parameter for large inventories. Field filtering: By default returns essential fields only (id, name, ip, os, location, status). Use include_fields="all" for complete data, or specify comma-separated fields like "id,name,ip,mac". |
| get_hostB | Get detailed information about a specific host |
| search_hosts_by_locationB | Search hosts by location (e.g., 'SYD03', 'MEL03'). CONTEXT OPTIMIZATION: Returns max 10 results by default. Use specific location codes for best results. |
| search_hosts_by_osA | Search hosts by operating system (e.g., 'Windows', 'Oracle Linux'). CONTEXT OPTIMIZATION: Returns max 10 results by default. Use specific OS names like 'Windows Server 2022' for targeted results. |
| search_hosts_by_environmentA | Search hosts by environment (e.g., 'production', 'development'). CONTEXT OPTIMIZATION: Returns max 10 results by default. |
| list_organizationsC | List all organizations in Foreman. CONTEXT OPTIMIZATION: Typically <20 organizations. Safe for context window. |
| list_locationsB | List all locations in Foreman. CONTEXT OPTIMIZATION: Typically <30 locations. Safe for context window. |
| list_hostgroupsB | List all hostgroups in Foreman. CONTEXT OPTIMIZATION: Can be 50+ hostgroups. Consider using search if available. |
| search_hosts_by_hostgroupC | Search hosts by hostgroup name or title. CONTEXT OPTIMIZATION: Returns max 10 results by default. |
| get_host_statusC | Get status information for a specific host. |
| search_hosts_by_factC | Search hosts by a specific fact name and value. CONTEXT OPTIMIZATION: Returns max 10 results by default. |
| list_subnetsA | List all subnets in Foreman. CONTEXT OPTIMIZATION: Network subnets typically <50. Safe for context window. |
| get_subnetC | Get detailed information about a specific subnet. |
| list_domainsC | List all domains in Foreman. CONTEXT OPTIMIZATION: DNS domains typically <30. Safe for context window. |
| get_domainC | Get detailed information about a specific domain. |
| list_smart_proxiesC | List all smart proxies in Foreman. CONTEXT OPTIMIZATION: Smart proxies typically <20. Safe for context window. |
| get_smart_proxyC | Get detailed information about a specific smart proxy. |
| list_operatingsystemsA | List all operating systems in Foreman. CONTEXT OPTIMIZATION: 67 total OS entries. Use per_page=5-10 for quick overview. |
| get_operatingsystemC | Get detailed information about a specific operating system. |
| list_architecturesB | List all architectures in Foreman. CONTEXT OPTIMIZATION: Only 6 architectures total. Safe for context window. |
| get_architectureC | Get detailed information about a specific architecture. |
| list_mediaC | List all installation media in Foreman. CONTEXT OPTIMIZATION: 22 total media entries. Safe for context window. |
| get_mediaB | Get detailed information about a specific installation media. |
| list_content_viewsA | List all content views in Foreman/Katello with field filtering. CONTEXT OPTIMIZATION: 102 total content views! Use per_page=5-10 max. Each content view has extensive metadata. Consider getting specific CV by ID. Field filtering: By default returns essential fields only (id, name, version_count, latest_version). Use include_fields="all" for complete data, or specify comma-separated fields. |
| get_content_viewC | Get detailed information about a specific content view. |
| list_repositoriesA | List all repositories in Foreman/Katello with field filtering. ⚠️ CONTEXT WARNING: 258 total repositories with extensive metadata! Use per_page=5 max or context will overflow. Consider specific repo searches. Field filtering: By default returns essential fields only (id, name, content_type, url, product). Use include_fields="all" for complete data, or specify comma-separated fields. |
| get_repositoryC | Get detailed information about a specific repository. |
| list_lifecycle_environmentsA | List all lifecycle environments for a specific organization in Foreman/Katello. CONTEXT OPTIMIZATION: 16 total environments. Safe for context window. Args: organization_id: Required numeric organization ID (e.g., "1", "4"). Organization names are not supported by this endpoint. per_page: Number of results per page. include_fields: Field filtering options. Field filtering: By default returns essential fields only (id, name, description, library). Use include_fields="all" for complete data, or specify comma-separated fields. |
| get_lifecycle_environmentC | Get detailed information about a specific lifecycle environment. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- 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/InfraMCP/foreman-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server