Infra MCP logo

Infra MCP

by esp4ce

Read-only access to Linux VM services, logs, and PostgreSQL diagnostics over SSH through MCP.

Install Infra MCP

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "esp4ce-infra-mcp": {
      "command": "uvx",
      "args": [
        "infra-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio esp4ce-infra-mcp -- uvx infra-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

uvx infra-mcp

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The esp4ce/infra-mcp MCP server provides read-only MCP access to on-prem Linux VMs and PostgreSQL databases over SSH. It exposes tools for service health, bounded journald and file logs, database status, read-only queries, schema inspection, and audit history. Remote operations are restricted by per-VM allowlists, database queries run in read-only transactions, and activity is recorded in a local append-only JSONL log. Use it when an agent needs infrastructure visibility without direct terminal access.

Use cases

  • Check service health across configured Linux VMs
  • Review bounded journald output for a failing service
  • Inspect PostgreSQL locks and long-running queries
  • Explore table schemas without database write access
  • Review recent infrastructure audit entries

Key features

  • Read-only Linux VM inspection over SSH
  • Systemd, journald, and allowlisted log-file access
  • PostgreSQL health checks and bounded SELECT queries
  • Table and relationship schema inspection
  • Per-VM allowlists and append-only JSONL auditing
  • Server-side output limits with truncation markers

Tools10

What Infra MCP lets your agent do. Expand a tool for its parameters.

Self-reported~149 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

15/15 checks healthy over the last 118d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · infra-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit5mo agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed10Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Infra MCP works

What esp4ce/infra-mcp MCP server does

The esp4ce/infra-mcp MCP server connects an MCP client to on-prem Linux virtual machines and PostgreSQL databases through SSH. It is designed for inspection rather than administration: agents can check service state, review bounded log output, examine database health, run constrained read queries, and inspect table structure without receiving terminal access.

VM-oriented tools report reachability, watched services, systemd state, uptime, recent service output, journald entries, and selected log-file lines. Database tools report connection counts, waiting locks, long-running query counts, table names, column definitions, keys, and foreign keys. The server also exposes recent entries from its local audit log.

How it works

An MCP client communicates with the process over stdio. The process then uses SSH to reach configured VMs and query the permitted services, log paths, and PostgreSQL databases. The get_infra_overview tool combines service states and database health for a selected VM, while the other tools provide narrower inspections.

The esp4ce/infra-mcp MCP server applies limits on returned data: logs are capped at 200 lines, database query results at 100 rows, and table or column listings at 200 entries. Responses identify truncation with a -- TRUNCATED: marker. Schema results from list_tables and describe_table are cached in memory for the configured cache lifetime, which defaults to 24 hours; callers can request a refresh.

Every remote operation is checked against a per-VM allowlist before a network call. Log paths are constrained to configured directories, with parent-directory traversal blocked. PostgreSQL queries run under a read-only role inside a READ ONLY transaction. Operations are appended to a local JSONL audit log.

Setup and configuration

Install the package with either pip install infra-mcp or uv tool install infra-mcp. Configuration is read from ~/.infra-mcp/infra-mcp.yaml by default. A starter file can be generated from the local SSH configuration:

bash
infra-mcp generate-config -o ~/.infra-mcp/infra-mcp.yaml

The configuration path can be changed with --config or INFRA_MCP_CONFIG. The setup workflow includes commands for creating read-only PostgreSQL roles, testing VM reachability, and discovering services, log directories, and databases. Discovery can update the configuration in place:

bash
infra-mcp setup
infra-mcp test
infra-mcp discover --in-place

Start the process with infra-mcp run, then register it as a stdio MCP server in a compatible client. Cursor is explicitly shown as a supported registration target in the project documentation. The package also provides infra-mcp --version. Update checks can be disabled with INFRA_MCP_NO_UPDATE_CHECK=1.

Tools and capabilities

The esp4ce/infra-mcp MCP server exposes these read-only capabilities:

  • List VM reachability and watched services.
  • Combine service and database health for one VM.
  • Read systemd status, uptime, and the last five log lines.
  • Retrieve severity-filtered journald output.
  • Read the last requested lines from an allowed log file with optional grep filtering.
  • Inspect PostgreSQL connections, waiting locks, and long-running queries.
  • Run bounded caller-provided SELECT statements.
  • List database tables and describe columns, types, primary keys, and foreign keys.
  • Retrieve recent local audit-log entries.

Limitations and notes

The server is read-only for the documented infrastructure and database operations. It does not provide general terminal access, unrestricted file access, or database mutation tools. Results are deliberately bounded, and cached schema data may not reflect changes until the cache expires or a refresh is requested. Access also depends on the configured VM, service, log, database, and SSH allowlists.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Infra MCP

Install it with `pip install infra-mcp` or `uv tool install infra-mcp`.

Create `~/.infra-mcp/infra-mcp.yaml`, or generate a starter configuration with `infra-mcp generate-config -o ~/.infra-mcp/infra-mcp.yaml`. Use `--config` or `INFRA_MCP_CONFIG` to select another path.

Yes. The documentation describes registering `infra-mcp run` as a stdio MCP server in Cursor.

No. The documented database access uses a read-only role and `READ ONLY` transactions; the query tool accepts bounded caller-supplied `SELECT` statements.

Set `INFRA_MCP_NO_UPDATE_CHECK=1`.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewInfra MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/esp4ce-infra-mcp?style=directory)](https://allmcps.com/mcp/esp4ce-infra-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/esp4ce-infra-mcp"><img src="https://allmcps.com/api/badge/esp4ce-infra-mcp?style=directory" alt="Infra MCP on AllMCPs" /></a>