SuperAPI AI Directory

infra-mcp

Read-only access to on-prem Linux VMs and PostgreSQL over SSH: service health, logs, database state and table schemas, with allowlists and an audit log.

Open website

About this tool

Purpose

infra-mcp is a local stdio-mode MCP (Model Context Protocol) server that provides read-only diagnostic access specifically for on-prem Linux virtual machines and PostgreSQL databases. It allows AI agents to connect to remote hosts via SSH to check service health, retrieve bounded logs, view database status, and explore table schemas, without granting the agent terminal access.

Key Capabilities

  • Perform read-only diagnostic operations on on-prem Linux VMs via SSH.
  • Check systemd service health.
  • Retrieve bounded logs (server-side limit of 200 log lines).
  • Check PostgreSQL database status.
  • Explore database table schemas (up to 200 tables/columns).
  • All remote operations are controlled by an allowlist and written to an append-only audit log.
  • All output is bounded server-side (200 log lines, 100 database records, 200 tables/columns), and truncation is always indicated with a -- TRUNCATED: marker.
  • Results of list_tables and describe_table are cached in memory (TTL controlled by schema_cache_ttl_hours , default 24 hours); passing refresh: true forces a live re-read.
  • SSH commands and systemd services are checked against each VM's allowlist before any network call is made.
  • All database queries run as a read-only role within a READ ONLY transaction.
  • Log file paths are resolved against each VM's directory allowlist (blocking .. path traversal).
  • Every remote operation is appended to a local JSONL audit log.

Usage

  1. Copy infra-mcp.yaml.example to ~/.infra-mcp/infra-mcp.yaml and edit it.
  2. The config file path can be overridden via --config or the environment variable INFRA_MCP_CONFIG .
  3. Register it as a stdio MCP server in a client (such as Claude Code, Cursor, etc.) with the command infra-mcp run.
  4. infra-mcp checks PyPI once a day for a new version; if there is a new version, it prints a one-line notice to stderr telling how to upgrade. This check runs in the background, does not block startup, and does not touch stdout.
  5. Use infra-mcp --version to print the installed version.
  6. Set INFRA_MCP_NO_UPDATE_CHECK=1 to completely disable the update check.

Use Cases

Suitable for scenarios requiring read-only diagnostics of on-prem Linux virtual machines and PostgreSQL databases, such as checking service running status, viewing logs, and verifying database status and table schemas. Suitable for teams that want AI agents to safely perform operational diagnostic tasks without terminal access.

Limitations

  • Provides read-only access only; does not support any write or modification operations.
  • Remote operations are restricted by an allowlist; commands, services, or paths not on the allowlist cannot be executed or accessed.
  • Output results have server-side bounds; anything beyond them is truncated and marked.
  • Log file paths are restricted by a directory allowlist; paths outside the allowlist cannot be accessed.
  • Specific installation requirements, supported Python versions, dependencies, and license information are not provided in the material.