get_architecture
Get detailed information about a specific architecture.
Ask Foreman which hosts you have, where they are and what they run — and get an answer sized to fit in the conversation.
LABSCO SUMMARY
Infrastructure inventories are big enough that a naive listing call is useless — one answer and the conversation is full. Every search here returns a capped page with selectable fields, which is what makes asking about a few thousand hosts practical. Nothing in the tool set changes state.
A read-only server over Foreman and Katello. It covers hosts and the searches that find them, the organisations, locations and hostgroups they belong to, the network objects around them, and the content side — content views, repositories and lifecycle environments. Results are capped by default so a large estate does not flood the context.
A Foreman instance, and in the environment its URL, a username, a password and whether to verify SSL. The password field takes a Personal Access Token, created under User Administration, Personal Access Tokens, not your web login password. The account needs the view_ permissions for hosts, organizations, locations, hostgroups, subnets, domains and smart proxies — the built-in Viewer role covers it. A recent Python, pip install foreman-mcp-server.
One command plus credentials — pip install foreman-mcp-server, then supply credentials
USE CASES
Search by location, by operating system or by environment, then read the one that matches in full.
Read the host and its status rather than opening the Foreman web UI.
Search on a fact name and value, or by hostgroup, and count from a filtered list instead of the whole estate.
List the organisations, locations and hostgroups first, so later searches use names that exist.
List the subnets and domains, then read the specific one, and check the smart proxy that serves it.
Read the operating systems, architectures and media on offer, then the content view, repository and lifecycle environment behind them.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
get_architectureGet detailed information about a specific architecture.
get_content_viewGet detailed information about a specific content view.
get_domainGet detailed information about a specific domain.
get_hostGet detailed information about a specific host
get_host_statusGet status information for a specific host.
get_lifecycle_environmentGet detailed information about a specific lifecycle environment.
get_mediaGet detailed information about a specific installation media.
get_operatingsystemGet detailed information about a specific operating system.
get_repositoryGet detailed information about a specific repository.
get_smart_proxyGet detailed information about a specific smart proxy.
get_subnetGet detailed information about a specific subnet.
list_architecturesList all architectures in Foreman.
CONTEXT OPTIMIZATION: Only 6 architectures total. Safe for context window.
list_content_viewsList 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.
list_domainsList all domains in Foreman.
CONTEXT OPTIMIZATION: DNS domains typically <30. Safe for context window.
list_hostgroupsList all hostgroups in Foreman.
CONTEXT OPTIMIZATION: Can be 50+ hostgroups. Consider using search if available.
list_hostsList 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".
list_lifecycle_environmentsList 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.
list_locationsList all locations in Foreman.
CONTEXT OPTIMIZATION: Typically <30 locations. Safe for context window.
list_mediaList all installation media in Foreman.
CONTEXT OPTIMIZATION: 22 total media entries. Safe for context window.
list_operatingsystemsList all operating systems in Foreman.
CONTEXT OPTIMIZATION: 67 total OS entries. Use per_page=5-10 for quick overview.
list_organizationsList all organizations in Foreman.
CONTEXT OPTIMIZATION: Typically <20 organizations. Safe for context window.
list_repositoriesList 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.
list_smart_proxiesList all smart proxies in Foreman.
CONTEXT OPTIMIZATION: Smart proxies typically <20. Safe for context window.
list_subnetsList all subnets in Foreman.
CONTEXT OPTIMIZATION: Network subnets typically <50. Safe for context window.
search_hosts_by_environmentSearch hosts by environment (e.g., 'production', 'development').
CONTEXT OPTIMIZATION: Returns max 10 results by default.
search_hosts_by_factSearch hosts by a specific fact name and value.
CONTEXT OPTIMIZATION: Returns max 10 results by default.
search_hosts_by_hostgroupSearch hosts by hostgroup name or title.
CONTEXT OPTIMIZATION: Returns max 10 results by default.
search_hosts_by_locationSearch 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_osSearch 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.
BEFORE YOU INSTALL
29 tools when we connected. All tools are read-only; none creates, updates, reboots or deletes, and the documentation recommends Foreman's built-in Viewer role.
The documented client runs the server on your machine.
CONTEXT COST
Rated by the size of the 29 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
pip install foreman-mcp-server{
"mcpServers": {
"foreman-mcp-server": {
"command": "foreman-mcp-server",
"env": {
"FOREMAN_URL": "<YOUR_FOREMAN_URL>",
"FOREMAN_USERNAME": "<YOUR_FOREMAN_USERNAME>",
"FOREMAN_PASSWORD": "<YOUR_FOREMAN_PASSWORD>",
"FOREMAN_VERIFY_SSL": "true"
}
}
}
}