mcp-infra-readonly
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., "@mcp-infra-readonlylist all Ansible hosts"
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.
mcp-infra-readonly
Serveur MCP (Model Context Protocol) Python donnant à Claude Code un accès strictement en lecture à l'infrastructure Epiconcept — logs, état des services, métriques, facts Ansible, état Docker.
Repos liés :
Sandbox Docker Claude Code : https://github.com/senseicoder/claude-sandbox
Principe de sécurité
Zéro écriture : aucun outil ne peut modifier l'état d'un serveur
Double validation :
validation.py(regex strictes + blocage des caractères d'injection) avant toute commande SSHListe blanche : seules les commandes listées dans
config/allowlist.ymlsont exécutables — rechargement à chaud, pas de redémarrage nécessaireFiltre de sortie :
output_filter.pybloque les clés privées, masque les mots de passe/tokens avant retour à ClaudePas de sudo : toutes les commandes s'exécutent avec les droits de l'utilisateur SSH
Transport stdio : le serveur tourne en local, communique via stdin/stdout avec Claude Code
Pas de credentials en dur : la configuration SSH utilise les clés SSH existantes de l'hôte
Related MCP server: MySQL MCP Server
Outils MCP exposés
Outil | Description | Commande SSH sous-jacente |
| Liste les hosts Ansible connus | lecture inventory |
Services | ||
| État d'un service systemd |
|
| Services systemd en état failed |
|
| Top processus CPU/RAM |
|
| Uptime, mémoire, version OS |
|
| Ports TCP en écoute |
|
Logs | ||
| Dernières N lignes d'un log |
|
| Logs systemd via journalctl |
|
| Liste un répertoire de logs |
|
Disque | ||
| Utilisation disque |
|
| Utilisation inodes |
|
Docker | ||
| État des containers |
|
| CPU/RAM des containers (snapshot) |
|
| Logs d'un container |
|
| Config/volumes/réseau d'un container |
|
Ansible | ||
| Facts Ansible d'un host |
|
Installation
pip install -e .Configuration
cp config/hosts.yml.example config/hosts.yml
# Éditer config/hosts.yml avec les hosts réelsL'allowlist (config/allowlist.yml) est rechargée à chaque appel — aucun redémarrage du serveur MCP n'est nécessaire après modification.
Utilisation avec Claude Code
Ajouter dans .mcp.json du projet ou dans ~/.claude/settings.json :
{
"mcpServers": {
"infra": {
"command": "python",
"args": ["-m", "mcp_infra.server"],
"cwd": "/chemin/vers/mcp-infra-readonly"
}
}
}Dans la sandbox Docker, ce MCP est configuré dans config/mcp.json du repo claude-sandbox.
Architecture
mcp-infra-readonly/
├── src/mcp_infra/
│ ├── server.py # point d'entrée MCP — tous les outils déclarés ici
│ ├── config.py # chargement config + allowlist (rechargement à chaud)
│ ├── validation.py # validation paramètres — regex strictes + anti-injection
│ ├── output_filter.py # filtre sortie — BLOCK clés privées, REDACT tokens
│ └── tools/
│ ├── ssh.py # helper SSH lecture seule (asyncssh, request_pty=False)
│ ├── services.py # get_service_status, get_failed_services, get_process_list
│ │ # get_system_info, get_open_ports
│ ├── logs.py # get_log_tail, get_journal, get_disk_usage
│ │ # get_inode_usage, list_log_files
│ ├── docker.py # get_docker_status, get_docker_stats, get_docker_logs
│ │ # get_docker_inspect
│ └── ansible.py # get_ansible_facts, list_hosts
├── config/
│ ├── hosts.yml.example # template — ne pas committer hosts.yml
│ └── allowlist.yml # liste blanche des commandes autorisées (rechargement à chaud)
├── docs/
│ ├── capabilities.md # ce que Claude peut/ne peut pas faire avec ce MCP
│ └── adr/
│ ├── ADR-001-validation-parametres.md
│ ├── ADR-002-filtre-sortie.md
│ └── ADR-003-architecture-allowlist.md
├── tests/
│ └── test_tools.py
└── SECURITY.mdThis server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Read-only MCP server for AIStatusDashboard status, incidents, metrics, and fallback recommendations.
The HubSpot MCP Server acts as a bridge that enables AI assistants and Large Language Models to securely interact with HubSpot CRM data through natural conversation, without requiring users to understand complex API structures. It provides read-only access to standard CRM objects (contacts, companies, deals, tickets, products, invoices, and more) and their associations, secured via OAuth 2.0, allowing AI agents to perform tasks like summarizing deals, fetching company updates, and looking up record changes.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that wraps Docker, Caddy, and GitHub Actions operations on a remote VPS, enabling Claude to take read-then-write-with-confirmation infrastructure actions over SSH with a service allowlist and audit-trail-friendly responses.8MIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server that enables Claude Code to access MySQL databases, allowing safe querying with SELECT, SHOW, DESCRIBE, and EXPLAIN.15 npmMIT
- AlicenseBqualityDmaintenanceMCP server that gives Claude Code real-time visibility into local infrastructure — Docker containers and system health.21MIT
- AlicenseNot gradedqualityDmaintenanceA sandboxed, read-only MCP server that safely exposes system metrics, container diagnostics, and logs to AI agents with intelligent context compression and strict security measures.MIT