feat: serve the mcp endpoint behind the licence feature

This commit is contained in:
2026-09-08 13:57:21 +00:00
parent 674236bb76
commit 0166b17299
7 changed files with 157 additions and 0 deletions
+8
View File
@@ -22,6 +22,7 @@ import (
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/bus"
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/db"
grpcserver "gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/grpc"
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/mcp"
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/monitorsched"
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/services"
"gitea.hostxtra.co.uk/mrhid6/vantage/server/internal/vulnsched"
@@ -196,7 +197,14 @@ func runSchemaSetup() {
}
// apiVersion mirrors the @version annotation on the swagger block above,
// which is the only version string this server already establishes — there is
// no separate runtime build-version constant to reuse instead.
const apiVersion = "1.0"
func serve() {
mcp.SetVersion(apiVersion)
redisAddr := getEnv("REDIS_ADDR", "localhost:6379")
redisUser := os.Getenv("REDIS_USERNAME")
redisPass := os.Getenv("REDIS_PASSWORD")