Sparkplug MCP Server
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., "@Sparkplug MCP Servershow me the current temperature and humidity from sensor-01"
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.
Overview
This project demonstrates a Sparkplug B (SPB) implementation featuring a chat-based interface for industrial IoT monitoring and control. It combines a Sparkplug MCP server with a web application that allows users to query device data, analyze historical metrics, and monitor device status through natural language interactions. The system supports both real-time monitoring and historical analysis of device metrics, making it ideal for industrial automation and IoT applications.
Related MCP server: OT-AIops
Architect diagram

Setup workspace
Follow the steps below to set up and run the application:
Clone the Repository
git clone https://github.com/emqx/uns-demo/
cd uns-demoThe project use
uvto manage libs and project, please install uv before getting start.Some dependencies need to be compiled through cmake, please install cmake before getting start.
Install Dependencies and Activate Virtual Environment
uv sync
uv venvPre-conditions
Install software and configurations
Please refer to software preparation.
Run the application
Steps
Copy
.env.exampleto.envand modify the values accordingly.Run sparkplug mcp server
uv run spb_server.pyRun biz mcp server
uv run biz_app.pyRun main application
uv run main.pyOpen http://localhost:8000/ in browser.
Type questions in the chatbox.
Demos
Refer to doc for detailed demo scenarios.

Available Tools
4 toolsaddA
Add two numbers together.
Args:
a: First number
b: Second number
Returns:
The sum of a and b
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description states it returns the sum, which is clear. With no annotations, the description covers basic behavior well. However, it does not address edge cases like overflow or NaN handling, but for a simple arithmetic tool this is acceptable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with only two lines plus an optional docstring. It is front-loaded with the core purpose and includes the necessary args and returns sections with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity (2 required numeric parameters, no output schema, no annotations), the description fully explains what the tool does and what it returns. It is complete for its scope.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers both parameters with types, but schema description coverage is 0%. The description adds that it returns the sum, which is not in the schema. However, the schema already defines the parameters as numbers, so the description adds minimal extra meaning beyond stating the operation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states 'Add two numbers together,' which is a specific verb and resource. It clearly distinguishes itself from sibling tools (subtract, multiply, divide) that perform different operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives. The context implies basic arithmetic use, but there is no mention of when not to use it or comparisons with siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
divideA
Divide the first number by the second.
Args:
a: Numerator
b: Denominator
Returns:
The result of a / b
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden. It only states the basic operation and return value, omitting potential issues like division by zero, error handling, or precision. Minimal behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief, with a clear main sentence and docstring-style args. Every word is necessary, and it is front-loaded. No extraneous content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (dividing two numbers), the description covers input parameters and return value. It lacks mention of edge cases like division by zero, but overall it is sufficient for an arithmetic operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Parameters have zero schema description coverage, but the description adds semantic roles ('Numerator', 'Denominator') beyond the schema titles ('A', 'B'). This meaningfully aids the agent in understanding parameter purposes.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Divide the first number by the second.' which clearly identifies the verb (divide) and resources (two numbers). It distinguishes from sibling tools (add, subtract, multiply).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for division but lacks explicit guidance on when to use alternatives or when not to use it (e.g., division by zero). For a simple arithmetic tool, it is adequate but not exemplary.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
multiplyA
Multiply two numbers together.
Args:
a: First number
b: Second number
Returns:
The product of a and b
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It clearly states the return value (product), but could mention behavior with zero or negative numbers.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise with only necessary information, but could be more streamlined (e.g., eliminate Args/Returns headers for a one-line description).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given simplicity (2 numeric params, no output schema), description is complete enough: purpose, parameters, return value are all covered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but description adds 'First number' and 'Second number' to parameters. This marginally improves understanding beyond the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states it multiplies two numbers, using a clear verb and resource. It distinguishes from sibling tools (add, subtract, divide) by specifying multiplication.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or alternatives are given, but the simple math context implies usage. It does not differentiate from potential edge cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
subtractA
Subtract the second number from the first.
Args:
a: Number to subtract from
b: Number to subtract
Returns:
The result of a - b
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description discloses core behavior (subtract b from a) but lacks details on potential edge cases like negative results or precision, and no annotations are provided to compensate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is brief and to the point, but includes some redundant formatting (Args/Returns) that could be streamlined.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequately explains parameters and return value for a simple arithmetic tool; lacks edge case handling but sufficient for basic use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Clear explanation of each parameter: 'a: Number to subtract from' and 'b: Number to subtract', adding meaning beyond the type-only schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description explicitly states subtraction operation and distinguishes from siblings (add, multiply, divide) by naming the specific arithmetic action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use subtract vs alternatives; usage is implied by the operation but no comparative context provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
add - First observed
divide - First observed
multiply - First observed
subtract
TDQS
Each tool performs a distinct arithmetic operation (addition, subtraction, multiplication, division) with no functional overlap.
All tool names are single lowercase verbs describing the operation, following a consistent and predictable pattern.
Four tools cover the core arithmetic operations without being excessive or insufficient for the server's purpose.
The tool set provides the four basic arithmetic operations, completely covering the expected functionality for simple numeric calculations.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Query Allen-Bradley and Siemens PLC projects, live tag values, and analyses in plain English.
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
Ask questions in plain language, get answers from your business database. No SQL required.
1Your Databricks Lakehouse in natural language: run SQL on your SQL warehouses, track long-running qu
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects AI agents to OPC UA-enabled industrial systems for real-time monitoring and control of operational data. It enables users to read, write, and browse industrial device nodes through natural language interactions.MIT
- AlicenseAqualityAmaintenanceProvides AI agents with safe, governed read access to industrial control systems (OPC-UA, Modbus, S7, Mitsubishi, MTConnect, MQTT/Sparkplug) plus cross-protocol diagnostics for troubleshooting data breaks, alarm floods, and unhealthy tags.21531MIT
- FlicenseNot gradedqualityCmaintenanceEnables engineers and plant managers to interact with manufacturing systems using natural language, providing machine health analysis, KPI dashboards, predictive maintenance, and automated workflow execution via MCP.-
- AlicenseAqualityFmaintenanceMCP server for industrial PLC integration, enabling AI to read tags, monitor alarms, and interact with Allen-Bradley ControlLogix PLCs via natural language.9MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/emqx/uns-demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server