- Explore MCP Servers
- drools-mcp
Drools Mcp
What is Drools Mcp
Drools MCP is a proof of concept/test project designed to explore how a Model-Driven Code Generation (MCP) system for Drools can assist in generating code with Large Language Models (LLMs). It is based on the Quarkus Weather MCP example.
Use cases
Use cases for Drools MCP include validating business rules in applications, generating DRL code for rule engines, and ensuring compliance with naming and structural standards in rule definitions.
How to use
To use Drools MCP, you need to have Java, JBang, and a connection method to the MCP such as Claude Desktop. The setup involves configuring the MCP server with specific commands to run the DRL verifier.
Key features
Key features include tools for running DRL code, structural validation for rules, patterns, and fields, and checks for element naming conventions, field existence, salience usage, and nested ‘from’ statements.
Where to use
Drools MCP can be used in software development environments where rule-based systems are implemented, particularly in applications that require complex business logic and decision-making processes.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Drools Mcp
Drools MCP is a proof of concept/test project designed to explore how a Model-Driven Code Generation (MCP) system for Drools can assist in generating code with Large Language Models (LLMs). It is based on the Quarkus Weather MCP example.
Use cases
Use cases for Drools MCP include validating business rules in applications, generating DRL code for rule engines, and ensuring compliance with naming and structural standards in rule definitions.
How to use
To use Drools MCP, you need to have Java, JBang, and a connection method to the MCP such as Claude Desktop. The setup involves configuring the MCP server with specific commands to run the DRL verifier.
Key features
Key features include tools for running DRL code, structural validation for rules, patterns, and fields, and checks for element naming conventions, field existence, salience usage, and nested ‘from’ statements.
Where to use
Drools MCP can be used in software development environments where rule-based systems are implemented, particularly in applications that require complex business logic and decision-making processes.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Drools MCP
This is a POC/test project made to see how a MCP made for Drools could help in generating code with LLMs.
The Quarkus Weather MCP example was used as a base. Most of the code is generated with AI so if there are bugs, I blame it.
Requirements
You need to have the following:
- Java
- JBang
- Claude Desktop or some other method for connecting to the MCP
Setup for Claude would be:
{
"mcpServers": {
"drl-verifier": {
"command": "jbang",
"args": ["--quiet",
"org.drools:drl-verifier:1.0.0-SNAPSHOT:runner"]
}
}
}
Details
DRLValidator.java lists the available tools.
These tools include two ways to run DRL code and one for structural validation.
Structured validation covers cases like rule, pattern and field validation.
The rules can check that:
- The names of the elements are in correct format and do not include any unwanted wording.
- A fact type has an existing field and you want to prevent that from being used.
- Block the use of salience. Some LLM models seem to force that in.
- Stop excessive use of nested ‘froms’
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.