Sparkplug B
MCP server for Sparkplug B: node/device discovery, metrics, commands, host state over MQTT.
Connector by nagarjunr · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/nagarjunr-sparkplug-b
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list and install config. Checked Oct 25, 2026.
- Tools
- 8 read · 5 write · 0 delete
- Secrets
- 1 (API keys, tokens or passwords)
- Install scripts
- Not scanned yet
- Runs as
- Python package
Tools by what they do 13
Read from the source code; the running server may list different tools.
Read 8 · Look things up without changing anything.
get_connection_statusget_device_metricsget_eventsget_node_metricslist_deviceslist_edge_nodeslist_watchesrequest_node_rebirth
Write 5 · Create, change, send or run things.
send_device_commandsend_node_commandset_host_onlinestart_watchstop_watch
Secrets and settings it asks for
Secrets: values you paste in that let it act as you.
SPARKPLUG_MQTT_PASSWORD
Other settings (environment variables or headers).
SPARKPLUG_GROUP_IDSPARKPLUG_HOST_IDSPARKPLUG_MQTT_HOSTSPARKPLUG_MQTT_PORTSPARKPLUG_MQTT_USERNAMESPARKPLUG_MQTT_USE_TLS
Tools (13)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
get_connection_statusReport this connector's connection to the MQTT broker and its Sparkplug Host Application identity. This server acts as a Sparkplug B Primary Host Application: it subscribes to the entire spBv1.0 namespace, discovers Edge Nodes/Devices from their BIRTH messages, and can issue commands to them. Returns: {connected, host, port, sparkplug_host_id, group_id_filter, known_edge_nodes, known_devices}
get_device_metricsGet the latest known metric values for a Device (from its DBIRTH/DDATA messages). Returns: {group_id, edge_node_id, device_id, online, metrics: {name: {value, datatype, timestamp, alias, is_historical, is_transient, is_null}}}
get_eventsDrain buffered Sparkplug events collected by a watch session. Returns: {events: [...], count, buffered_remaining}
get_node_metricsGet the latest known metric values for an Edge Node (from its NBIRTH/NDATA messages). Returns: {group_id, edge_node_id, online, metrics: {name: {value, datatype, timestamp, alias, is_historical, is_transient, is_null}}}
list_devicesList Sparkplug Devices discovered via DBIRTH/DDEATH messages since this connector started. Returns: {devices: [{group_id, edge_node_id, device_id, online, seq, last_birth_timestamp, last_death_timestamp, last_seen_timestamp, metric_count}], count}
list_edge_nodesList Sparkplug Edge Nodes discovered via NBIRTH/NDEATH messages since this connector started. Returns: {edge_nodes: [{group_id, edge_node_id, online, seq, last_birth_timestamp, last_death_timestamp, last_seen_timestamp, metric_count}], count}
list_watchesList all active watch sessions on this connector. Returns: {sessions: [{session_id, group_id, edge_node_id, device_id, message_types, buffered_count, event_count, created_at}]}
request_node_rebirthAsk an Edge Node to republish its full NBIRTH (the standard 'Node Control/Rebirth' command). Useful after this connector loses metric history (e.g. a restart) or suspects a missed message (a gap in the node's seq numbers). Returns: {group_id, edge_node_id, metrics_sent}
send_device_commandSend a DCMD to a Sparkplug Device to write one or more of its metrics. Returns: {group_id, edge_node_id, device_id, metrics_sent}
send_node_commandSend an NCMD to a Sparkplug Edge Node to write one or more of its metrics. Used for writes like setpoints or mode changes. The edge node's own application logic decides how to act on the command; this only publishes it. Returns: {group_id, edge_node_id, metrics_sent}
set_host_onlinePublish this connector's own Sparkplug Host Application STATE message. Retained on spBv1.0/STATE/{sparkplug_host_id} per spec, so Edge Nodes and other Host Applications can tell whether this host is actively monitoring the infrastructure. Published automatically as online=True at startup, with an MQTT will registered to publish online=False if the connection drops unexpectedly. Use this tool for explicit control, e.g. announcing a planned maintenance window.
start_watchStart watching Sparkplug B traffic (births, deaths, data, commands, host states). Creates a session that buffers matching decoded messages; call get_events(session_id) to drain them, and stop_watch(session_id) when done. This connector is always subscribed to the full spBv1.0 namespace, so watching starts immediately with no additional broker subscription needed. Returns: {session_id, group_id, edge_node_id, device_id, message_types}
stop_watchStop a watch session and discard its buffered events.
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Weekly downloads
- 24
- Last commit (this folder)
- Aug 4, 2026 (2 months ago)
- Last release
- Aug 4, 2026 (2 months ago)
- Last package publish
- Aug 4, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026) and the package registry.
Details
- Registry name
io.github.nagarjunr/sparkplug-b- Version
- 0.1.0
- Auth
- API key
- Packages
- pypi sparkplug-b-mcp-server
- License
- MIT
- Repository
- github.com/nagarjunr/iot-mcp-servers
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
More from nagarjunr
- 0.576score
Azure IoT Hub
nagarjunr
MCP server for Azure IoT Hub: device registry, twins, methods, jobs, messaging.
ConnectorAFreshness: ALocal↓ 37/wkClaude Code +5 - 0.570score
AWS IoT Core
nagarjunr
MCP server for AWS IoT Core: device registry, shadows, jobs, rules, messaging.
ConnectorAFreshness: ALocal↓ 29/wkClaude Code +5 - 0.482score
Eclipse Ditto
nagarjunr
MCP server for the Eclipse Ditto digital twin HTTP API (things, policies, connections, more).
ConnectorCFreshness: CLocal↓ 33/wkClaude Code +5 - 0.475score
MQTT
nagarjunr
MCP server for MQTT 5.0 brokers (publish, subscribe, topic discovery).
ConnectorCFreshness: CLocal↓ 24/wkClaude Code +5
Cite this page
Sparkplug B MCP server. Agent Mart. https://agentmart.dev/connectors/nagarjunr-sparkplug-b (last updated 2026-10-24)