Skip to main content
Glama

Coreflux MCP Server

Official

Coreflux MQTT MCP 服务器

这是一个模型上下文协议 (MCP) 服务器,它连接到 Coreflux MQTT 代理,并使 Coreflux 和 MQTT 操作可作为 Claude 和其他 MCP 兼容 AI 助手的工具。

特征

  • 连接到 Coreflux MQTT 代理
  • 为所有 Coreflux 命令(模型、操作、规则、路线)提供工具
  • 发现并列出可用的操作
  • 包含 LOT 语言文档作为资源
  • 采用官方 MCP SDK 构建,可实现 Claude 无缝集成
  • 用于配置的独立设置助手

设置助手

该服务器包含一个独立的安装助手,可以独立于主服务器运行。在以下情况下运行安装助手:

  • 您需要创建一个初始配置(.env 文件)
  • 您想要更新现有配置
  • 您遇到连接问题,需要重新配置

要运行安装助手:

python setup_assistant.py

设置助手可以帮助您:

  • 使用您的配置创建或更新.env文件
  • 配置 MQTT 代理设置(主机、端口、凭据)
  • 如果需要,设置 TLS 配置
  • 配置日志记录选项

配置完成后即可正常运行服务器。

将 Claude 连接到 MCP 服务器

使用 Claude 桌面配置

  1. 创建或编辑~/Library/Application Support/Claude/claude_desktop_config.json (macOS/Linux) 或%USERPROFILE%\AppData\Roaming\Claude\claude_desktop_config.json (Windows)
  2. 添加以下配置(相应地调整路径):
    { "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": {} } } }
  3. 重启Claude桌面

命令行参数

该服务器接受以下命令行参数。您也可以使用设置助手通过.env文件配置这些设置:

争论描述默认
--mqtt-hostMQTT 代理地址本地主机
--mqtt-portMQTT 代理端口1883
--mqtt-userMQTT 用户名-
--mqtt-passwordMQTT 密码-
--mqtt-client-idMQTT 客户端 ID克劳德-mcp-客户端
--mqtt-use-tls为 MQTT 连接启用 TLS错误的
--mqtt-ca-certCA证书文件的路径-
--mqtt-client-cert客户端证书文件的路径-
--mqtt-client-key客户端密钥文件路径-
--log-level日志级别(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 代码

调试和故障排除

如果您遇到问题:

  1. 在 Claude 配置中验证您的 MQTT 代理凭据
  2. 确保代理可以访问
  3. 运行安装助手来验证或更新您的配置:
    python setup_assistant.py
  4. 检查 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
  5. 使用调试日志运行服务器:
    # Direct execution with debug logging python server.py --mqtt-host localhost --mqtt-port 1883 --log-level DEBUG

参考

-
security - not tested
A
license - permissive license
-
quality - not tested

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 命令。

  1. 特征
    1. 设置助手
      1. 将 Claude 连接到 MCP 服务器
        1. 使用 Claude 桌面配置
        2. 命令行参数
      2. 可用工具
        1. 调试和故障排除
          1. 参考

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              A 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
              TypeScript
              • Apple
            • -
              security
              A
              license
              -
              quality
              A 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 -
              34
              Python
              The Unlicense
              • Linux
              • Apple
            • A
              security
              F
              license
              A
              quality
              A 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 -
              TypeScript
              • Apple
            • -
              security
              A
              license
              -
              quality
              A 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 -
              2
              Python
              Apache 2.0
              • Apple
              • Linux

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/CorefluxCommunity/CorefluxMCPServer'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server