
FastMCP Sensor Controller
このプロジェクトは、ESP32(MicroPython)と MQTT を介して連携し、MCP 経由でセンサーや LED を制御するための実験用サーバーです。 MQTTサーバーをAzure IoT Hubなどに置き換えると、インターネット越しにマイコンと会話させることもできます。
Repository Info
About This Server
このプロジェクトは、ESP32(MicroPython)と MQTT を介して連携し、MCP 経由でセンサーや LED を制御するための実験用サーバーです。 MQTTサーバーをAzure IoT Hubなどに置き換えると、インターネット越しにマイコンと会話させることもできます。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
# FastMCP Sensor Controller
このプロジェクトは、ESP32(MicroPython)と MQTT を介して連携し、MCP 経由でセンサーや LED を制御するための実験用サーバーです。
MQTTサーバーをAzure IoT Hubなどに置き換えると、インターネット越しにマイコンと会話させることもできます。
FastMCPのドキュメント: https://gofastmcp.com/getting-started/welcome
## ✅ 構成

- ESP32(MicroPython):
- マイコン
- ESP32-DevKit(※技適マーク付き)
- https://amzn.to/4iWmr4s
- パーツ
- DHT11 温湿度センサー ※DHT11 module
- https://amzn.to/43jR2n8
- RGB LED(GPIO 13, 12, 16) ※KY-016
- https://amzn.to/4mbcnYp
- 役割
- MQTT でコマンド受信・応答
- FastMCP:
- SSE 経由で MQTT にコマンド送信
- センサー取得・LED制御が可能
## 🚀 起動方法(MCPサーバー&MQTTブローカー)
```bash
docker compose up -d
```
## 💾 MicroPythonで書き込み
MicroPythonをESP32にインストールする方法は下記を参照ください。
https://zenn.dev/kotaproj/articles/d969fb39100da443f41f
esp32_micropythonフォルダ内のmain.pyをESP32にアップロードしてください。
(ThonnyなどのIDEを使うと便利です)
## 🧪 ClaudeDesktop (MCPクライアント)の設定
```json
{
"mcpServers": {
"sensorController": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8888/sse"
]
}
}
}
```
Quick Start
Clone the repository
git clone https://github.com/umaxiaotian/FastMCP-Sensor-ControllerInstall dependencies
cd FastMCP-Sensor-Controller
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.