Skip to content
Agentmart
Submit a tool

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

IndexedMITLocal (stdio)
Write a review

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.

We use your email only for this newsletter. Privacy

About

MCP server for Sparkplug B: node/device discovery, metrics, commands, host state over MQTT.

No 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_status
  • get_device_metrics
  • get_events
  • get_node_metrics
  • list_devices
  • list_edge_nodes
  • list_watches
  • request_node_rebirth

Write 5 · Create, change, send or run things.

  • send_device_command
  • send_node_command
  • set_host_online
  • start_watch
  • stop_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_ID
  • SPARKPLUG_HOST_ID
  • SPARKPLUG_MQTT_HOST
  • SPARKPLUG_MQTT_PORT
  • SPARKPLUG_MQTT_USERNAME
  • SPARKPLUG_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_status

    Report 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_metrics

    Get 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_events

    Drain buffered Sparkplug events collected by a watch session. Returns: {events: [...], count, buffered_remaining}

  • get_node_metrics

    Get 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_devices

    List 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_nodes

    List 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_watches

    List 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_rebirth

    Ask 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_command

    Send 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_command

    Send 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_online

    Publish 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_watch

    Start 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_watch

    Stop 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
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from nagarjunr

Cite this page

Sparkplug B MCP server. Agent Mart. https://agentmart.dev/connectors/nagarjunr-sparkplug-b (last updated 2026-10-24)