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.
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
- Log in to your PatchMon instance as an administrator.
- Go to Settings → Integrations → Auto-Enrollment & API.
- Click New Token, choose usage type API.
- Grant scope
host: get(adddeletetoo if you want thedelete_hosttool to work). - 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 officialmcppackage'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 havemcpinstalled for the client side, add it withpip 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_hostis destructive and irreversible. It requires an explicitconfirm=trueargument in addition to thehost:deletescope, 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
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.