Skip to main content

Dell PowerEdge Fan Manager + MCP Server + A2A Agent

Project description

Fan Manager

CLI | MCP | Agent

PyPI - Version MCP Server PyPI - Downloads GitHub Repo stars GitHub forks GitHub contributors PyPI - License GitHub GitHub last commit (by committer) GitHub pull requests GitHub closed pull requests GitHub issues GitHub top language GitHub language count GitHub repo size PyPI - Wheel PyPI - Implementation

Version: 1.5.0

Documentation — Installation, deployment, and usage across the CLI and MCP interfaces, plus the integrated A2A agent server, are maintained in the official documentation.


Overview

Fan Manager controls the fan speed of Dell PowerEdge servers based on CPU temperature. It is a local tool: it reads temperatures via lm-sensors (sensors -j) and drives the server's BMC via ipmitool raw commands. It ships as a CLI, a Model Context Protocol (MCP) server, and an integrated A2A agent for the agent-utilities ecosystem.

Because fan control happens against the local host, no service URL or token is required — the connector degrades to a no-op/local config for authentication.


Key Features

  • Temperature-Driven Curve: Logarithmic CPU-temperature-to-fan-speed scaling with configurable min/max bounds and intensity.
  • Consolidated Action-Routed MCP Tools: Two togglable tool modules (temperature, fan-control) minimize token overhead in LLM contexts.
  • Fail-Safe Defaults: On a temperature read error during automatic control, the fans default to maximum.
  • Integrated Agent: Built-in Pydantic AI agent supporting the Agent Control Protocol (ACP) and Web UI (AG-UI).

CLI

The classic continuous service that polls temperature and adjusts the fans:

fan-manager --intensity 5 --cold 50 --warm 80 --slow 5 --fast 100 --poll-rate 24
Flag Meaning
-i, --intensity Temperature power intensity (scales logarithmically, 0-10)
-c, --cold Minimum temperature for fan scaling (°C)
-w, --warm Maximum temperature for fan scaling (°C)
-s, --slow Minimum fan speed (0-100)
-f, --fast Maximum fan speed (0-100)
-p, --poll-rate Temperature poll rate in seconds

Requires ipmitool and lm-sensors installed on the host, and privileges to issue raw IPMI commands to the BMC.


MCP

This server uses dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.

Available MCP Tools

Auto-generated from the live MCP server — do not edit by hand.

Condensed action-routed tools (default — MCP_TOOL_MODE=condensed)

MCP Tool Toggle Env Var Description
fan_manager_fan_control FAN_CONTROLTOOL Control Dell PowerEdge fan speed via IPMI (CONCEPT:FAN-002).
fan_manager_temperature TEMPERATURETOOL Read CPU/sensor temperature (CONCEPT:FAN-001).
fan_manager_power / _sensors / _sel / _sol / _bmc / _raw IPMITOOL Full IPMI/BMC control — power, chassis, sensors, SEL, Serial-over-LAN, LAN/user config, raw — in-band or out-of-band (lanplus) (CONCEPT:FAN-003..008).

Verbose 1:1 API-mapped tools (MCP_TOOL_MODE=verbose or both)

5 per-operation tools — one per public API method (click to expand)
MCP Tool Toggle Env Var Description
fan_manager_auto_set_fan_speed APITOOL Adjust fan speed automatically from the current temperature (CONCEPT:FAN-002).
fan_manager_get_core_temp APITOOL Return the highest core temperature from a sensors mapping (CONCEPT:FAN-001).
fan_manager_get_temp APITOOL Return the current highest CPU core temperature (CONCEPT:FAN-001).
fan_manager_run_service APITOOL Run the continuous fan-management service loop (CONCEPT:FAN-002).
fan_manager_set_fan APITOOL Set the fan to a fixed level (0-100) (CONCEPT:FAN-002).

2 action-routed tool(s) (default) · 5 verbose 1:1 tool(s). Each is enabled unless its <DOMAIN>TOOL toggle is set false; MCP_TOOL_MODE selects the surface (condensed default · verbose 1:1 · both). Auto-generated — do not edit.

Dynamic Tool Selection & Visibility

This MCP server supports dynamic toolset selection and visibility filtering at runtime, so you can restrict the exposed tools and avoid blowing up the LLM's context window. Configure filtering via:

  • CLI Arguments: --tools / --toolsets (and --disabled-tools / --disabled-toolsets).
  • Environment Variables: MCP_ENABLED_TOOLS / MCP_DISABLED_TOOLS, MCP_ENABLED_TAGS / MCP_DISABLED_TAGS.
  • HTTP Headers: x-mcp-enabled-tools / x-mcp-disabled-tags, etc.
  • Query Parameters: ?tools=tool1,tool2 or ?tags=fan-control.

MCP Configuration Examples

Install the slim [mcp] extra. All examples install fan-manager[mcp] — the MCP-server extra that pulls only the FastMCP / FastAPI tooling (agent-utilities[mcp]). It deliberately excludes the heavy agent runtime (pydantic-ai, the epistemic-graph engine, dspy, llama-index), so uvx / container installs are far smaller. Use the full [agent] extra only when you need the integrated Pydantic AI agent.

stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)

{
  "mcpServers": {
    "fan-manager-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "fan-manager[mcp]",
        "fan-manager-mcp"
      ],
      "env": {
        "MCP_TOOL_MODE": "condensed",
        "ENABLE_DELEGATION": "False",
        "FAN_CONTROLTOOL": "True",
        "IPMITOOL": "True",
        "IPMITOOL_PATH": "ipmitool",
        "SENSORS_PATH": "sensors",
        "TEMPERATURETOOL": "True"
      }
    }
  }
}

Streamable-HTTP Transport (networked / production)

{
  "mcpServers": {
    "fan-manager-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "fan-manager[mcp]",
        "fan-manager-mcp",
        "--transport",
        "streamable-http",
        "--port",
        "8000"
      ],
      "env": {
        "TRANSPORT": "streamable-http",
        "HOST": "0.0.0.0",
        "PORT": "8000",
        "MCP_TOOL_MODE": "condensed",
        "ENABLE_DELEGATION": "False",
        "FAN_CONTROLTOOL": "True",
        "IPMITOOL": "True",
        "IPMITOOL_PATH": "ipmitool",
        "SENSORS_PATH": "sensors",
        "TEMPERATURETOOL": "True"
      }
    }
  }
}

Alternatively, connect to a pre-deployed Streamable-HTTP instance by url:

{
  "mcpServers": {
    "fan-manager-mcp": {
      "url": "http://localhost:8000/fan-manager-mcp/mcp"
    }
  }
}

Deploying the Streamable-HTTP server via Docker:

docker run -d \
  --name fan-manager-mcp-mcp \
  -p 8000:8000 \
  -e TRANSPORT=streamable-http \
  -e HOST=0.0.0.0 \
  -e PORT=8000 \
  -e MCP_TOOL_MODE=condensed \
  -e ENABLE_DELEGATION=False \
  -e FAN_CONTROLTOOL=True \
  -e IPMITOOL=True \
  -e IPMITOOL_PATH=ipmitool \
  -e SENSORS_PATH=sensors \
  -e TEMPERATURETOOL=True \
  knucklessg1/fan-manager:mcp

Auto-generated from the code-read env surface (MCP_TOOL_MODE + package vars) — do not edit.

Additional Deployment Options

fan-manager can also run as a local container (Docker / Podman / uv) or be consumed from a remote deployment. The Deployment guide has full, copy-paste mcp_config.json for all four transports — stdio, streamable-http, local container / uv, and remote URL:

  • Local container / uv — launch the server from mcp_config.json via uvx, docker run, or podman run, or point at a local streamable-http container by url.
  • Remote URL — connect to a server deployed behind Caddy at http://fan-manager-mcp.arpa/mcp using the "url" key.

Agent

This repository features a fully integrated Pydantic AI Graph Agent. It communicates over the Agent Control Protocol (ACP) and interacts with the Agent Web UI (AG-UI) and Terminal interface.

Running the Agent CLI

fan-manager-agent --provider openai --model-id gpt-4o

Docker Compose Orchestration

The docker/agent.compose.yml configures the Agent, Web UI, and Terminal Interface alongside the MCP server. See docs/deployment.md for the full Compose stack.


Environment Variables

Package environment variables

Variable Example Description
HOST 0.0.0.0
PORT 8000
TRANSPORT stdio options: stdio, streamable-http, sse
AUTH_TYPE none auth strategy for the agent-utilities MCP factory
FASTMCP_LOG_LEVEL INFO
TEMPERATURETOOL True register the temperature tool domain (CONCEPT:FAN-001)
FAN_CONTROLTOOL True register the fan-control tool domain (CONCEPT:FAN-002)
IPMITOOL True register the full IPMI/BMC tool domain (CONCEPT:FAN-003..008)
IPMITOOL_PATH ipmitool Fan Manager drives the host's BMC and lm-sensors locally.
SENSORS_PATH sensors
ENABLE_OTEL True
OTEL_EXPORTER_OTLP_ENDPOINT http://localhost:8080/api/public/otel
OTEL_EXPORTER_OTLP_PUBLIC_KEY pk-...
OTEL_EXPORTER_OTLP_SECRET_KEY sk-...
OTEL_EXPORTER_OTLP_PROTOCOL http/protobuf
ENABLE_DELEGATION False OIDC Bearer-token delegation (inert by default — Fan Manager is a local tool).
EUNOMIA_TYPE none options: none, embedded, remote
EUNOMIA_POLICY_FILE mcp_policies.json
EUNOMIA_REMOTE_URL http://eunomia-server:8000

Inherited agent-utilities variables (apply to every connector)

Variable Example Description
MCP_TOOL_MODE condensed Tool surface: condensed
MCP_ENABLED_TOOLS Comma-separated tool allow-list
MCP_DISABLED_TOOLS Comma-separated tool deny-list
MCP_ENABLED_TAGS Comma-separated tag allow-list
MCP_DISABLED_TAGS Comma-separated tag deny-list
MCP_CLIENT_AUTH Outbound MCP auth (oidc-client-credentials for fleet calls)
OIDC_CLIENT_ID OIDC client id (service-account auth)
OIDC_CLIENT_SECRET OIDC client secret (service-account auth)
DEBUG False Verbose logging
PYTHONUNBUFFERED 1 Unbuffered stdout (recommended in containers)
MCP_URL http://localhost:8000/mcp URL of the MCP server the agent connects to
PROVIDER openai LLM provider for the agent
MODEL_ID gpt-4o Model id for the agent
ENABLE_WEB_UI True Serve the AG-UI web interface

18 package + 14 inherited variable(s). Auto-generated from .env.example + the shared agent-utilities set — do not edit.

Fan Manager reads the following environment variables (all optional — every one has a safe default). They can be set in the process environment, in a .env file (auto-loaded), or in the MCP client's env block. See .env.example for a ready-to-copy template.

Variable Default Scope Description
HOST 0.0.0.0 MCP server Bind address for streamable-http/sse transports.
PORT 8000 MCP server Bind port for streamable-http/sse transports.
TRANSPORT stdio MCP server Transport: stdio, streamable-http, or sse.
AUTH_TYPE none MCP server Auth strategy passed to the agent-utilities MCP factory (none for this local tool).
FASTMCP_LOG_LEVEL INFO MCP server Log verbosity for the underlying FastMCP server.
TEMPERATURETOOL True Tool toggle Register the temperature tool domain (CONCEPT:FAN-001).
FAN_CONTROLTOOL True Tool toggle Register the fan-control tool domain (CONCEPT:FAN-002).
IPMITOOL True Tool toggle Register the full IPMI/BMC tool domain (CONCEPT:FAN-003..008).
IPMITOOL_PATH ipmitool Local tooling Path/name of the ipmitool binary used to drive the BMC.
SENSORS_PATH sensors Local tooling Path/name of the lm-sensors binary used to read temperatures.
ENABLE_OTEL True Observability Enable OpenTelemetry/logfire instrumentation for the agent.
ENABLE_DELEGATION False Security Enable OIDC Bearer-token delegation middleware (inert by default — Fan Manager is a local tool).
EUNOMIA_TYPE none Security Eunomia policy mode: none, embedded, or remote.
EUNOMIA_POLICY_FILE mcp_policies.json Security Path to the Eunomia policy file when EUNOMIA_TYPE is set.

Build-time only (not application config): UV_COMPILE_BYTECODE, NO_COLOR, and TERM are consumed by the build/runtime environment (Docker image build, terminal rendering) and are not read by the application code.


Security & Governance

Built directly upon the enterprise-ready agent-utilities core, standard security parameters are fully supported:

Access Control & Policy Enforcement

  • Eunomia Policies: Fine-grained, policy-driven tool authorization (none, embedded, or remote).
  • OIDC Token Delegation: Optional RFC 8693 token exchange (inert by default — Fan Manager is a local tool).

Runtime Security Grid

Feature Functionality Enablement
Tool Guard Sensitivity inspection with human-in-the-loop validation Enabled by default
Prompt Injection Defense Input scanning, repetition monitoring, and recursive loop blocks Enabled by default
Context Safety Guard Stuck-loop detectors and contextual overflow preemptive alerts Enabled by default

Installation

Pick the extra that matches what you want to run:

Extra Installs Use when
fan-manager[mcp] Slim MCP server only (agent-utilities[mcp] — FastMCP/FastAPI) You only run the MCP server (smallest install / image)
fan-manager[agent] Full agent runtime (agent-utilities[agent,logfire] — Pydantic AI + the epistemic-graph engine) You run the integrated agent
fan-manager[all] Everything (mcp + agent + logfire) Development / both surfaces
# MCP server only (recommended for tool hosting — slim deps)
uv pip install "fan-manager[mcp]"

# Full agent runtime (Pydantic AI + epistemic-graph engine)
uv pip install "fan-manager[agent]"

# Everything (development)
uv pip install "fan-manager[all]"      # or: python -m pip install "fan-manager[all]"

Container images (:mcp vs :agent)

One multi-stage docker/Dockerfile builds two right-sized images, selected by --target:

Image tag Build target Contents Entrypoint
knucklessg1/fan-manager:mcp --target mcp fan-manager[mcp]slim, no engine/pydantic-ai/dspy/llama-index/tree-sitter fan-manager-mcp
knucklessg1/fan-manager:latest --target agent (default) fan-manager[agent]full agent runtime + epistemic-graph engine fan-manager-agent
docker build --target mcp   -t knucklessg1/fan-manager:mcp    docker/   # slim MCP server
docker build --target agent -t knucklessg1/fan-manager:latest docker/   # full agent

docker/mcp.compose.yml runs the slim :mcp server; docker/agent.compose.yml runs the agent (:latest) with a co-located :mcp sidecar.

Knowledge-graph database (epistemic-graph)

The full agent ([agent] / :latest) embeds the epistemic-graph engine (pulled in transitively via agent-utilities[agent]). For production — or to share one knowledge graph across multiple agents — run epistemic-graph as its own database container and point the agent at it instead of embedding it. Deployment recipes (single-node + Raft HA), connection config, and the full database architecture (with diagrams) are documented in the epistemic-graph deployment guide. The slim [mcp] server does not require the database.


Documentation

The complete documentation is published as the official documentation site.

Page Contents
Installation pip, source, extras, prebuilt Docker image
Deployment run the MCP and agent servers, Compose, env config
Usage the MCP tools, the Api facade, the CLI
Overview the action-routed tool surface and architecture
Concepts concept registry (CONCEPT:FAN-*)

Contribute

Contributions are welcome! Please ensure code quality by executing local checks before submitting pull requests:

  • Format code using ruff format .
  • Lint code using ruff check .
  • Validate type-safety with mypy .
  • Execute test suites using pytest

Deploy with agent-os-genesis

This package can be provisioned for you — skill-guided — by the agent-os-genesis universal skill (its single-package deploy mode): it picks your install method, seeds secrets to OpenBao/Vault (or .env), trusts your enterprise CA, registers the MCP server, and verifies it — the same machinery that stands up the whole Agent OS, narrowed to just this package. Ask your agent to "deploy fan-manager with agent-os-genesis".

Install mode Command
Bare-metal, prod (PyPI) uvx fan-manager-mcp · or uv tool install fan-manager
Bare-metal, dev (editable) uv pip install -e ".[all]" · or pip install -e ".[all]"
Container, prod deploy knucklessg1/fan-manager:latest via docker-compose / swarm / podman / podman-compose / kubernetes
Container, dev (editable) deploy docker/compose.dev.yml (source-mounted at /src; edits live on restart)

Secrets are read-existing + seeded via vault_sync — you are only prompted for what's missing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fan_manager-1.6.1.tar.gz (41.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fan_manager-1.6.1-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file fan_manager-1.6.1.tar.gz.

File metadata

  • Download URL: fan_manager-1.6.1.tar.gz
  • Upload date:
  • Size: 41.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for fan_manager-1.6.1.tar.gz
Algorithm Hash digest
SHA256 f46c783c325c41c665334f83f8d2742d68228a04a4580485948ff932880e4144
MD5 8c82c4149cc56ccb506bb43913dff91f
BLAKE2b-256 ff5b69b968bc31d11417a8559e14cc8ff30d1f946c3c7303ea972a8ee06f1589

See more details on using hashes here.

File details

Details for the file fan_manager-1.6.1-py3-none-any.whl.

File metadata

  • Download URL: fan_manager-1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for fan_manager-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7efabdb82ac44900877761785b1bd52d48b03126e8460d5053ffe0a6e21c4924
MD5 abd396cd72330e8725fab1c4de9e9d7b
BLAKE2b-256 3cabdf5d90d003a44e3c75df64793138d283f0dab6e6839887aa75dfb77559db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page