Get the FREE Ultimate OpenClaw Setup Guide →

rulego

⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio rulego-rulego go run ./... \
  --env GO111MODULE="on"

How to use

RuleGo is an embedded and high-performance rule engine written in Go. It is designed to be integrated into existing Go applications or deployed as a standalone middleware to provide rule orchestration, dynamic rule chains, and a suite of built-in components for data processing, routing, and action execution. The engine enables you to build loosely coupled systems that can adapt in real time as business requirements change, leveraging features such as rule chains, workflow orchestration, dynamic component loading, and context isolation. You can deploy RuleGo in embedded mode within your Go service or run it standalone to act as a central rule processing hub that interfaces with various protocols and data sources. The README highlights a rich set of built-in components (e.g., message type switching, JavaScript-based logic, HTTP/MQTT push, logging, and email actions) and a design focused on modular, extensible rule chains that can be dynamically configured without restarting the main application.

How to install

Prerequisites:

  • Go 1.18+ installed on your system
  • A working Go module-aware environment

Installation steps:

  1. Install Go from the official site: https://golang.org/dl/
  2. Create or navigate to your Go module project
  3. Add RuleGo as a dependency and build/run as needed. If you intend to run RuleGo directly for experimentation, use the example below.

Example steps:

# Initialize a new module (if starting from scratch)
go mod init your-module-name

# Add RuleGo as a dependency (as per the repository's module path)
# Example; replace with the correct module path if different
go get github.com/rulego/rulego

# Run an example or your own application that imports RuleGo
# This runs the library as a module in your project; adjust to your build setup

If you prefer to run RuleGo as a standalone module, you can clone the repository and run or build it directly within its own module context, then integrate with your services as needed.

Additional notes

Tips and common issues:

  • Ensure Go modules are enabled (GO111MODULE=on) to properly resolve RuleGo dependencies.
  • When embedding RuleGo, design your rule chains (JSON-based definitions) to be loaded at startup or refreshed dynamically without restarting the host application.
  • Take advantage of the built-in components (e.g., JavaScript Switch/Transformer, HTTP/MQTT Push, logging) to minimize external dependencies.
  • If you need hot deployment or dynamic updates, leverage RuleGo's dynamic loading capabilities to swap components or extend behavior without downtime.
  • Verify compatibility with your data formats and endpoints (HTTP, MQTT, Kafka, etc.) and ensure proper security considerations for exposed endpoints.

Related MCP Servers

Sponsor this space

Reach thousands of developers