LightWaveRF Link Plus MCP Server
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.
LightWaveRF Link Plus MCP Server
A production-ready Model Context Protocol (MCP) server for controlling LightWaveRF Link Plus Smart Series devices. This server enables AI applications like Claude Desktop to discover, monitor, and control your smart home devices through a persistent WebSocket connection to the LightWaveRF cloud service.
Features
Device Discovery: List all devices with their capabilities and features
Status Monitoring: Read current state of any device (brightness, power, etc.)
Device Control: Turn devices on/off, adjust brightness, and control other features
Group Management: View room/group hierarchy and query devices by group
Persistent Connection: WebSocket connection with automatic reconnection
Token Management: Automatic authentication and token refresh
Comprehensive Error Handling: Clear, actionable error messages
Security Best Practices: Environment-based credentials, no hardcoded secrets
Related MCP server: lightwave-mcp
Prerequisites
Node.js 18 or higher
npm or yarn
A LightWaveRF Link Plus account (sign up at https://my.lightwaverf.com/)
LightWaveRF Link Plus hub connected to your network
Installation
Clone or download this repository:
git clone <repository-url>
cd lightwave-mcp-serverInstall dependencies:
npm installBuild the TypeScript code:
npm run buildCreate a
.envfile with your credentials:
cp .env.example .envGet your API credentials from the LightWaveRF app (RECOMMENDED):
Open the LightWaveRF mobile app
Go to Settings > API Integration
Copy the Basic token and Refresh Token
Then edit
.envand add your API tokens:LIGHTWAVE_API_TOKEN=your_api_token_from_app LIGHTWAVE_REFRESH_TOKEN=your_refresh_token_from_appAlternative: Use email/password (less secure):
LIGHTWAVE_EMAIL=your.email@example.com LIGHTWAVE_PASSWORD=your_password_here
SECURITY WARNING: Never commit your .env file to version control. The .gitignore file is configured to exclude it.
Configuration
Environment Variables
The server supports two authentication methods. API tokens are strongly recommended for security and simplicity.
Method 1: API Tokens (Recommended)
Variable | Description | Required |
| API token from LightWaveRF app (Settings > API Integration > Basic) | Yes |
| Refresh token from LightWaveRF app (Settings > API Integration > Refresh Token) | Yes |
Method 2: Email/Password (Alternative)
Variable | Description | Required |
| Your LightWaveRF account email | Yes |
| Your LightWaveRF account password | Yes |
MCP Client Configuration
Claude Desktop
Add the server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Using API tokens (recommended):
{
"mcpServers": {
"lightwave": {
"command": "node",
"args": ["/absolute/path/to/lightwave-mcp-server/build/index.js"],
"env": {
"LIGHTWAVE_API_TOKEN": "your_api_token_from_app",
"LIGHTWAVE_REFRESH_TOKEN": "your_refresh_token_from_app"
}
}
}
}Or using email/password (alternative):
{
"mcpServers": {
"lightwave": {
"command": "node",
"args": ["/absolute/path/to/lightwave-mcp-server/build/index.js"],
"env": {
"LIGHTWAVE_EMAIL": "your.email@example.com",
"LIGHTWAVE_PASSWORD": "your_password_here"
}
}
}
}Important: Replace /absolute/path/to/lightwave-mcp-server with the actual path to this directory.
Other MCP Clients
For other MCP clients, use the stdio transport with the following command:
node /path/to/lightwave-mcp-server/build/index.jsEnsure the environment variables are set in the client's configuration.
Available Tools
1. list_devices
Lists all LightWaveRF devices with their IDs, names, types, and available features.
Parameters: None
Returns: Device list with:
Device ID (needed for status queries)
Device name
Product type
Available features (with feature IDs and writable flags)
Example Use:
User: "What devices do I have?"
Assistant: [Calls list_devices to show all devices]2. get_device_status
Gets the current status of a specific device including power state, brightness, and feature values.
Parameters:
deviceId(string, required): The device ID from list_devices
Returns: Current device state with:
Device name and type
All feature values (brightness, power, etc.)
Feature status indicators
Example Use:
User: "What's the brightness of the living room light?"
Assistant: [First calls list_devices to find device ID, then calls get_device_status]3. control_device
Controls a device by writing to one of its features (turn on/off, set brightness, etc.).
Parameters:
featureId(string, required): The feature ID to control (from get_device_status)value(number, required): Value to setFor switches: 0 = off, 1 = on
For dimmers: 0-100 = brightness percentage
Returns: Success confirmation message
Example Use:
User: "Turn off the bedroom light"
Assistant: [Finds device and switch feature ID, then calls control_device with value=0]
User: "Turn on the bedroom light"
Assistant: [Finds device and switch feature ID, then calls control_device with value=1]
User: "Set kitchen light to 50%"
Assistant: [Finds dimLevel feature ID, then calls control_device with value=50]4. list_groups
Gets the complete room and group hierarchy including all groups and their contained devices.
Parameters: None
Returns: Hierarchical structure of:
All groups/rooms with their IDs
Devices within each group
Nested subgroups
Example Use:
User: "Show me how my devices are organized"
Assistant: [Calls list_groups to display room structure]5. get_group_devices
Lists all devices within a specific group or room.
Parameters:
groupId(string, required): The group ID from list_groups
Returns: List of devices in the group with their IDs and types
Example Use:
User: "What devices are in the living room?"
Assistant: [Calls list_groups to find living room group ID, then calls get_group_devices]Architecture
Components
LightwaveClient (
src/lightwaveClient.ts)Manages WebSocket connection to LightWaveRF cloud
Handles authentication and token refresh
Implements request-response correlation
Provides reconnection with exponential backoff
Transaction ID management
MCP Server (
src/index.ts)Implements MCP protocol using official SDK
Defines tool schemas with Zod validation
Routes tool calls to LightwaveClient
Formats responses for AI consumption
Comprehensive error handling
Connection Management
Persistent WebSocket: Single connection maintained for entire session
Automatic Reconnection: Exponential backoff strategy (up to 10 attempts)
Token Refresh: Tokens refreshed automatically 1 hour before expiry
Transaction Tracking: Unique transaction IDs for request-response correlation
Security Features
Environment-based Credentials: No hardcoded secrets
Token Management: Tokens stored in memory only, never persisted
Input Validation: All tool inputs validated with Zod schemas
Error Sanitization: Error messages don't expose credentials or tokens
HTTPS/WSS Only: All connections use TLS encryption
Development
Build the Project
npm run buildWatch Mode (Auto-rebuild)
npm run watchRun Development Server
npm run devTesting
Using MCP Inspector
The MCP Inspector is the official tool for testing MCP servers:
Install the MCP Inspector:
npx @modelcontextprotocol/inspector node build/index.jsSet environment variables before running:
export LIGHTWAVE_EMAIL="your.email@example.com"
export LIGHTWAVE_PASSWORD="your_password_here"
npx @modelcontextprotocol/inspector node build/index.jsThe inspector will open in your browser, allowing you to:
View available tools
Test tool calls with different parameters
See request/response messages
Debug connection issues
Manual Testing
You can also test the server manually using stdio:
# Set environment variables
export LIGHTWAVE_EMAIL="your.email@example.com"
export LIGHTWAVE_PASSWORD="your_password_here"
# Run the server
node build/index.jsThe server will wait for JSON-RPC messages on stdin and respond on stdout.
Troubleshooting
Connection Issues
Problem: "Failed to authenticate with LightWaveRF: Invalid credentials" Solution:
Verify your email and password are correct
Check that you can log in to https://my.lightwaverf.com/
Ensure there are no extra spaces in your credentials
Problem: "WebSocket is not connected" Solution:
Check your internet connection
Verify the LightWaveRF cloud service is accessible
Wait for automatic reconnection (up to 10 attempts)
Device Control Issues
Problem: "Device not found" Solution:
Run
list_devicesfirst to get valid device IDsEnsure the device ID is correct (numeric string)
Check that the device is online in the LightWaveRF app
Problem: "Feature not found" Solution:
Use
get_device_statusto see available feature IDsVerify the feature ID belongs to the correct device
Check that the feature is writable
Token Issues
Problem: Token expired errors Solution:
The server automatically refreshes tokens
If issues persist, restart the server to re-authenticate
Check system clock is correct (affects token expiry calculation)
Environment Variable Issues
Problem: "LIGHTWAVE_EMAIL and LIGHTWAVE_PASSWORD environment variables must be set" Solution:
For command line: Export variables before running
For Claude Desktop: Add to
envsection in configFor MCP Inspector: Set variables in terminal before running npx command
API Documentation
LightWaveRF Protocol
This server implements the unofficial LightWaveRF Link Plus protocol. For detailed protocol documentation, see: https://github.com/washcroft/LightwaveRF-LinkPlus/blob/master/README.md
MCP Protocol
This server follows the Model Context Protocol specification. For MCP documentation, see: https://modelcontextprotocol.io/
Limitations
Cloud Dependency: Requires internet connection and LightWaveRF cloud service
Read-Only Device Discovery: Device list cannot be modified through MCP
Feature Type Support: Only dimLevel and switch features are commonly tested
Single Account: One server instance supports one LightWaveRF account
Contributing
When contributing, please ensure:
Security: Never commit credentials or tokens
Error Handling: Add comprehensive error messages
Validation: Use Zod schemas for all inputs
Documentation: Update README for new features
Testing: Test with MCP Inspector before submitting
License
MIT License - see LICENSE file for details
Acknowledgments
LightWaveRF Link Plus protocol documentation by washcroft
Model Context Protocol by Anthropic
MCP SDK by Model Context Protocol Project
Support
For issues related to:
This MCP Server: Open an issue in this repository
LightWaveRF Devices: Contact LightWaveRF support
MCP Protocol: See MCP documentation
Claude Desktop: See Claude documentation
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
Control your existing Philips lights, Sonos speakers, Roborock vacuums and other supported devices through Port OS cloud. Give ChatGPT, Claude and other MCP-compatible assistants access to the devices you connect. Turn off the living room lights, play music on your speakers, adjust the thermostat, run a vacuum in a room, check a camera snapshot or find a connected tracker. Available actions depend on your linked provider accounts and each device’s supported capabilities. Port OS runs in the cloud; no local server is required. You choose the account, device and capability permissions each assistant receives. Device operations require user OAuth; public tool discovery does not grant device access. Port OS is in alpha. Setup: https://portoperatingsystem.com/docs/getting-started/ Support: https://portoperatingsystem.com/contact/
Manage your IoT device fleet directly from Claude. Create device templates with datastreams and events, provision new devices, read live sensor data, and control outputs. The Blynk connector integrates with the Blynk IoT platform, enabling direct configuration and monitoring of connected devices and infrastructure.
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
- platform7nDeprecatedtech.p7n
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables monitoring and control of SwitchBot devices (temperature sensors, plugs, bots) via Claude Desktop or Home Assistant.10MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to discover and control LightwaveRF Smart Series devices (lights, switches, sockets) via the official REST API, using natural language commands like 'turn off the kitchen light'.MIT
- AlicenseBqualityBmaintenanceEnables LLM assistants to control SprutHub smart homes through a local WebSocket connection by listing rooms/devices, reading hub and accessory states, and toggling switches or setting characteristics.183MIT
- AlicenseBqualityCmaintenanceEnables Claude to manage Stream Deck profiles and buttons, control Elgato Key Lights, and discover and control Philips Hue lights and groups over the network.33MIT