1. Conduid
  2. Automation
  3. Foreman MCP Server
MCP server · Automation

Foreman MCP Server

MCP server for Foreman host management and infrastructure automation

Unclaimed MIT last commit 10 months ago automation
53Fair

Scored 12 days ago · breakdown

About Foreman MCP Server

Foreman MCP Server is an MCP server published by InfraMCP in the Automation category: mCP server for Foreman host management and infrastructure automation.

Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/InfraMCP/foreman-mcp-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Foreman MCP Server

Powered by Claude · Grounded in docs

I know everything about Foreman MCP Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 5 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • !Dependencies pinnedNo lockfile. Installs can pull different code over time.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.4.2v0.4.2 - GitHub Actions Overhaul · 6 Oct 2025🚀 GitHub Actions Overhaul New Workflows Comprehensive CI Pipeline - Multi-version Python testing (3.10-3.12), type checking, code formatting, and package building OSV Scanner - Enhanced security scanning for pull requests Enhanced PyPI…
v0.4.1v0.4.1: Critical Hotfix - Lifecycle Environments Organization-Scoping · 3 Oct 2025🚨 Critical Hotfix v0.4.1 This hotfix addresses a critical issue where the lifecycle environments organization-scoping fix was missing from the v0.4.0 PyPI release. 🐛 Issue Fixed The v0.4.0 PyPI package contained the old…
v0.4.0v0.4.0: Comprehensive Context Window Optimizations · 3 Oct 2025🚀 Major Release: Context Window Optimizations This release transforms the Foreman MCP Server from a context-hungry tool into an extremely efficient one, while adding comprehensive OS and Content management capabilities. 🆕 New Features OS…
v0.3.1v0.3.1 · 25 Sep 2025Minor code cleanup Security improvements Implemented automated linting and security checking Pinned versions on dependencies Generates a dependency report now
v0.2.2v0.2.2 · 22 Sep 2025Republish to trigger workflow... Full Changelog: https://github.com/rorymcmahon/foreman-mcp-server/compare/v0.2.1...v0.2.2

README

Foreman MCP Server

Pylint Safety Security Scan Dependency Security Check

MCP server for Foreman host management and infrastructure automation.

Features

  • List and search hosts from Foreman
  • Get detailed host information
  • Search by location, OS, and environment
  • Generic configuration via environment variables

Installation

From PyPI (Recommended)

pip install foreman-mcp-server

From Source

git clone https://github.com/rorymcmahon/foreman-mcp-server.git
cd foreman-mcp-server
pip install -e .

## Configuration

Set the following environment variables:

- `FOREMAN_URL`: Base URL of your Foreman instance (e.g., `https://foreman.example.com`)
- `FOREMAN_USERNAME`: Foreman username
- `FOREMAN_PASSWORD`: **Personal Access Token** (not your web login password - create this in User Administration → Personal Access Tokens)
- `FOREMAN_VERIFY_SSL`: Whether to verify SSL certificates (default: `true`)

### Required Permissions

The user account needs the following minimum permissions to use all MCP server tools:

| Resource Type | Permission | Purpose |
|---------------|------------|---------|
| Host | `view_hosts` | List and search hosts, get host details and status |
| Organization | `view_organizations` | List organizations |
| Location | `view_locations` | List locations |
| Hostgroup | `view_hostgroups` | List and search by hostgroups |
| Subnet | `view_subnets` | List subnets and get subnet details |
| Domain | `view_domains` | List domains and get domain details |
| SmartProxy | `view_smart_proxies` | List smart proxies and get proxy details |

### Recommended Roles

Instead of assigning individual permissions, you can use these built-in roles:

| Role | Description | Recommended For |
|------|-------------|-----------------|
| **Viewer** | Read-only access to most Foreman resources | General monitoring and inventory queries |
| **Ansible Tower Inventory Reader** | Specific permissions for inventory access | Automated systems integration |
| **Organization admin** | Full access within assigned organizations | Organization-specific administration |

**Note**: The "Viewer" role provides the most appropriate permissions for this MCP server's read-only operations.

## MCP Configuration

Add to your MCP client configuration:

```json
{
  "foreman-mcp-server": {
    "command": "foreman-mcp-server",
    "env": {
      "FOREMAN_URL": "https://foreman.example.com",
      "FOREMAN_USERNAME": "your-username",
      "FOREMAN_PASSWORD": "your-password",
      "FOREMAN_VERIFY_SSL": "true"
    }
  }
}

Available Tools

Host Management

  • list_hosts(search, per_page, page) - List hosts with optional search
  • get_host(host_id) - Get detailed host information
  • get_host_status(host_id) - Get status information for a specific host

Host Search Functions

  • search_hosts_by_location(location, per_page) - Search by location
  • search_hosts_by_os(os_name, per_page) - Search by operating system
  • search_hosts_by_environment(environment, per_page) - Search by environment
  • search_hosts_by_hostgroup(hostgroup, per_page) - Search by hostgroup
  • search_hosts_by_fact(fact_name, fact_value, per_page) - Search by custom facts

Infrastructure Information

  • list_organizations(per_page) - List all organizations
  • list_locations(per_page) - List all locations
  • list_hostgroups(per_page) - List all hostgroups
  • list_subnets(per_page) - List all subnets
  • get_subnet(subnet_id) - Get detailed subnet information
  • list_domains(per_page) - List all domains
  • get_domain(domain_id) - Get detailed domain information
  • list_smart_proxies(per_page) - List all smart proxies
  • get_smart_proxy(proxy_id) - Get detailed smart proxy information

OS Management

  • list_operatingsystems(per_page) - List all operating systems
  • get_operatingsystem(os_id) - Get detailed operating system information
  • list_architectures(per_page) - List all architectures
  • get_architecture(arch_id) - Get detailed architecture information
  • list_media(per_page) - List all installation media
  • get_media(media_id) - Get detailed installation media information

Content Management

  • list_content_views(per_page) - List all content views
  • get_content_view(cv_id) - Get detailed content view information
  • list_repositories(per_page) - List all repositories
  • get_repository(repo_id) - Get detailed repository information
  • list_lifecycle_environments(per_page) - List all lifecycle environments
  • get_lifecycle_environment(env_id) - Get detailed lifecycle environment information

Development

pip install -e ".[dev]"
pytest

Support

README fetched from the repository 5 days ago. The original is authoritative.

Questions

About Foreman MCP Server

How do I install Foreman MCP Server?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Foreman MCP Server safe to use with an AI agent?

Its trust score is 53 out of 100 (fair). It passes 4 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Foreman MCP Server still maintained?

The last commit was 10 months ago and 1 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.