Model Context Protocol (MCP) tools and resources available on every PumpFuse product.
These cover device identity, runtime status, relay control, configuration, power monitoring, and telemetry.
For product-specific MCP tools, see the product's own MCP Guide (e.g., Watchdog MCP Guide).
| Version | Date | Notes |
|---|---|---|
| 1.0 | 2026-02-11 | Initial release |
MCP uses Streamable HTTP transport over a single endpoint:
POST http://<device-ip>/api/v1/mcp
Content-Type: application/json
All requests are JSON-RPC 2.0. No authentication required.
MCP clients that require OAuth discovery will find stub responses at the standard well-known URIs. These all return "auth_mode": "none":
| URI | Purpose |
|---|---|
/.well-known/oauth-authorization-server | Authorization server metadata |
/.well-known/oauth-protected-resource | Protected resource metadata |
Both are also mirrored at path-relative variants for clients that prepend the MCP endpoint path:
/.well-known/oauth-authorization-server/api/v1/mcp/api/v1/mcp/.well-known/oauth-authorization-server/.well-known/oauth-protected-resource/api/v1/mcp/api/v1/mcp/.well-known/oauth-protected-resource| Method | Purpose |
|---|---|
initialize | MCP handshake; returns server capabilities |
ping | Liveness check |
tools/list | Enumerate all registered tools (platform + product) |
tools/call | Invoke a tool by name |
resources/list | Enumerate all registered resources |
resources/read | Read a resource by URI |
| Tool | Description | Input |
|---|---|---|
get_device_info | Get device identity | None |
get_status | Get runtime status | None |
get_power_reading | Get latest power reading | None |
get_relay | Get relay state | None |
set_relay | Set relay state | relay (boolean, required) |
get_config | Get device config | None |
set_config | Update device config | 6 optional fields |
get_telemetry | Get telemetry settings | None |
set_telemetry | Set telemetry active and interval | 2 optional fields |
Returns device identity information.
Input: None
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_device_info"
}
}
Response content
{
"product": "pf-watchdog",
"firmware": "1.0.0",
"mac": "AA:BB:CC:DD:EE:FF",
"ip": "192.168.40.114",
"uptime": 3600
}
| Field | Type | Description |
|---|---|---|
product | string | Product identifier |
firmware | string | Firmware version |
mac | string | WiFi station MAC, colon-separated uppercase hex |
ip | string | Current IP address |
uptime | integer | Seconds since boot |
Returns full runtime snapshot.
Input: None
Response content
{
"product": "pf-watchdog",
"firmware": "1.0.0",
"uptime": 3600,
"ip": "192.168.40.114",
"wifi_connected": true,
"mqtt_connected": true,
"relay": true,
"power_w_last": 12.345,
"power_sample_ts_ms": 1739260200000,
"telemetry_active": true,
"telemetry_interval_s": 5
}
| Field | Type | Description |
|---|---|---|
product | string | Product identifier |
firmware | string | Firmware version |
uptime | integer | Seconds since boot |
ip | string | Current IP address |
wifi_connected | boolean | WiFi connected |
mqtt_connected | boolean | MQTT broker connected |
relay | boolean | true = relay closed (power on) |
power_w_last | float | Most recent power sample in watts |
power_sample_ts_ms | integer | Power sample timestamp (ms) |
telemetry_active | boolean | Telemetry streaming enabled |
telemetry_interval_s | integer | Telemetry interval (seconds) |
Returns the latest power measurement.
Input: None
Response content
{
"power_w": 12.345,
"ts_ms": 1739260200000
}
| Field | Type | Description |
|---|---|---|
power_w | float | Power in watts |
ts_ms | integer | Sample timestamp in milliseconds |
Returns current relay state.
Input: None
Response content
{
"relay": true
}
Set the relay state.
Input schema
{
"type": "object",
"properties": {
"relay": {
"type": "boolean",
"description": "true = closed/ON, false = open/OFF"
}
},
"required": ["relay"]
}
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "set_relay",
"arguments": {
"relay": false
}
}
}
Response content
{
"relay": false
}
Side effects: Physically toggles the relay. Updates runtime state reflected in status, MQTT, etc.
Returns current device configuration.
Input: None
Response content
{
"device_name": "test-board",
"wifi_ssid": "MyNetwork",
"mqtt_broker": "192.168.40.164",
"mqtt_port": 1883,
"mqtt_topic": "pumpfuse/test-board",
"mqtt_user": "mqtt",
"mqtt_pass": "secret123"
}
Update device configuration. All fields optional — include only what you want to change.
Input schema
{
"type": "object",
"properties": {
"device_name": { "type": "string", "description": "Device display name" },
"mqtt_broker": { "type": "string", "description": "MQTT broker host" },
"mqtt_port": { "type": "integer", "description": "MQTT broker port", "minimum": 1, "maximum": 65535 },
"mqtt_topic": { "type": "string", "description": "MQTT base topic" },
"mqtt_user": { "type": "string", "description": "MQTT username" },
"mqtt_pass": { "type": "string", "description": "MQTT password" }
}
}
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "set_config",
"arguments": {
"device_name": "living-room",
"mqtt_broker": "10.0.0.5"
}
}
}
Response content: Updated config JSON (same schema as get_config).
Validation rules:
device_name: non-empty, max 32 charactersmqtt_broker: non-empty, max 128 charactersmqtt_port: integer, 1–65535mqtt_topic: non-empty, max 128 charactersmqtt_user: max 64 characters (empty string allowed)mqtt_pass: max 64 characters (empty string allowed)broker and topic must be non-empty (either already set or provided in this call)Error: Returns invalid_params with "invalid config payload" if validation fails.
Side effects: NVS persisted. If MQTT save fails after device_name update, device_name is rolled back.
Returns current telemetry settings.
Input: None
Response content
{
"active": true,
"interval_s": 5
}
Update telemetry settings. Both fields optional.
Input schema
{
"type": "object",
"properties": {
"active": { "type": "boolean", "description": "Enable or disable telemetry" },
"interval_s": { "type": "integer", "description": "Telemetry interval in seconds", "minimum": 1, "maximum": 60 }
}
}
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "set_telemetry",
"arguments": {
"active": true,
"interval_s": 10
}
}
}
Response content: Updated telemetry JSON.
Errors:
| Error | Message | Cause |
|---|---|---|
invalid_params | "missing arguments" | No arguments object |
invalid_params | "active must be boolean" | active is not boolean |
invalid_params | "interval_s must be number" | Not a number |
invalid_params | "interval_s must be 1..60" | Out of range or fractional |
invalid_params | "failed to set telemetry" | Runtime state update failed |
MCP resources provide read-only snapshots via the resources/read method.
| URI Template | Name | MIME Type | Description |
|---|---|---|---|
pumpfuse://{device_id}/status | status | application/json | Same content as get_status tool |
pumpfuse://{device_id}/config | config | application/json | Same content as get_config tool |
pumpfuse://{device_id}/power | power | application/json | Same content as get_power_reading tool |
pumpfuse://{device_id}/telemetry | telemetry | application/json | Same content as get_telemetry tool |
Example: Read a resource
{
"jsonrpc": "2.0",
"id": 1,
"method": "resources/read",
"params": {
"uri": "pumpfuse://test-board/status"
}
}
These prompts work with any MCP-compatible AI client connected to a PumpFuse device:
| Prompt | Expected tool calls |
|---|---|
| "What device is this?" | get_device_info |
| "Show me the full device status" | get_status |
| "What's the current power draw?" | get_power_reading |
| "Turn off the relay" | set_relay with {"relay": false} |
| "Change the MQTT broker to 10.0.0.5" | set_config with {"mqtt_broker": "10.0.0.5"} |
| "Start telemetry at 5 second intervals" | set_telemetry with {"active": true, "interval_s": 5} |
| "What's the device name?" | get_config |
The MCP server identifies as:
PumpFuse MCP0.1.0Product-specific tools are registered alongside platform tools. tools/list returns both platform and product tools. There is no namespace separation — tool names are globally unique. Product tools follow the convention get_<feature>, set_<feature>, <action> (e.g., get_watchdog_config, trigger_reboot).