Token导航 LogoToken导航TokenDH.com
Node Red Contrib MCP logo
AI代理未说明官方级别未说明来源级核验

Node Red Contrib MCP

MCP Server

连接Node-RED与AI代理的开源工具,支持可视化构建AI代理工作流,无需编码。

工具数

4

提示词数

0

GitHub Stars

9

资源数

0
AI代理JavaScriptClaudeClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

TobiasLante

提供方

TobiasLante

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

node-red-contrib-mcp

The bridge between Node-RED and AI agents

Install · Quick Start · Nodes · AI Agent · Examples

______________________________________________________________________

Multi-phase OEE analysis agent built with MCP tool nodes in Node-RED

主控程序 (模型上下文协议)是Anthropic为将人工智能连接到外部工具和数据而制定的开放标准。 此包将MCP带到Node-RED --全球最受欢迎的工业自动化和物联网低代码平台。

4M+节点RED安装 遇见 10000多台MCP服务器。 直观地构建AI代理。无需代码。

______________________________________________________________________

特性

  • 任何MCP服务器 --可流式传输HTTP和SSE,带可选身份验证
  • 任何 LLM -OpenAI、Anthropic、Ollama、vLLM、Azure、Gemini或任何与OpenAI兼容的API
  • AI代理节点 --全代理循环(工具发现→ LLM推理→ 工具执行→ 重复)
  • 零锁定 --Apache-2.0许可证,无云依赖,完全本地运行
  • 生产就绪 --错误处理、状态指示器、可配置超时
  • 节点RED原生 --配置节点、消息传递、调试面板集成

______________________________________________________________________

建筑

┌─────────────────────────────────────────────────────────────────┐
│  Node-RED                                                       │
│                                                                 │
│  [inject] → [mcp tool] → [llm call] → [mcp tool] → [debug]   │
│                                                                 │
│  [inject] → [ai agent] → [debug]    ← autonomous agent loop   │
│                                                                 │
└──────────┬──────────────────────────────────────┬───────────────┘
           │                                      │
           ▼                                      ▼
    ┌──────────────┐                      ┌──────────────┐
    │  MCP Server  │                      │   LLM API    │
    │  (any tool)  │                      │  (any model) │
    └──────────────┘                      └──────────────┘

______________________________________________________________________

安装

cd ~/.node-red
npm install node-red-contrib-mcp

或搜索 node-red-contrib-mcp 在调色板管理器中:

Menu → 管理调色板→ 安装→ node-red-contrib-mcp

______________________________________________________________________

节点

节点描述
MCP服务器*配置* -MCP服务器连接(URL、传输、API密钥)
llm配置*配置* -LLM提供程序(基本URL、模型、API密钥)
mcp工具调用任何MCP工具。将参数传递为 msg.payload,配置中的工具名称或 msg.topic
mcp工具列出MCP服务器上的所有可用工具。非常适合发现和调试
mcp资源读取MCP服务器公开的资源
llm呼叫调用任何与OpenAI兼容的LLM。支持系统提示、JSON模式、多回合聊天
AI代理自主代理 --LLM+MCP工具处于推理循环中,直到得到答案

______________________________________________________________________

快速开始

1.调用MCP工具

[inject {"machine": "CNC-001"}] → [mcp tool "get_oee"] → [debug]

2.LLM+MCP管道

[inject] → [mcp tool "get_data"] → [llm call "Summarize this"] → [debug]

3.AI Agent(魔法节点)

[inject "Why did OEE drop on machine 9014?"] → [ai agent] → [debug]

代理人 自主地 发现工具、调用原因,执行它们,并综合最终答案。与ChatGPT或Claude的模式相同,但具有可视性、可审计性和Node-RED。

______________________________________________________________________

AI 代理

ai agent node运行一个完整的代理推理循环:

User: "Why did OEE drop on machine 9014 last week?"

  ┌─── Agent Loop ──────────────────────────────────────────┐
  │                                                         │
  │  Step 1: LLM sees 91 tools, picks get_oee              │
  │          → calls MCP server → gets OEE data             │
  │                                                         │
  │  Step 2: LLM analyzes, picks get_downtime_events        │
  │          → calls MCP server → gets 3 events             │
  │                                                         │
  │  Step 3: LLM synthesizes final answer                   │
  │                                                         │
  └─────────────────────────────────────────────────────────┘

Agent: "OEE dropped from 85% to 62% due to 3 unplanned stops:
        bearing failure (47min), tool change delay (23min),
        and material shortage (18min)."

  msg.agentLog = [{tool: "get_oee", ...}, {tool: "get_downtime_events", ...}]
  msg.iterations = 3

代理设置

设置默认值说明
MCP服务器--工具使用哪个MCP服务器
LLM--哪个LLM提供推理
系统提示--代理个性和说明
最大循环次数10最大LLM↔ 工具迭代
温度0.3LLM创造力(0=专注,1=创造力)

______________________________________________________________________

例子

导入此流

复制下面的JSON,然后在Node-RED中: Menu → 导入→ Paste

Example: MCP Tool Call

[
  {
    "id": "mcp-demo-inject",
    "type": "inject",
    "name": "Trigger",
    "props": [{ "p": "payload" }],
    "payload": "{\"machine_id\": \"CNC-001\"}",
    "payloadType": "json",
    "wires": [["mcp-demo-tool"]],
    "x": 150,
    "y": 100
  },
  {
    "id": "mcp-demo-tool",
    "type": "mcp-tool-call",
    "name": "Get OEE",
    "server": "mcp-demo-server",
    "toolName": "get_oee",
    "wires": [["mcp-demo-debug"]],
    "x": 350,
    "y": 100
  },
  {
    "id": "mcp-demo-debug",
    "type": "debug",
    "name": "Result",
    "active": true,
    "x": 550,
    "y": 100
  },
  {
    "id": "mcp-demo-server",
    "type": "mcp-server-config",
    "name": "My MCP Server",
    "url": "http://localhost:8021/mcp",
    "transportType": "http"
  }
]

Example: AI Agent

[
  {
    "id": "agent-demo-inject",
    "type": "inject",
    "name": "Ask question",
    "props": [{ "p": "payload" }],
    "payload": "What is the current OEE of machine CNC-001 and what are the main loss factors?",
    "payloadType": "str",
    "wires": [["agent-demo-agent"]],
    "x": 170,
    "y": 100
  },
  {
    "id": "agent-demo-agent",
    "type": "ai-agent",
    "name": "Factory Agent",
    "server": "agent-demo-mcp",
    "llmConfig": "agent-demo-llm",
    "systemPrompt": "You are a manufacturing AI assistant. Use the available MCP tools to answer questions about factory operations. Be precise and cite specific numbers.",
    "maxIterations": 10,
    "temperature": 0.3,
    "maxTokens": 4096,
    "wires": [["agent-demo-debug"]],
    "x": 400,
    "y": 100
  },
  {
    "id": "agent-demo-debug",
    "type": "debug",
    "name": "Agent Response",
    "active": true,
    "x": 620,
    "y": 100
  },
  {
    "id": "agent-demo-mcp",
    "type": "mcp-server-config",
    "name": "Factory MCP",
    "url": "http://localhost:8024/mcp",
    "transportType": "http"
  },
  {
    "id": "agent-demo-llm",
    "type": "llm-config",
    "name": "OpenAI",
    "baseUrl": "https://api.openai.com/v1",
    "model": "gpt-4o"
  }
]

Example: MQTT → AI Agent → MQTT (IIoT)

[
  {
    "id": "mqtt-in",
    "type": "mqtt in",
    "name": "machine/alerts",
    "topic": "machine/+/alert",
    "broker": "mqtt-broker",
    "wires": [["mqtt-agent"]],
    "x": 150,
    "y": 100
  },
  {
    "id": "mqtt-agent",
    "type": "ai-agent",
    "name": "Alert Agent",
    "server": "mqtt-mcp-server",
    "llmConfig": "mqtt-llm",
    "systemPrompt": "You are an industrial AI agent. When you receive a machine alert, investigate using MCP tools and recommend an action. Be concise.",
    "maxIterations": 5,
    "wires": [["mqtt-out"]],
    "x": 380,
    "y": 100
  },
  {
    "id": "mqtt-out",
    "type": "mqtt out",
    "name": "machine/actions",
    "topic": "machine/actions",
    "broker": "mqtt-broker",
    "x": 600,
    "y": 100
  }
]

*MQTT警报进入→ AI代理通过MCP工具进行调查→ 操作通过MQTT发出。*

______________________________________________________________________

兼容

MCP服务器

使用 任何MCP服务器 支持流式HTTP或SSE传输:

  • OpenShopFloor --111种制造MCP工具(ERP、OEE、QMS、TMS、UNS、KG)
  • Anthropic MCP服务器 --文件系统、GitHub、PostgreSQL、Slack、谷歌云端硬盘。..
  • 您构建的任何自定义MCP服务器

大语言模型提供商

使用 任何与OpenAI兼容的API:

提供者基本URL
OpenAIhttps://api.openai.com/v1
Ollama(当地)http://localhost:11434/v1
Azure OpenAIhttps://YOUR.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT/v1
vLLMhttp://localhost:8000/v1
文学硕士http://localhost:4000/v1
LM工作室http://localhost:1234/v1
Anthropic通过LiteLLM代理

______________________________________________________________________

msg参考

mcp工具调用

方向属性类型描述
输入msg.payloadobject工具参数
输入msg.topicstring工具名称(如果未在配置中设置)
输出msg.payload任意工具结果(自动解析的JSON)
输出msg.mcpResultobject原始MCP响应

人工智能代理

方向属性类型描述
输入msg.payloadstring用户问题或任务
输出msg.payloadstring代理的最终答案
输出msg.agentLog阵列[{tool, args, result}] 每次通话
输出msg.iterationsnumberLLM推理步骤总数

llm呼叫

方向属性类型描述
输入msg.payloadstring用户消息
输入msg.messagesarray上一次对话(多回合)
输入msg.toolsarrayOpenAI格式工具定义
输出msg.payloadstringLLM响应文本
输出msg.toolCallsarray工具调用(如果有)
输出msg.usageobject令牌使用统计信息

______________________________________________________________________

配置

MCP服务器(配置节点)

字段描述示例
统一资源定位符MCP服务器端点http://localhost:3001/mcp
运输协议变体Streamable HTTP (默认)或 SSE
API密钥可选不记名代币sk-...

LLM提供程序(配置节点)

字段描述示例
基础URLOpenAI兼容端点https://api.openai.com/v1
模型型号标识符gpt-4o
API密钥您的API密钥sk-...

______________________________________________________________________

用例

域名您可以构建什么
制造OEE监控、容量规划、预测性维护、质量根本原因分析
工业物联网MQTT→ AI 代理→ MQTT管道、传感器数据分析、异常检测
楼宇自动化智能能源管理,BACnet/Modbus+AI推理
IT/DevOps数据库代理、日志分析、自动事件响应
原型设计实现代理人工智能原型的最快方法——Node-RED中的可视化调试

______________________________________________________________________

需求

  • 节点红色>=3.0.0
  • Node.js>=18.0.0
  • 要连接的MCP服务器
  • LLM API密钥(用于 llm-callai-agent 节点)

贡献

问题和PR欢迎!

许可证

阿帕奇-2.0 --无论在商业上还是非商业上,都可以在任何地方使用它。

______________________________________________________________________

Built by OpenShopFloor — the open-source AI platform for factory operations

Live Demo · GitHub · Node-RED Flow Library

目录标签

目录标签

AI代理JavaScriptClaude本地部署Node-RED插件低代码平台工业自动化物联网

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP