Spectre MCP
Provides read-only tools to inspect Docker daemon health, container inventory, container health and restart counts, container details, bounded logs, images, and volumes.
Provides read-only inspection and diagnostics of Linux hosts, including CPU, memory, load, uptime, disk and inode usage, OS/kernel information, network interfaces, systemd services, security posture, and backups.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Spectre MCP diagnose why the api service keeps restarting and show recent logs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Spectre MCP
Spectre MCP is a read-only infrastructure operations MCP server for AI assistants. It gives models a secure, structured way to inspect and diagnose Linux hosts, Docker, systemd services, security posture, and backups.
Table of contents
Related MCP server: linux-diag-mcp
Features
Host: CPU, memory, load, uptime, disk usage, inode exhaustion, OS/kernel info, network interfaces
Docker: daemon health, container inventory, health/restart counts, inspection, bounded logs, images, volumes
Services: systemd status, journal search, failure diagnostics
Security: listening ports, firewall status, SSH audit, TLS certificate expiry, baseline checks
Backups: status, age, destination verification, Restic repository status
Diagnostics:
incident_diagnose,security_baseline,backup_audit,infrastructure_report
Security model
Read-only by default — no write or remediation operations
No unrestricted shell execution or arbitrary Python evaluation
Allowlisted commands with validated, non-shell parameters
Secret redaction (passwords, tokens, API keys, common patterns)
Path traversal prevention and safe filesystem access
Command timeouts and bounded output
Audit logging of every tool invocation
Permission architecture ready for future controlled remediation
Installation
git clone https://github.com/bigwalkdoe/spectre-mcp.git
cd spectre-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .Copy the example environment file and adjust:
cp .env.example .envConfiguration
All settings are environment-based (prefix SPECTRE_):
Variable | Default | Description |
|
| Enforce read-only operation |
| (empty) | Comma-separated allowlist |
| (empty) | Comma-separated allowlist |
|
| Output truncation limit |
|
| Subprocess timeout |
|
| Audit log location |
|
| Logging level |
| (empty) | Restic repository path |
| (empty) | Comma-separated backup paths |
| (empty) | Comma-separated certificate paths |
Running the server
spectre-mcpThe server uses stdio transport and exposes no network port.
OpenCode configuration
{
"mcp": {
"spectre-mcp": {
"type": "local",
"command": ["spectre-mcp"],
"environment": {
"SPECTRE_READ_ONLY_MODE": "true"
},
"enabled": true
}
}
}Docker deployment
Build:
docker build -t spectre-mcp .Run over stdio:
docker run -i --rm spectre-mcpdocker-compose.yml provides a default no-port deployment. Docker socket and host filesystem mounts are not enabled by default — document and enable them only in trusted environments.
Testing
pytest
python scripts/smoke_test.pyLint and type check:
ruff check .
mypy spectre_mcpProject structure
spectre_mcp/
├── server.py
├── config.py
├── security/
├── tools/
├── integrations/
├── models/
└── audit/Limitations
Read-only MVP; remediation is not implemented
Some integrations require system utilities and permissions
Host metrics inside containers reflect the container unless host
/procis mounted
Contributing
Contributions are welcome. Please run tests, linting, and type checks before submitting a pull request.
License
Released under the MIT License.
Available Tools
26 toolsbackup_ageBackup AgeC
Return backup age for configured destinations.
Inputs: name. Returns: result
backup_auditBackup AuditC
Audit backup posture and produce structured findings.
Inputs: no named parameters. Returns: title, summary, findings, hypotheses, +3 more
backup_destination_verificationBackup Destination VerificationC
Verify a backup destination path.
Inputs: destination (required). Returns: object
backup_statusBackup StatusB
Return backup status for configured destinations.
Inputs: no named parameters. Returns: result
docker_container_healthDocker Container HealthC
Inspect health and state of a specific container.
Inputs: identifier (required). Returns: id, pid, dead, name, +13 more
docker_container_inspectDocker Container InspectB
Inspect a container's configuration and runtime details (secrets redacted).
Inputs: identifier (required). Returns: id, name, image, state, +6 more
docker_container_logsDocker Container LogsC
Return bounded logs for a container.
Inputs: identifier (required), tail. Returns: result
docker_containersDocker ContainersB
List Docker containers with health and restart counts.
Inputs: all_containers. Returns: result
docker_daemon_healthDocker Daemon HealthB
Check Docker daemon health and container counts.
Inputs: no named parameters. Returns: error, images, warnings, available, +4 more
docker_imagesDocker ImagesB
List Docker images.
Inputs: no named parameters. Returns: result
docker_volumesDocker VolumesB
List Docker volumes.
Inputs: no named parameters. Returns: result
firewall_statusFirewall StatusB
Return firewall status and rules.
Inputs: no named parameters. Returns: error, rules, active, backend, +2 more
host_cpu_memoryHost Cpu MemoryA
Return CPU, memory, load, and uptime information for the host.
Inputs: no named parameters. Returns: cpu_count, cpu_percent, swap_percent, memory_percent, +9 more
host_disk_usageHost Disk UsageB
Return disk usage and inode information for mounted filesystems.
Inputs: no named parameters. Returns: result
host_network_interfacesHost Network InterfacesB
Return network interface status and addresses.
Inputs: no named parameters. Returns: result
host_os_infoHost Os InfoA
Return operating system and kernel information.
Inputs: no named parameters. Returns: node, distro, kernel, system, +5 more
incident_diagnoseIncident DiagnoseC
Diagnose an incident using host, Docker, service, and security evidence.
Inputs: symptom, container, service_name. Returns: title, summary, findings, hypotheses, +3 more
infrastructure_reportInfrastructure ReportB
Generate a consolidated infrastructure report.
Inputs: no named parameters. Returns: title, summary, findings, hypotheses, +3 more
journal_searchJournal SearchC
Search systemd journal logs with optional filters.
Inputs: lines, query, since, service. Returns: result
listening_portsListening PortsB
List listening network ports and owning processes.
Inputs: no named parameters. Returns: result
restic_statusRestic StatusB
Return Restic repository status when configured.
Inputs: no named parameters. Returns: error, reachable, snapshots, repository, +2 more
security_baselineSecurity BaselineC
Run basic Linux security baseline checks.
Inputs: no named parameters. Returns: score, checks, findings, recommendations
service_failure_diagnosticsService Failure DiagnosticsC
Diagnose failures for a systemd service.
Inputs: service_name (required). Returns: status, service, likely_cause, recent_failures, +1 more
service_statusService StatusC
Return systemd service status.
Inputs: service_name (required). Returns: name, error, since, state, +7 more
ssh_config_auditSsh Config AuditB
Audit SSH server configuration.
Inputs: no named parameters. Returns: raw, port, findings, permit_root_login, +2 more
tls_cert_expiryTls Cert ExpiryC
Check TLS certificate expiry for a host or local file.
Inputs: host, path, port. Returns: error, issuer, source, expired, +4 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Most tools target a distinct resource (host, docker, systemd, backup), but there is real overlap between aggregate tools (incident_diagnose, infrastructure_report, backup_audit, security_baseline) and the granular tools that feed them, so an agent may pick the summary tool when a specific probe was intended. The backup family is especially dense (backup_status, backup_age, backup_audit, backup_destination_verification, restic_status), with status vs. age being a subtle distinction.
All names are snake_case noun/verb phrases with a predictable domain prefix (host_*, docker_*, service_*, backup_*). A few tools drop the prefix convention (listening_ports, firewall_status, tls_cert_expiry, journal_search), which is a minor inconsistency but still readable and unambiguous.
At 26 tools the surface is just over the heavy threshold, and the backup/security area carries several closely related variants that could be consolidated. The count is defensible for broad infrastructure observability, but it sits at the upper edge of what stays easy to navigate.
Coverage is strong for a read-only diagnostic server: host resources, Docker objects and logs, systemd/journal, network, firewall/SSH/TLS security, backups, and roll-up reports. Gaps remain around process-level inspection (top processes, open files), user/account and package/patch auditing, and non-journal log sources, but these are workable omissions.
Maintenance
Related MCP Connectors
Read-only Linux server and Docker monitoring for AI assistants: CPU, memory, disk, network.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Real Linux labs your AI agent deploys, routes and runs, with domains, TLS, DBs and an audit log.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables LLMs and AI agents to perform defensive security posture assessments, privilege escalation surface audits, and post-quantum cryptography readiness checks through read-only diagnostic tools.MIT
- AlicenseAqualityBmaintenanceLets an AI assistant inspect a Linux machine through ten fixed read-only tools covering load, memory, disks, processes, ports, interfaces, systemd units, the journal, and allowlisted log files. All output is size-capped, control-character-stripped and secret-redacted, and nothing in the package can write to the system.10MIT
- AlicenseAqualityBmaintenanceGives AI agents safe, bounded, non-blocking access to Linux sysadmin inspection tasks, including CPU, RAM and disk healthchecks, memory-safe log tailing with regex filtering, and user-level systemd service and timer auditing. All operations run without sudo or unrestricted root shells, avoiding interactive pager hangs and context window flooding.41MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and assistants to inspect live system telemetry, check TCP port connectivity, audit environment variables for leaked secrets, analyze and summarize log files, and list Docker containers — all with token-efficient, compressed output.1MIT