Coreflux MQTT MCP 服务器
这是一个模型上下文协议 (MCP) 服务器,它连接到 Coreflux MQTT 代理,并使 Coreflux 和 MQTT 操作可作为 Claude 和其他 MCP 兼容 AI 助手的工具。
特征
连接到 Coreflux MQTT 代理
为所有 Coreflux 命令(模型、操作、规则、路线)提供工具
发现并列出可用的操作
包含 LOT 语言文档作为资源
采用官方 MCP SDK 构建,可实现 Claude 无缝集成
用于配置的独立设置助手
设置助手
该服务器包含一个独立的安装助手,可以独立于主服务器运行。在以下情况下运行安装助手:
您需要创建一个初始配置(.env 文件)
您想要更新现有配置
您遇到连接问题,需要重新配置
要运行安装助手:
设置助手可以帮助您:
使用您的配置创建或更新
.env
文件配置 MQTT 代理设置(主机、端口、凭据)
如果需要,设置 TLS 配置
配置日志记录选项
配置完成后即可正常运行服务器。
将 Claude 连接到 MCP 服务器
使用 Claude 桌面配置
创建或编辑
~/Library/Application Support/Claude/claude_desktop_config.json
(macOS/Linux) 或%USERPROFILE%\AppData\Roaming\Claude\claude_desktop_config.json
(Windows)添加以下配置(相应地调整路径):
{ "mcpServers": { "coreflux": { "command": "python", "args": [ "/PATH/TO/server.py", "--mqtt-host", "localhost", "--mqtt-port", "1883", "--mqtt-user", "root", "--mqtt-password", "coreflux", "--mqtt-client-id", "claude-coreflux-client" ], "description": "Coreflux MQTT Broker Control", "icon": "🔄", "env": {} } } }重启Claude桌面
命令行参数
该服务器接受以下命令行参数。您也可以使用设置助手通过.env
文件配置这些设置:
争论 | 描述 | 默认 |
| MQTT 代理地址 | 本地主机 |
| MQTT 代理端口 | 1883 |
| MQTT 用户名 | - |
| MQTT 密码 | - |
| MQTT 客户端 ID | 克劳德-mcp-客户端 |
| 为 MQTT 连接启用 TLS | 错误的 |
| CA证书文件的路径 | - |
| 客户端证书文件的路径 | - |
| 客户端密钥文件路径 | - |
| 日志级别(DEBUG/INFO/WARNING/ERROR/CRITICAL) | 信息 |
可用工具
服务器提供了常用 Coreflux 命令的工具:
add_rule
:添加新的权限规则remove_rule
:删除权限规则add_route
:添加新的路由连接remove_route
:删除路由连接add_model
:添加新的模型结构remove_model
:删除模型结构add_action
:添加新的动作事件/功能remove_action
:删除动作事件/功能run_action
:运行动作事件/函数remove_all_models
:删除所有模型remove_all_actions
:删除所有操作remove_all_routes
:删除所有路线list_discovered_actions
:列出所有发现的 Coreflux 操作request_lot_code
:根据自然语言提示生成 LOT 代码
调试和故障排除
如果您遇到问题:
在 Claude 配置中验证您的 MQTT 代理凭据
确保代理可以访问
运行安装助手来验证或更新您的配置:
python setup_assistant.py检查 Claude Desktop 日志:
# Check Claude's logs for errors (macOS/Linux) tail -n 20 -f ~/Library/Logs/Claude/mcp*.log # Windows PowerShell Get-Content -Path "$env:USERPROFILE\AppData\Roaming\Claude\Logs\mcp*.log" -Tail 20 -Wait使用调试日志运行服务器:
# Direct execution with debug logging python server.py --mqtt-host localhost --mqtt-port 1883 --log-level DEBUG
参考
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
将 Claude 和其他与 MCP 兼容的 AI 助手连接到 Coreflux MQTT 代理,使他们能够通过自然语言发现和执行用于管理模型、动作、规则和路线的 Coreflux 命令。
Related MCP Servers
- -securityFlicense-qualityA comprehensive suite of Model Context Protocol servers designed to extend AI agent Claude's capabilities with integrations for knowledge management, reasoning, advanced search, news access, and workspace tools.Last updated -5
- -securityAlicense-qualityA Model Context Protocol server that connects Claude and other MCP clients to Aider, enabling AI assistants to efficiently edit files, create new files, and interact with git repositories through natural language.Last updated -34The Unlicense
- AsecurityFlicenseAqualityA Model Context Protocol (MCP) server that allows Claude AI to interact with custom tools, enabling extension of Claude's capabilities through the MCP framework.Last updated -
- -securityAlicense-qualityA Model Context Protocol server that connects to Coreflux MQTT brokers, enabling AI assistants like Claude to manage Coreflux commands, actions, rules, and routes through natural language interactions.Last updated -3Apache 2.0