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:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user