Building Your Node-RED Industrial MCP Server with FlowFuse
Integrate AI into industrial systems FlowFuse new MCP nodes

FlowFuse released MCP nodes for Node-RED, allowing AI to directly interact with the flows you have built. These nodes let AI read sensor data, query databases, and control equipment. You use FlowFuse to collect and manage data in your flows, while AI agents determines what actions to take and why, enabling intelligent monitoring and automated control of factory and IIoT/IoT systems.
This article explains how to build an MCP server with FlowFuse and connect AI to your systems for real-time insights, operational decisions, and automated control.
What Is MCP?
The Model Context Protocol (MCP) is an open standard that enables AI assistants to access data and execute actions across external systems.
MCP works through three key components. Resources give AI visibility into your operations through read-only access to sensor data, database records, SCADA tags, and equipment logs. This real-time information helps AI understand what's actually happening on your factory floor or in your IIoT environment.
Tools let AI perform specific actions in your systems. These might include adjusting equipment parameters, triggering maintenance alerts, or generating operational reports. Each tool clearly defines what it needs as input and what it will produce as output, which keeps operations predictable and safe.
Prompts are workflow templates that guide AI through more complex tasks. They show AI how to use multiple resources and tools together to complete multi-step operations. This is particularly valuable when you need AI to follow established procedures rather than improvising solutions.
When you connect an AI agent to your MCP server, it discovers all available resources and tools automatically. The protocol handles the technical details of data requests and action execution, so AI can start working with your industrial systems right away. You build your flows in Node-RED, and AI learns how to interact with them intelligently through the MCP interface.
Getting Started
This section guides you through setting up an MCP server, defining resources, and creating tools so AI can interact with your system.
Prerequisites
Before you begin, ensure you have the following:
-
A running FlowFuse instance. If you do not have one, a 14-day free trial is available. Sign up now to set up your instance quickly and get started.
-
Ensure the
@flowfuse-nodes/nr-mcp-server-nodes
package is installed in your Node-RED palette. These nodes are available on all FlowFuse tiers.
Configuring the MCP Server
Before defining resources or tools, the MCP Server must be configured. This server acts as the central endpoint for AI agents, ensuring all resources and tools are accessible under a single, consistent configuration.
-
Drag an MCP Resource or Tool node onto your workspace and click the + next to Server to create a new configuration.
-
Define the server properties:
- Name: Enter a descriptive name, e.g.,
Factory MCP Server
. - Protocol: Leave the default
http/sse
(currently the only option). - Path: Specify the endpoint path for the server, e.g.,
/mcp
.
- Name: Enter a descriptive name, e.g.,
- Click Done to save the server configuration.
Once configured, this server is available for all subsequent Resources and Tools, providing a unified and discoverable endpoint for AI agents.
Defining an MCP Resource
Now let's start by defining a Resource. In MCP, a Resource represents a data source that you want to expose to an AI agent. In an industrial context, this could be a sensor value, a machine's status, or a list of production lines.
- Drag the MCP Resource node from the palette onto your workspace.
- Double-click the node to open its configuration panel and select the added mcp server configuration.
- Enter the unique id for the resource, for example : "all-production-lines"
- Provide a unique URI for this specific resource, for example,
mcp://monitor-all-production-lines
Make sure your every resource must have a unique URI. - Enter a clear, human-readable title, like "Monitoring All production lines". This is the name the AI agent or client that will connect will see, so make it descriptive.
- Give the node a descriptive name for your flow, such as Production Lines Resource, and enter a brief description.
- Click Done and then Deploy your flow.
At this point, your MCP server is live and resource is discoverable. However, it doesn't contain any data yet.
To expose data you will need to connect the MCP Resource node to any data-producing node in your flow. This could be an HTTP Request node retrieving data from an API, a FlowFuse Query node for fetching records from a FlowFuse data table, industrial connectors such as OPC UA Read, Modbus Read, PLC Read nodes.
- Next, drag the MCP Response node and connect its input to the output of the upstream data source node.
The MCP Response node is crucial because it delivers the results of your flow back to the AI agent. Without it, the AI will not receive the data it requests. Any errors are also fed back to the MCP Response node, enabling the AI to handle them appropriately.
- Deploy the flow
Now, when an AI agent or any other client requests this URI, the flow will automatically execute and query your data source for the latest information. This data is then returned to the agent, providing it with the real-time context needed to answer your questions.
Example: Monitoring Production Lines
For this article, we've built a demonstration data flow. We have a table named production-lines where new data is inserted every five seconds from 10 different lines.
We then created a data resource and exposed all the line data to it. Now, let's connect a AI Agent to this resource and explore the kinds of questions we can ask to monitor the factory floor effectively.
Defining an MCP Tool
While resources are useful for providing access to data, tools enable an AI agent to perform specific, parameterized actions within your system.
-
Drag the MCP Tool node from the Node-RED palette onto your workspace.
-
Double-click the node to open the configuration panel and select the MCP Server configuration you previously created.
-
Enter a tool name that will be visible to clients connecting to the MCP server, such as Maintenance or Maintenance Scheduler.
-
Provide a clear description of the tool’s purpose, and assign a descriptive name to the node within your flow.
-
Define the input schema in JSON format. This schema helps the AI understand what data is required to perform the action and also validates incoming requests. For detailed guidance, refer to the Getting Started Guide.
Tip: You can also use the FlowFuse AI Assistant to generate the JSON schema automatically. Just click Ask FlowFuse Assistant in the input schema field and describe the expected input in plain English.
Below is an example schema for a Tool node. It shows how data is defined, its type, and which fields are required along with minimum lengths:
{
"type": "object",
"properties": {
"line": {
"type": "string",
"description": "The production line where maintenance is required",
"minLength": 1
},
"description": {
"type": "string",
"description": "Description of the maintenance task",
"minLength": 1
},
"priority": {
"type": "string",
"description": "Priority of the task",
"enum": [
"Low",
"Medium",
"High"
]
}
},
"required": [
"line",
"description",
"priority"
]
}
- Click Done, then deploy your flow.
At this stage, the tool becomes discoverable by connected AI clients. However, it will not perform any action until it is linked to a flow that executes a task, such as an HTTP Request node performing a POST operation, a Query node inserting data into a database, or an OPC UA Write node controlling a device.
- Drag the MCP Response node and connect its input to the output of the final node in your action flow.
The MCP Response node is necessary because the AI needs to receive the outcome of the action—whether it was successful. Errors are also fed back to the MCP Response node, enabling the AI to handle them appropriately.
- Deploy the flow once again.
Your MCP Tool is now active. When an AI agent invokes it, the connected flow executes the defined action and returns the result to the agent.
Example: Scheduling Maintenance for Production Lines
In this example, the flow includes a tool that triggers a POST request to the maintenance system API, which was developed using FlowFuse and the FlowFuse Dashboard. The AI Assistant was then asked to identify which production line was performing the worst and schedule a maintenance task for it.
Below is the flow that includes the Resource we created to monitor production lines and the Tool that sends a POST request.
Note: The flow uses the FlowFuse Query node and FlowFuse tables, which are only available on the Enterprise tier. If you do not have Enterprise, you can use other data sources instead, such as HTTP Request, OPC UA, or other database nodes.
If you need more example flows, you can import the examples that come with the MCP nodes. Click the main menu from the top right, click Import, switch to Examples, and look for @flowfuse-nodes/nr-mcp-server-node
, then select mcp_server and click Import. If you prefer a video tutorial, watch this video tutorial on YouTube.
With your MCP server, Resources, and Tools in place, the AI agent can now interact with your industrial systems in a structured way. Up to this point, we've covered the basics and demonstrated a simple workflow. The MCP Prompt node, which allows AI agents to be guided through complex, multi-step tasks, will be explored in a future article.
Conclusion
This guide demonstrated how to build a fully functional MCP server with FlowFuse and Node-RED, providing AI agents with structured access to industrial systems through Resources and Tools, which enable workflows such as monitoring production lines, scheduling maintenance, and automating operational decisions — all without complex coding.
FlowFuse recently added ONNX AI nodes. With these nodes, you can train custom models, deploy them in Node-RED, and execute tasks tailored to your processes. Combined with FlowFuse’s capabilities to collect, transform, and visualize industrial data, the platform makes development, monitoring, and optimization faster, smarter, and more scalable.
Adopting MCP with FlowFuse is a strategic step toward AI-enabled, future-ready industrial automation. Book a demo today to see how FlowFuse connects, transforms, and visualizes your industrial data while making AI-driven operations easy and actionable.
About the Author
Sumit Shinde
Technical Writer
Sumit is a Technical Writer at FlowFuse who helps engineers adopt Node-RED for industrial automation projects. He has authored over 100 articles covering industrial protocols (OPC UA, MQTT, Modbus), Unified Namespace architectures, and practical manufacturing solutions. Through his writing, he makes complex industrial concepts accessible, helping teams connect legacy equipment, build real-time dashboards, and implement Industry 4.0 strategies.
Related Articles:
- MCP and Custom AI Models on FlowFuse!
- EtherNet/IP Integration with FlowFuse: Communicating with Allen-Bradley PLCs
- The Node-RED Revolution: How Low-Code is Democratizing Industrial Automation
- Beyond Cloud AI Orchestration: Why the Future is Hybrid Edge-Cloud Intelligence
- What's the Difference Between Node-RED and FlowFuse