Skip to main content
Glama

MCP Domotica Backend

by CrisDeCrisis
models.py1.04 kB
from dataclasses import dataclass, field from typing import Literal, Any @dataclass class Device: """Dispositivo en el sistema.""" id: str type: Literal["light", "thermostat", "fan", "oven"] room: str state: bool | int | dict[str, Any] # bool para luces, int para termostato/ventilador, dict para horno def to_dict(self) -> dict: """Convierte a diccionario para serialización.""" return { "id": self.id, "type": self.type, "room": self.room, "state": self.state } @dataclass class Room: """Habitación que contiene dispositivos.""" name: str type: str # comedor, cocina, baño, living, dormitorio devices: list[str] = field(default_factory=list) def to_dict(self) -> dict: """Convierte a diccionario para serialización.""" return { "name": self.name, "type": self.type, "devices": self.devices.copy(), "device_count": len(self.devices) }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CrisDeCrisis/mcp-domotica-backend'

If you have feedback or need assistance with the MCP directory API, please join our Discord server