patchmon-mcp-server

patchmon-mcp-server

MCP server that connects to PatchMon via its Integration API to query host inventory, patch status, and system details, and optionally delete hosts.

Category
Visit Server

README

PatchMon MCP Server

An MCP (Model Context Protocol) server that connects to a PatchMon instance via its Integration API, so an LLM client (Claude Desktop, Claude Code, etc.) can query host inventory, patch status, and system details, and optionally delete hosts.

Built against PatchMon's documented Integration API: https://docs.patchmon.net/books/patchmon-application-documentation/page/integration-api-documentation

Uses the standalone fastmcp library (v2.x) to implement the MCP server. This is a separate project from, but protocol-compatible with, Anthropic's official mcp Python SDK — any MCP client (Claude Desktop, Claude Code, MCP Inspector) works with it identically.

Tools exposed

Tool Scope needed Description
list_hosts host:get List all hosts, optionally filtered by host group, optionally with inline stats
get_host_stats host:get Package/repo statistics for one host
get_host_info host:get OS, agent version, host groups for one host
get_host_network host:get IP, gateway, DNS, interfaces
get_host_system host:get CPU/RAM/disk/kernel/uptime/reboot status
get_host_packages host:get Installed packages, optionally updates-only
get_host_package_reports host:get Agent check-in report history
get_host_agent_queue host:get Agent job queue + job history
get_host_notes host:get Free-text notes on a host
get_host_integrations host:get Integration status (e.g. Docker)
delete_host host:delete Permanently delete a host (guarded by confirm=true)
get_host_overview host:get Combined info + stats + system in one call
find_hosts_needing_security_updates host:get Hosts with pending security updates

1. Create a PatchMon API credential

  1. Log in to your PatchMon instance as an administrator.
  2. Go to Settings → Integrations → Auto-Enrollment & API.
  3. Click New Token, choose usage type API.
  4. Grant scope host: get (add delete too if you want the delete_host tool to work).
  5. Copy the Token Key (patchmon_ae_...) and Token Secret — the secret is shown only once.

2. Install dependencies

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

3. Configure

The server reads its configuration from environment variables:

Variable Required Default Description
PATCHMON_URL yes Base URL of your PatchMon instance, e.g. https://patchmon.example.com
PATCHMON_API_KEY yes Token key (patchmon_ae_...)
PATCHMON_API_SECRET yes Token secret
PATCHMON_API_VERSION no v1 API version path segment
PATCHMON_VERIFY_SSL no true Set to false to skip TLS verification (dev/self-signed only)
PATCHMON_TIMEOUT no 30 Request timeout in seconds

4. Run standalone (for testing)

export PATCHMON_URL="https://patchmon.example.com"
export PATCHMON_API_KEY="patchmon_ae_abc123"
export PATCHMON_API_SECRET="your_secret_here"
python server.py

The server speaks MCP over stdio, so it's normally launched by an MCP client rather than run interactively.

Note: list_tools.py (a small helper for querying the server's tool list from the command line) uses the official mcp package's client classes (ClientSession, stdio_client). That's independent of which SDK the server is built on — any MCP client can talk to any MCP server. If you don't already have mcp installed for the client side, add it with pip install mcp.

5. Connect it to Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "patchmon": {
      "command": "/absolute/path/to/.venv/bin/python",
      "args": ["/absolute/path/to/server.py"],
      "env": {
        "PATCHMON_URL": "https://patchmon.example.com",
        "PATCHMON_API_KEY": "patchmon_ae_abc123",
        "PATCHMON_API_SECRET": "your_secret_here"
      }
    }
  }
}

Restart Claude Desktop and the patchmon tools will be available.

6. Connect it to Claude Code

claude mcp add patchmon \
  --env PATCHMON_URL=https://patchmon.example.com \
  --env PATCHMON_API_KEY=patchmon_ae_abc123 \
  --env PATCHMON_API_SECRET=your_secret_here \
  -- /absolute/path/to/.venv/bin/python /absolute/path/to/server.py

Notes on safety

  • delete_host is destructive and irreversible. It requires an explicit confirm=true argument in addition to the host:delete scope, as a guard against accidental invocation.
  • Credentials are read from environment variables only — never hard-code them into the server or commit them to version control.
  • Consider restricting the PatchMon API credential to specific IPs and setting an expiration date (see PatchMon's Security Best Practices).

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured