Skip to main content
Glama

MCP LEDAPI Intent Controller

by kri77

MCP LEDAPI Intent Controller

This project implements a Model Context Protocol (MCP)-style server using FastAPI to control an Arduino-based LED system via a RESTful interface. For best results, use this together with the MCPForLedAPI project. It interprets high-level intents like TurnOnLed, SetMood, or GetStatus, and translates them into commands for the Arduino LED API.


Features

  • Supports contextual LED control via structured intents
  • Communicates with an Arduino LED controller API (/setLedStatus, /status)
  • Automatically exposes Swagger UI for testing
  • Extensible architecture for adding new devices or control logic

Intents Supported

IntentDescriptionParameters
TurnOnLedTurns on a specific LED{ "color": "red" }
TurnOffLedTurns off all LEDsnone
SetPatternSets specific LED pattern{ "pattern": "1100" }
SetMoodUses predefined mood pattern{ "mood": "calm" }
PowerDownAlias for turning everything offnone
GetStatusQueries the current LED statenone

Example Requests

POST /intent { "intent": "TurnOnLed", "parameters": { "color": "green" } }
POST /intent { "intent": "SetMood", "parameters": { "mood": "calm" } }

Requirements

  • Python 3.8+
  • FastAPI
  • Uvicorn
  • Requests

Install via:

pip install fastapi uvicorn requests

Running the Server

uvicorn mcp_server:app --reload

Then open your browser at:


Architecture Overview

[ User or System ] ↓ MCP Intent Server (FastAPI) ↓ Arduino LED API (Flask) ↓ Arduino Nano (via USB)

File Overview

  • mcp_server.py: Main FastAPI server with intent handling logic
  • requirements.txt: Python dependencies
  • README.md: Project overview and usage

License

MIT License

-
security - not tested
F
license - not found
-
quality - not tested

A Model Context Protocol server that translates high-level intents into commands for controlling an Arduino-based LED system via a RESTful interface.

  1. Features
    1. Intents Supported
      1. Example Requests
        1. Requirements
          1. Running the Server
            1. Architecture Overview
              1. File Overview
                1. License

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that integrates with Home Assistant to provide smart home control capabilities through natural language, supporting devices like lights, climate systems, locks, alarms, and humidifiers.
                    Last updated -
                    Python
                    MIT License
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.
                    Last updated -
                    5
                    Python
                    Apache 2.0
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that enables AI agents to control and automate Android devices through natural language, supporting actions like app management, UI interactions, and device monitoring.
                    Last updated -
                    2
                    Python
                    MIT License
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that enables AI assistants to control Philips Hue smart lighting systems through natural language commands.
                    Last updated -
                    TypeScript
                    MIT License
                    • Apple

                  View all related MCP servers

                  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/kri77/MCPForLedAPI'

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