PumpFuse Platform — MCP Integration Guide

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).

VersionDateNotes
1.02026-02-11Initial release


Transport

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.

OAuth Compatibility

MCP clients that require OAuth discovery will find stub responses at the standard well-known URIs. These all return "auth_mode": "none":

URIPurpose
/.well-known/oauth-authorization-serverAuthorization server metadata
/.well-known/oauth-protected-resourceProtected resource metadata

Both are also mirrored at path-relative variants for clients that prepend the MCP endpoint path:

Built-in JSON-RPC Methods

MethodPurpose
initializeMCP handshake; returns server capabilities
pingLiveness check
tools/listEnumerate all registered tools (platform + product)
tools/callInvoke a tool by name
resources/listEnumerate all registered resources
resources/readRead a resource by URI

Tools

At a Glance

ToolDescriptionInput
get_device_infoGet device identityNone
get_statusGet runtime statusNone
get_power_readingGet latest power readingNone
get_relayGet relay stateNone
set_relaySet relay staterelay (boolean, required)
get_configGet device configNone
set_configUpdate device config6 optional fields
get_telemetryGet telemetry settingsNone
set_telemetrySet telemetry active and interval2 optional fields

get_device_info

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
}
FieldTypeDescription
productstringProduct identifier
firmwarestringFirmware version
macstringWiFi station MAC, colon-separated uppercase hex
ipstringCurrent IP address
uptimeintegerSeconds since boot

get_status

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
}
FieldTypeDescription
productstringProduct identifier
firmwarestringFirmware version
uptimeintegerSeconds since boot
ipstringCurrent IP address
wifi_connectedbooleanWiFi connected
mqtt_connectedbooleanMQTT broker connected
relaybooleantrue = relay closed (power on)
power_w_lastfloatMost recent power sample in watts
power_sample_ts_msintegerPower sample timestamp (ms)
telemetry_activebooleanTelemetry streaming enabled
telemetry_interval_sintegerTelemetry interval (seconds)

get_power_reading

Returns the latest power measurement.

Input: None

Response content

{
  "power_w": 12.345,
  "ts_ms": 1739260200000
}
FieldTypeDescription
power_wfloatPower in watts
ts_msintegerSample timestamp in milliseconds

get_relay

Returns current relay state.

Input: None

Response content

{
  "relay": true
}

set_relay

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.


get_config

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"
}

set_config

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:

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.


get_telemetry

Returns current telemetry settings.

Input: None

Response content

{
  "active": true,
  "interval_s": 5
}

set_telemetry

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:

ErrorMessageCause
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

Resources

MCP resources provide read-only snapshots via the resources/read method.

URI TemplateNameMIME TypeDescription
pumpfuse://{device_id}/statusstatusapplication/jsonSame content as get_status tool
pumpfuse://{device_id}/configconfigapplication/jsonSame content as get_config tool
pumpfuse://{device_id}/powerpowerapplication/jsonSame content as get_power_reading tool
pumpfuse://{device_id}/telemetrytelemetryapplication/jsonSame content as get_telemetry tool

Example: Read a resource

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "resources/read",
  "params": {
    "uri": "pumpfuse://test-board/status"
  }
}

Example AI Prompts

These prompts work with any MCP-compatible AI client connected to a PumpFuse device:

PromptExpected 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

Notes

MCP server metadata

The MCP server identifies as:

Product tools

Product-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).