MCP Lampadina
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
๐ MCP Lampadina
Un progetto dimostrativo che implementa una lampadina virtuale controllabile tramite Model Context Protocol (MCP) per integrazione con Claude Code.
๐ Disponibile in due implementazioni complete:
Node.js - Versione originale con Express e Socket.IO
.NET - Versione moderna con ASP.NET Core e SignalR
โจ Caratteristiche
๐ Interfaccia Web: Interfaccia grafica reattiva per controllare la lampadina
๐จ Controllo Colore: Cambia il colore della lampadina con picker o preset
๐ก Controllo Luminositร : Regola l'intensitร luminosa da 0 a 100%
๐ Aggiornamenti Real-time: WebSocket per sincronizzazione live
๐ค Integrazione MCP: Server MCP per controllo tramite Claude Code
๐ก API REST: Endpoint per integrazioni esterne
Related MCP server: LUZMCP
๐ Installazione
Versione Node.js
# Clona il repository
git clone <url-repository>
cd mcp-lampadina
# Installa le dipendenze
npm installVersione .NET
# Vai nella cartella .NET
cd MCP-Lampadina-NET/McpLampada
# Ripristina le dipendenze (automatico)
dotnet restore๐ฎ Utilizzo
1. Avvia il Server Web
Node.js
npm startLa lampadina sarร disponibile su:
Interfaccia Web: http://localhost:3000
WebSocket: ws://localhost:8080
.NET
dotnet runLa lampadina sarร disponibile su:
Interfaccia Web: http://localhost:5000 (o porta dinamica)
SignalR Hub: http://localhost:5000/lampada-hub
2. Configurazione MCP per Claude Code
Opzione A: Configurazione locale (stdio)
Aggiungi questa configurazione al tuo claude_desktop_config.json:
{
"mcpServers": {
"lampadina": {
"command": "node",
"args": ["C:\\path\\to\\mcp-lampadina\\mcp-server.js"],
"cwd": "C:\\path\\to\\mcp-lampadina"
}
}
}Opzione B: Configurazione HTTP con claude mcp add
Node.js:
# Prima avvia entrambi i server
npm run all
# Poi usa il comando claude mcp add
claude mcp add lampadina --transport http http://localhost:3001/mcp.NET:
# Prima avvia il server .NET
cd MCP-Lampadina-NET/McpLampada
dotnet run
# Poi usa il comando claude mcp add
claude mcp add lampadina-net --transport http http://localhost:5000/mcp3. Usa Claude Code per Controllare la Lampadina
Ora puoi usare comandi come:
"Accendi la lampadina"
"Cambia il colore a rosso"
"Regola la luminositร al 50%"
"Applica il preset blu"
"Mostrami lo stato della lampadina"
๐ ๏ธ API Endpoints
GET /api/lampadina
Ottiene lo stato attuale della lampadina.
{
"success": true,
"data": {
"accesa": true,
"colore": "#ff0000",
"luminosita": 75
}
}POST /api/lampadina/toggle
Accende o spegne la lampadina.
POST /api/lampadina/colore
{
"colore": "#00ff00"
}POST /api/lampadina/luminosita
{
"luminosita": 80
}๐ค Strumenti MCP Disponibili
Strumento | Descrizione |
| Ottiene lo stato attuale |
| Accende/spegne |
| Cambia colore (formato hex) |
| Regola luminositร (0-100) |
| Applica preset colore |
Preset Colori Disponibili
bianco(#ffffff)rosso(#ff0000)verde(#00ff00)blu(#0000ff)giallo(#ffff00)magenta(#ff00ff)ciano(#00ffff)arancione(#ffa500)
๐ง Sviluppo
# Modalitร sviluppo con hot reload
npm run dev
# Avvia solo il server MCP (stdio)
npm run mcp
# Avvia solo il server MCP HTTP
npm run mcp-http
# Avvia entrambi i server (web + MCP HTTP)
npm run all๐ Struttura Progetto
Versione Node.js
mcp-lampadina/
โโโ server.js # Server web principale
โโโ mcp-server.js # Server MCP (stdio)
โโโ mcp-http-server.js # Server MCP HTTP
โโโ package.json # Configurazione Node.js
โโโ public/ # File statici web
โ โโโ index.html # Interfaccia utente
โ โโโ script.js # Logica frontend
โโโ CLAUDE.md # Configurazione Claude Code
โโโ README.md # DocumentazioneVersione .NET
MCP-Lampadina-NET/
โโโ McpLampada/
โโโ Controllers/ # API REST e MCP endpoints
โโโ Services/ # Business logic e MCP server
โโโ Models/ # Data models
โโโ Hubs/ # SignalR hubs
โโโ Program.cs # Startup configuration
โโโ McpLampada.csproj # Project configuration
โโโ CLAUDE.md # Claude Code configuration
โโโ README.md # Documentation๐ค Come Funziona MCP
Il Model Context Protocol permette a Claude Code di interagire con applicazioni esterne. In questo progetto:
Server MCP (
mcp-server.js) espone strumenti per il controllo della lampadinaClaude Code puรฒ invocare questi strumenti tramite comandi naturali
Server Web gestisce lo stato e sincronizza l'interfaccia
WebSocket mantiene aggiornati tutti i client in tempo reale
๐ Note Tecniche
Node.js
Node.js con Express per il server web
Socket.IO per comunicazione real-time
MCP SDK per integrazione con Claude Code
Vanilla JavaScript per il frontend (nessun framework)
.NET
ASP.NET Core per server web e API
SignalR per comunicazione real-time
System.Text.Json per serializzazione JSON
Minimal APIs per endpoint leggeri
๐ Confronto Implementazioni
Caratteristica | Node.js | .NET |
Runtime | V8 Engine | .NET Runtime |
Linguaggio | JavaScript | C# |
Server Web | Express.js | ASP.NET Core |
WebSocket | Socket.IO | SignalR |
Porta Default | 3000 | 5000 |
Hot Reload | nodemon | dotnet watch |
Memoria | ~50MB | ~25MB |
Avvio | ~2s | ~1s |
Tipizzazione | Dinamica | Statica |
Package Manager | npm | NuGet |
๐ฏ Scopo del Progetto
Questo progetto serve come esempio pratico per comprendere:
Come implementare un server MCP
Integrazione tra Claude Code e applicazioni custom
Comunicazione real-time con WebSocket
Architettura di un'applicazione IoT simulata
Perfetto per sperimentare con il protocollo MCP e capire come estendere le capacitร di Claude Code! ๐
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Lets your AI build and edit websites in Xodia, a visual website builder for real code (Vite, React, Tailwind CSS or plain HTML in your own git repo): read and write site files, create pages and CMS collections, run typecheck, design and link checks, take screenshots, manage forms and translations, and pick up change requests the user sends from the visual editor. Sign in once with your Xodia account (OAuth). Free plan, no card needed. Setup: https://xodia.ai/ai/mcp
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Kliv is an AI web-app builder. It hosts each app with its own database, edge functions, commerce and email. Connect Claude Code or Cursor to Kliv's MCP server, sign in with your Kliv account, and your AI tool can work on your apps with the same tools the Kliv builder uses. It can edit an app's files, change the database, write and run edge functions, set up products and subscriptions, and run your tests. Then it can build and publish the app. Other MCP clients connect the same way. Your AI tool runs on your own AI subscription, so this work doesn't use your Kliv usage. Kliv still hosts the app and everything behind it. Each person signs in as themselves and reaches only the apps they can edit. The account owner sees every connected tool and can remove one at any time. The address is https://mcp.kliv.dev/mcp for everyone. Sign-in is OAuth in your browser, with your Kliv account. There are no API keys. Setup guide: https://docs.kliv.dev/integrations/mcp
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for controlling Elgato Key Lights. Enables turning lights on/off, adjusting brightness and color temperature, applying presets, and triggering effects via Claude.13Apache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables remote monitoring and control of IoT lamps via MCP tools, allowing AI agents to query lamp status and toggle lights in real time.-
- AlicenseNot gradedqualityAmaintenanceEnables Claude Code to control a real browser for navigation, interaction, screenshots, accessibility snapshots, and automated end-to-end testing through MCP tools.106 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables Claude Code to control a real browser for navigation, interaction, screenshots, accessibility snapshots, network and console monitoring, and automated end-to-end testing through MCP tools.106 npmMIT