Infra MCP
@esp4ce
About 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.
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"infra-mcp": {
"command": "infra-mcp",
"args": [
"run"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
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
SELECTqueries 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.
More Developer Tools MCP servers
Grafana MCP server
grafanaMCP server for Grafana
OpenSumi
opensumiA framework helps you quickly build AI Native IDE products. MCP Client, supports Model Context Protocol (MCP) tools via MCP server.
Unity MCP (Server + Plugin)
IvanMurzakAI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for fr
MCP Inspector
modelcontextprotocolVisual testing tool for MCP servers
Code Index MCP
johnhuang316A Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setup
Comments