Get the FREE Ultimate OpenClaw Setup Guide →

node-red-contrib

MCP (Model Context Protocol) nodes for Node-RED — connect AI agents to any MCP server. Visual agentic AI for manufacturing, IoT, and automation.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tobiaslante-node-red-contrib-mcp node path/to/server.js \
  --env MCP_API_KEY="your-api-key-if-required" \
  --env MCP_BASE_URL="http://localhost:8021/mcp"

How to use

node-red-contrib-mcp enables you to connect Node-RED with MCP-enabled AI tools and run an autonomous AI agent workflow inside Node-RED. The package exposes a suite of MCP-related nodes, including a configurable MCP server connection, LLM configuration, and tool execution nodes. Use the mcp tool node to call any MCP tool by name and pass arguments via msg.payload, or use mcp tools to enumerate available tools from a connected MCP server. The ai agent node orchestrates a full agent loop that discovers tools, reasons over them with an LLM, executes the appropriate tools, and synthesizes a final answer. This makes it possible to implement data-driven, tool-assisted automation and decision-making flows directly in Node-RED without writing custom integration code.

How to install

Prerequisites:

  • Node.js (LTS version) and npm
  • Node-RED installed and running

Install the MCP package in your Node-RED environment:

  1. Navigate to your Node-RED user directory (commonly ~/.node-red).

  2. Install the package:

    npm install node-red-contrib-mcp

  3. Restart Node-RED and import or create flows using the new MCP nodes (mcp server, llm config, mcp tool, mcp tools, mcp resource, llm call, ai agent).

Optional: Use the Node-RED palette manager to search for and install node-red-contrib-mcp.

Configuration steps after installation:

  • Create an MCP server config node with the MCP server URL and transport settings.
  • Create an LLM config node with your provider URL and API key.
  • Add an mcp tool or mcp tools node to call specific MCP tools or to enumerate available tools.
  • Optionally add an ai agent node for autonomous reasoning loops.

Additional notes

Tips and common issues:

  • Ensure your MCP server URL and transport type (HTTP/SSE) match what your MCP server exposes.
  • If your MCP server requires authentication, provide API keys or tokens in the mcp server and llm config nodes.
  • The AI agent node will perform iterative tool calls; set reasonable maxIterations to avoid excessive API usage.
  • For debugging, enable the debug panel in Node-RED and inspect msg.payload and msg.agentLog for tool calls and results.
  • If you see connectivity errors, verify network access between Node-RED and the MCP server, and confirm that CORS or firewall restrictions are not blocking requests.
  • When using the AI agent, you can customize systemPrompt, maxIterations, and temperature to tune behavior and verbosity.

Related MCP Servers

Sponsor this space

Reach thousands of developers