Coreflux MCP Server

Coreflux MCP Server

Connects Claude and other MCP-compatible AI assistants to a Coreflux MQTT broker, enabling them to discover and execute Coreflux commands for managing models, actions, rules, and routes through natural language.

Category
Visit Server

README

Coreflux MCP Server

This is a Model Context Protocol (MCP) server that connects to a Coreflux MQTT broker and makes Coreflux actions available as tools for Claude and other MCP-compatible AI assistants.

Features

  • Connects to Coreflux MQTT broker
  • Provides tools for all Coreflux commands (models, actions, rules, routes)
  • Discovers and lists available actions
  • Includes LOT language documentation as resources
  • Built with the official MCP SDK for seamless Claude integration

Quick Start

Using Docker Compose (Recommended)

  1. Copy the example environment file:

    cp .env.example .env
    
  2. Edit the .env file with your MQTT broker details:

    MQTT_BROKER=your-broker-address
    MQTT_PORT=1883
    MQTT_USER=your-username
    MQTT_PASSWORD=your-password
    
  3. Run with docker-compose:

    docker-compose up -d
    

Using Python (Local Development)

  1. Install the MCP SDK and required dependencies:

    pip install "mcp[cli]" paho-mqtt
    
  2. Run the server with environment variables:

    MQTT_BROKER=your-broker-address MQTT_PORT=1883 python server.py
    

Connecting Claude to the MCP Server

Recommended Approach: Using Claude Desktop Config

  1. Create or edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS/Linux) or equivalent Windows path
  2. Add the following configuration (adjust the paths accordingly):
    {
      "mcpServers": {
        "coreflux": {
          "command": "python",
          "args": [
            "/ABSOLUTE/PATH/TO/server.py"
          ],
          "description": "Coreflux MQTT Broker Control",
          "icon": "🔄",
          "env": {
            "MQTT_BROKER": "localhost",
            "MQTT_PORT": "1883",
            "MQTT_USER": "",
            "MQTT_PASSWORD": ""
          }
        }
      }
    }
    
  3. Restart Claude Desktop

Alternative: Using the CLI

If you're running the server directly:

mcp server add coreflux --command python --args "/ABSOLUTE/PATH/TO/server.py"

Environment Variables

Variable Description Default
MQTT_BROKER MQTT broker address localhost
MQTT_PORT MQTT broker port 1883
MQTT_USER MQTT username -
MQTT_PASSWORD MQTT password -
MQTT_USE_TLS Enable TLS for MQTT connection false
MQTT_CA_CERT Path to CA certificate file -
MQTT_CLIENT_CERT Path to client certificate file -
MQTT_CLIENT_KEY Path to client key file -

Available Tools

The server provides tools for common Coreflux commands:

  • add_rule: Add a new permission rule
  • remove_rule: Remove a permission rule
  • add_route: Add a new route connection
  • remove_route: Remove a route connection
  • add_model: Add a new model structure
  • remove_model: Remove a model structure
  • add_action: Add a new action event/function
  • remove_action: Remove an action event/function
  • run_action: Run an action event/function
  • remove_all_models: Remove all models
  • remove_all_actions: Remove all actions
  • remove_all_routes: Remove all routes
  • list_discovered_actions: List all discovered Coreflux actions

LOT Language Resources

The server includes documentation on the LOT language:

  • lot://documentation/models: Guide to LOT models
  • lot://documentation/rules: Guide to LOT rules
  • lot://documentation/actions: Guide to LOT actions

Debugging and Troubleshooting

If you encounter issues:

  1. Verify your MQTT broker credentials in your environment variables
  2. Ensure the broker is accessible
  3. Check Claude Desktop logs:
    # Check Claude's logs for errors (macOS/Linux)
    tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
    
  4. Run the server in debug mode:
    # Direct execution with debug logging
    python server.py --debug
    

References

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured