MCP.so
登录
I

Infra MCP

@esp4ce

关于 Infra MCP

Read-only MCP server for on-prem Linux VMs and PostgreSQL over SSH — service health, logs, DB state, and schema exploration without terminal access.

基本信息

分类

开发工具

传输方式

stdio

发布者

esp4ce

提交者

esp4ce

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "infra-mcp": {
      "command": "infra-mcp",
      "args": [
        "run"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Infra MCP?

Infra MCP provides read-only Model Context Protocol access to on-prem Linux VMs and PostgreSQL databases over SSH. It lets agents check service health, retrieve bounded logs, inspect database state, and explore table schemas without direct terminal access, using an allowlist-gated and fully audited remote command layer.

How to use Infra MCP?

Install with uv tool install infra-mcp or pip install infra-mcp. Generate a starter config from ~/.ssh/config with infra-mcp generate-config, set up read-only PostgreSQL roles with infra-mcp setup, verify reachability with infra-mcp test, and discover services/logs/databases with infra-mcp discover --in-place. Then run with infra-mcp run and register it as a stdio MCP server in your client (e.g., Claude Code, Cursor).

Key features of Infra MCP

  • Read‑only SSH access to Linux VMs and PostgreSQL databases
  • Allowlist‑gated commands, services, and log file paths
  • All remote operations written to an append‑only JSONL audit log
  • Server‑side output bounds (200 log lines, 100 DB rows, 200 tables max)
  • Schema caching with configurable TTL and manual refresh
  • Read‑only DB transactions using a dedicated PostgreSQL role

Use cases of Infra MCP

  • An agent checks the health of systemd services across a fleet of on‑prem VMs
  • An agent retrieves the last N lines of an application log file, filtered by a pattern
  • An agent inspects database connection counts, waiting locks, and long‑running queries
  • An agent explores table schemas (columns, types, primary keys, foreign keys) without a GUI
  • An agent runs bounded SELECT queries to answer production questions

FAQ from Infra MCP

What runtime dependencies does Infra MCP require?

Infra MCP is a Python package installable via uv or pip. It requires an existing SSH configuration (typically ~/.ssh/config) and network reachability to target VMs.

How does Infra MCP authenticate to VMs and databases?

VM access uses SSH keys as configured in the user’s SSH config. Database access runs under a dedicated read‑only PostgreSQL role created by the infra-mcp setup command.

What output limits does Infra MCP enforce?

All tool outputs are bounded server‑side: log lines (200), DB rows (100), and table/column listings (200). Truncation is always flagged with a -- TRUNCATED: marker.

Can Infra MCP write to databases or modify the system?

No. Infra MCP is read‑only by design: all database queries run inside a READ ONLY transaction using a read‑only PostgreSQL role, and SSH commands are restricted to an explicitly configured allowlist.

Where does Infra MCP store its audit log?

Every remote operation is appended to a local JSONL audit log. The audit log can be queried with the get_audit_log tool to review recent activity.

评论

开发工具 分类下的更多 MCP 服务器