RuleGo

v1.0.0APIsstable

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

aiautomationdata-flowedge-computinggo
Share:
1,511
Stars
0
Downloads
0
Weekly
0/5

What is RuleGo?

RuleGo is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ⛓️rulego is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for go.

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

This server falls under the APIs category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • ⛓️RuleGo is a lightweight, high-performance, embedded, next-

Use Cases

Component orchestration rule engine
IoT and edge computing workflows
rulego

Maintainer

LicenseApache-2.0
Languagego
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx rulego

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use RuleGo

RuleGo is a lightweight, high-performance, embeddable rule engine framework written in Go that enables dynamic component orchestration and data flow automation without application restarts. It supports rule chain definitions in JSON DSL, multiple integration protocols (HTTP, MQTT, TCP/UDP, Kafka), and is designed for IoT edge computing, iPaaS workflows, and low-code automation scenarios. While it is primarily a Go library/framework rather than a standalone MCP server, it can be embedded into Go applications or wrapped in an MCP-compatible service to enable AI agents to trigger, query, and manage business rule processing pipelines.

Prerequisites

  • Go 1.20 or higher installed
  • Basic familiarity with Go modules and the go get toolchain
  • An MCP-compatible client such as Claude Desktop if integrating via MCP
  • Optional: MQTT broker (e.g., Mosquitto) for IoT use cases, Kafka for stream processing
1

Add RuleGo to your Go module

Install the RuleGo package into your Go project using go get. This pulls the latest stable release from GitHub.

go get github.com/rulego/rulego
2

Define a rule chain in JSON

Create a JSON file that describes your rule chain — the sequence of filter, transform, and action nodes that process incoming messages. This is the core configuration artifact in RuleGo.

{
  "ruleChain": {
    "id": "rule01",
    "name": "My Rule Chain"
  },
  "metadata": {
    "nodes": [
      {
        "id": "s1",
        "type": "restApiCall",
        "name": "Call API",
        "configuration": {
          "restEndpointUrlPattern": "https://api.example.com/data",
          "requestMethod": "GET"
        }
      }
    ],
    "connections": []
  }
}
3

Create a RuleGo engine in Go

Instantiate a rule engine from your JSON rule chain file. The engine loads the chain definition and is ready to process messages.

import (
  "github.com/rulego/rulego"
  "github.com/rulego/rulego/api/types"
)

ruleFile, _ := os.ReadFile("rule_chain.json")
ruleEngine, _ := rulego.New("rule01", ruleFile)

msg := types.NewMsg(0, "TEST", types.JSON, types.NewMetadata(), `{"key":"value"}`)
ruleEngine.OnMsg(msg)
4

Expose the engine via an MCP server wrapper

To use RuleGo through an MCP client, wrap the engine in an HTTP or stdio MCP server. Use the MCP Go SDK to define tools that trigger rule chains and return results to the AI client.

go get github.com/mark3labs/mcp-go
5

Configure your MCP client

Once you have built an MCP wrapper binary for your RuleGo instance, add it to your claude_desktop_config.json.

{
  "mcpServers": {
    "rulego": {
      "command": "/path/to/your/rulego-mcp-server",
      "args": ["--config", "/path/to/rule_chains/"],
      "env": {}
    }
  }
}

RuleGo Examples

Client configuration

Example claude_desktop_config.json for a custom RuleGo MCP server binary.

{
  "mcpServers": {
    "rulego": {
      "command": "/usr/local/bin/rulego-mcp",
      "args": ["--chains", "/etc/rulego/chains/"],
      "env": {
        "RULEGO_LOG_LEVEL": "info"
      }
    }
  }
}

Prompts to try

Example prompts for interacting with a RuleGo-powered MCP server.

- "Trigger the data-processing rule chain with this JSON payload: {\"sensor\": \"temp01\", \"value\": 23.5}"
- "List all active rule chains currently loaded in the engine"
- "Update the API endpoint in rule chain rule01 to point to the new backend"
- "Show me the processing result for the last 10 messages through chain iot-alerts"

Troubleshooting RuleGo

go get fails or shows module not found errors

Ensure your go.mod file has been initialized with: go mod init your-module-name. Also check your GOPROXY setting — if your network blocks the default proxy, set: GOPROXY=https://goproxy.cn,direct for Chinese networks or use the Gitee mirror: gitee.com/rulego/rulego.

Rule chain fails to load with JSON parsing errors

Validate your JSON rule chain file with a JSON linter. The ruleChain.id field must match the ID passed to rulego.New(). Also ensure all node type names are exact — typos in type strings cause silent load failures.

Rule chain processes messages but produces no output

Enable debug mode on individual nodes by setting debugMode: true in the node configuration. Then attach a debug callback via rulego.NewConfig(rulego.WithDebugCallbackFunc(...)) to log the output of each node as messages flow through the chain.

Frequently Asked Questions about RuleGo

What is RuleGo?

RuleGo is a Model Context Protocol (MCP) server that ⛓️rulego is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for go. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install RuleGo?

Follow the installation instructions on the RuleGo GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with RuleGo?

RuleGo works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is RuleGo free to use?

Yes, RuleGo is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More APIs MCP Servers

Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "rulego": { "command": "npx", "args": ["-y", "rulego"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use RuleGo?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides