Restructure hawkbit-mcp into starter/server modules following the hawkbit conventions (#2923)

Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com>
This commit is contained in:
Denislav Prinov
2026-02-17 10:56:51 +02:00
committed by GitHub
parent 0ab3207568
commit 8ee76412b0
31 changed files with 239 additions and 117 deletions

View File

@@ -0,0 +1,62 @@
<!--
Copyright (c) 2026 Contributors to the Eclipse Foundation
This program and the accompanying materials are made
available under the terms of the Eclipse Public License 2.0
which is available at https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-mcp-parent</artifactId>
<version>${revision}</version>
</parent>
<artifactId>hawkbit-mcp-server</artifactId>
<name>hawkBit :: MCP :: Server (Standalone)</name>
<description>Standalone MCP server that connects to hawkBit via REST API</description>
<properties>
<spring.app.class>org.eclipse.hawkbit.mcp.server.McpServerStart</spring.app.class>
</properties>
<dependencies>
<dependency>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-mcp-starter</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<outputDirectory>${baseDir}</outputDirectory>
<mainClass>${spring.app.class}</mainClass>
<layout>JAR</layout>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>

View File

@@ -0,0 +1,29 @@
/**
* Copyright (c) 2026 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.hawkbit.mcp.server;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration;
/**
* Standalone MCP Server application that connects to hawkBit via REST API.
* <p>
* This server acts as a proxy between MCP clients and hawkBit,
* passing through authentication credentials to the hawkBit REST API.
* </p>
*/
@SpringBootApplication(exclude = UserDetailsServiceAutoConfiguration.class)
public class McpServerStart {
public static void main(final String[] args) {
SpringApplication.run(McpServerStart.class, args);
}
}

View File

@@ -0,0 +1,54 @@
#
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Server configuration
server.port=8081
# Jackson configuration - accept both uppercase and lowercase enum values
# This allows LLMs to use either "FORCED" or "forced" for enum fields like MgmtActionType
spring.jackson.mapper.accept-case-insensitive-enums=true
# Spring application name
spring.application.name=hawkbit-mcp-server
# Spring AI MCP Server configuration
spring.ai.mcp.server.enabled=true
spring.ai.mcp.server.name=hawkbit-mcp-server
spring.ai.mcp.server.version=1.0.0
spring.ai.mcp.server.type=SYNC
spring.ai.mcp.server.protocol=STREAMABLE
# Change from HTTP to STDIO
#spring.ai.mcp.server.stdio=true
#spring.ai.mcp.server.protocol=STDIO
spring.ai.mcp.server.capabilities.prompt=true
# hawkBit connection configuration
hawkbit.mcp.mgmt-url=${HAWKBIT_URL:http://localhost:8080}
# Authentication validation configuration
hawkbit.mcp.validation.cache-ttl=600s
hawkbit.mcp.validation.cache-max-size=1000
# Logging configuration
logging.level.org.eclipse.hawkbit.mcp=DEBUG
logging.level.org.springframework.ai.mcp=DEBUG
# Global: disable all deletes by default
#hawkbit.mcp.operations.delete-enabled=false
# But allow delete for targets specifically
#hawkbit.mcp.operations.targets.delete-enabled=true
# Disable rollout lifecycle operations
#hawkbit.mcp.operations.rollouts.start-enabled=false
#hawkbit.mcp.operations.rollouts.approve-enabled=false
# Disable software modules delete operations
#hawkbit.mcp.operations.software-modules.delete-enabled=false