-
Notifications
You must be signed in to change notification settings - Fork 212
hawkBit MCP server #2871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
hawkBit MCP server #2871
Conversation
denislavprinov
commented
Jan 15, 2026
- Introduces a new Model Context Protocol (MCP) server module (hawkbit-mcp) that enables AI assistants to interact with hawkBit
- Provides MCP tools for managing all hawkBit entities: Targets, Distribution Sets, Software Modules, Rollouts, Actions, and Target Filters
- Includes MCP resources for hawkBit documentation
- Exposes predefined prompts
- Supports credential pass-through authentication to hawkBit REST API
dc059b7 to
b0d48e0
Compare
hawkbit-monolith/hawkbit-update-server/src/main/resources/application.properties
Outdated
Show resolved
Hide resolved
hawkbit-mcp/src/main/java/org/eclipse/hawkbit/mcp/server/HawkbitMcpServerApplication.java
Show resolved
Hide resolved
...-mcp/src/main/java/org/eclipse/hawkbit/mcp/server/client/HawkBitAuthenticationValidator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com>
f1f3e2d to
1607ecf
Compare
…er build Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com>
1607ecf to
5946a09
Compare
|
|
|
||
| ```bash | ||
| # Linux/Mac | ||
| echo -n "<TENANT>\\<USERNAME>:<PASSWORD>" | base64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<TENANT>\\<USERNAME> does not work in hawkbit. Authentication should be only with <USERNAME> only.
| */ | ||
| @Slf4j | ||
| @Component | ||
| public class HawkbitAuthenticationValidator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider makingHawkbitAuthenticationValidator conditional on property hawkbit.mcp.validation.enabled
When disabled:
- No HawkbitAuthenticationValidator bean will be created
- No authentication cache will be created
- The security filter chain will be lightweight
| @Slf4j | ||
| @Configuration | ||
| @RequiredArgsConstructor | ||
| public class HawkbitClientConfiguration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider separating Http and STDIO Client Configurations, making them conditional on a mode property.
Benefits of This Approach:
- Each configuration class handles exactly one mode
- Mode is set via property, not runtime guessing
- Implementation is simpler and more readable
- Easy to add new modes
| * Rollout-specific operation configuration including lifecycle operations. | ||
| */ | ||
| @Data | ||
| public static class RolloutConfig extends EntityConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding @EqualsAndHashCode(callSuper = true/false) if equals/hashCode implementation must (not) call super class.
| Long actionId, | ||
| List<Long> actionIds, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need both actionId and actionIds?
| * @param createBody the request body for CREATE operation | ||
| * @param updateBody the request body for UPDATE operation | ||
| */ | ||
| public record ManageDistributionSetRequest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather create different Create/Update/Delete Requests.
The Sealed interface could be used. When migrating to Java 21, the switch with pattern match is a really good approach here.
| public record ManageRolloutRequest( | ||
| RolloutOperation operation, | ||
| Long rolloutId, | ||
| MgmtRolloutRestRequestBodyPost createBody, | ||
| MgmtRolloutRestRequestBodyPut updateBody, | ||
| String remark | ||
| ) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment
| public record ManageSoftwareModuleRequest( | ||
| Operation operation, | ||
| Long softwareModuleId, | ||
| MgmtSoftwareModuleRequestBodyPost createBody, | ||
| MgmtSoftwareModuleRequestBodyPut updateBody | ||
| ) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment


