# MCP Server Documentation Il MCP (Model Context Protocol) Server fornisce metodi per LLM per connettersi e recuperare dati dalle infrastrutture. ## Base URL ``` https://docs.datacenter.local/mcp ``` ## Metodi Disponibili ### GET /methods Lista tutti i metodi disponibili con descrizione e parametri. ### GET /connections Lista connessioni configurate (senza credenziali). ## Execution Endpoints ### POST /execute/ssh Esegui comando SSH su device. **Request:** ```json { "connection_name": "switch-core-01", "command": "show version" } ``` ### POST /execute/snmp/get Query SNMP GET su OID specifico. **Request:** ```json { "connection_name": "ups-01", "oid": ".1.3.6.1.2.1.33.1.2.1.0" } ``` ### POST /execute/api Esegui richiesta API REST. **Request:** ```json { "connection_name": "vcenter-prod", "endpoint": "/rest/vcenter/vm", "method": "GET" } ``` ## Esempi ### Python con MCP ```python import asyncio from mcp_client import MCPClient async def get_infrastructure_data(): client = MCPClient('https://docs.datacenter.local/mcp') # Get VMware VMs vms = await client.vmware_get_vms('vcenter-prod') # Get switch config config = await client.cisco_get_interfaces('switch-core-01') # Get UPS status ups_status = await client.ups_get_status('ups-01') return { 'vms': vms, 'network': config, 'power': ups_status } data = asyncio.run(get_infrastructure_data()) ``` ## Security - Accesso limitato a rete management - Read-only operations only - Audit logging completo - Rate limiting per connessione