- Home
- MCP servers
- MCP LEDAPI Intent Controller
MCP LEDAPI Intent Controller
- python
0
GitHub Stars
python
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"kri77-mcpforledapi": {
"command": "uvicorn",
"args": [
"mcp_server:app",
"--reload"
]
}
}
}You can run a lightweight MCP server that translates high-level intents into commands for an Arduino-based LED controller. This enables you to control LED colors, moods, and patterns through simple RESTful requests, while keeping the integration modular and extensible.
How to use
You interact with the LED MCP server by sending intents via its REST API. The server accepts structured intents such as turning LEDs on, turning them off, setting patterns, or querying status. The LED controller runs locally and communicates with the Arduino hardware to apply whichever command you specify. You can test and experiment through the included API interface, which automatically documents available intents and parameters.
How to install
Prerequisites: you need Python 3.8 or newer to run the server.
Install the required Python packages.
pip install fastapi uvicorn requests
Run the MCP LED API server locally.
uvicorn mcp_server:app --reload
Open the API docs to explore endpoints and test intents.
Additional notes
The server exposes a RESTful interface for intent handling and forwards commands to the Arduino LED API. It supports intents such as TurnOnLed, TurnOffLed, SetPattern, SetMood, PowerDown, and GetStatus. You can test different intents and parameters through the interactive docs that appear at the local host when the server is running.
Architecture-wise, you have a clear separation between the MCP Intent Server (FastAPI) and the Arduino LED API, enabling straightforward extension to new devices or control logic in the future.
Available tools
TurnOnLed
Turns on a specific LED with a designated color, triggering the corresponding LED API call.
TurnOffLed
Turns off all LEDs, stopping any active light output.
SetPattern
Applies a specific LED pattern defined by a pattern string.
SetMood
Applies a predefined mood pattern based on a mood name.
PowerDown
Turns off all LEDs, serving as a quick shutdown alias.
GetStatus
Queries and returns the current LED state and configurations.