PetOS BLE Gateway
Allows controlling a PetOS BLE watch over Bluetooth Low Energy, providing tools to scan, connect, send actions, and show frames.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PetOS BLE Gatewayplay the waving action on my pet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PetOS BLE Gateway
PetOS BLE Gateway is a local Node.js bridge for controlling an ESP32-C3 PetOS watch over BLE.
It exposes three control surfaces over the same BLE connection:
A browser dashboard for scanning, connecting, and sending pet commands.
An HTTP API for scripts and local tools.
A stdio MCP server for Codex, Claude, and other MCP clients.
Web UI / HTTP API / MCP tool
|
v
Node.js gateway
|
v
BLE JSON write
|
v
PetOS-C3 watchHardware/Firmware Assumptions
The current firmware advertises as PetOS-C3 and accepts JSON writes on:
Service UUID:
7f2a0001-4f6d-45f6-b805-2b0a7a0f9c01Write characteristic UUID:
7f2a0002-4f6d-45f6-b805-2b0a7a0f9c01
The tested target is an ESP32-C3 round watch board with a 240x240 GC9A01 display.
Related MCP server: blew BLE MCP
Requirements
macOS with Bluetooth enabled
Node.js 20+
A PetOS watch firmware advertising as
PetOS-C3
This project uses @abandonware/noble for BLE access. On macOS, the terminal or app running Node may need Bluetooth permission in System Settings.
Install
npm installRun The Web Gateway
npm startOpen:
http://127.0.0.1:8787The page lets you scan, connect, send named actions, send a fixed frame, or write raw JSON.
CLI Smoke Tests
Scan:
npm run scan -- 7000Send an action:
npm run send -- '{"cmd":"pet.action","value":"review"}'Show a fixed frame:
npm run send -- '{"cmd":"pet.frame","value":12}'BLE JSON Protocol
Play an action:
{"cmd":"pet.action","value":"idle"}{"cmd":"pet.action","value":"review"}Show one fixed frame:
{"cmd":"pet.frame","value":12}Supported actions in the current firmware:
idlewavingjumpingfailedwaitingrunningreview
HTTP API
Status:
curl http://127.0.0.1:8787/api/statusScan:
curl -X POST http://127.0.0.1:8787/api/scan \
-H 'content-type: application/json' \
-d '{"timeoutMs":7000}'Connect:
curl -X POST http://127.0.0.1:8787/api/connect \
-H 'content-type: application/json' \
-d '{}'Play an action:
curl -X POST http://127.0.0.1:8787/api/action/review \
-H 'content-type: application/json' \
-d '{}'Send raw JSON:
curl -X POST http://127.0.0.1:8787/api/send \
-H 'content-type: application/json' \
-d '{"cmd":"pet.frame","value":12}'MCP Server
Start the gateway first:
npm startThen run the MCP server:
npm run mcpFor an MCP client, use this command:
node /absolute/path/to/petos-ble-gateway/src/mcp-server.jsAvailable MCP tools:
petos_statuspetos_scanpetos_connectpetos_send_jsonpetos_play_actionpetos_show_frame
The MCP server calls the local gateway at http://127.0.0.1:8787 by default. Override with:
PETOS_GATEWAY_URL=http://127.0.0.1:8787 npm run mcpTroubleshooting
If the device does not appear in macOS Bluetooth settings, use this gateway or a BLE scanner such as nRF Connect/LightBlue. Ordinary BLE GATT devices often do not appear like keyboards or headphones.
If scanning hangs or returns no devices:
Make sure the watch firmware is advertising
PetOS-C3.Make sure the Node process has Bluetooth permission.
Try
npm run scan -- 10000.Restart the gateway after toggling Bluetooth permissions.
If action buttons appear to do nothing, check the log panel. A successful send looks like:
sent {"cmd":"pet.action","value":"review"}This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/ilimei/petos-ble-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server