Coreflux MCP Server
OfficialCoreflux MQTT MCP 服务器
这是一个模型上下文协议 (MCP) 服务器,它连接到 Coreflux MQTT 代理,并使 Coreflux 和 MQTT 操作可作为 Claude 和其他 MCP 兼容 AI 助手的工具。
特征
连接到 Coreflux MQTT 代理
为所有 Coreflux 命令(模型、操作、规则、路线)提供工具
发现并列出可用的操作
包含 LOT 语言文档作为资源
采用官方 MCP SDK 构建,可实现 Claude 无缝集成
用于配置的独立设置助手
Related MCP server: MQTT MCP Server
设置助手
该服务器包含一个独立的安装助手,可以独立于主服务器运行。在以下情况下运行安装助手:
您需要创建一个初始配置(.env 文件)
您想要更新现有配置
您遇到连接问题,需要重新配置
要运行安装助手:
python setup_assistant.py设置助手可以帮助您:
使用您的配置创建或更新
.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
参考
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Connect AI clients to your Dactic work context through a hosted MCP service.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceConnects to a Coreflux MQTT broker and provides tools for managing Coreflux commands (models, actions, rules, routes) and executing MQTT operations through natural language interactions with AI assistants.-
- AlicenseNot gradedqualityDmaintenanceConnects AI assistants to MQTT brokers for smart home automation and IoT device control, enabling topic discovery, sensor reading, command sending, and event monitoring.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables LLM agents to securely monitor and control MQTT devices for building automation, industrial control, and smart home systems through a standardized MCP interface.25MIT
- FlicenseNot gradedqualityDmaintenanceProvides MQTT communication capabilities for Large Language Models and other clients, enabling connections to MQTT brokers, publishing and subscribing to topics, and managing real-time messaging workflows.-