Skip to content

Commit 4f98220

Browse files
committed
fix: version management and docker
1 parent 3d95f84 commit 4f98220

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM gcr.io/distroless/base:debug
3+
FROM gcr.io/distroless/base:nonroot
44
COPY ./firebolt-mcp-server /usr/local/bin/firebolt-mcp-server
55
ENTRYPOINT ["/usr/local/bin/firebolt-mcp-server"]

cmd/firebolt-mcp-server/main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323
)
2424

2525
var (
26-
version string = "0.0.0"
27-
commit string = "unknown"
28-
date string = "unknown"
26+
version = "0.0.0"
27+
commit = "unknown"
28+
date = "unknown"
2929
)
3030

3131
func main() {
@@ -128,6 +128,7 @@ func run(ctx context.Context, cmd *cli.Command) error {
128128
resourceEngines := resources.NewEngines(dbPool)
129129
srv := server.NewServer(
130130
logger,
131+
fullVersion(),
131132
cmd.String("transport"),
132133
cmd.String("transport-sse-listen-address"),
133134
[]server.Tool{

pkg/server/server.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import (
1313

1414
"github.com/mark3labs/mcp-go/mcp"
1515
mcpserver "github.com/mark3labs/mcp-go/server"
16-
17-
"github.com/firebolt-db/mcp-server/pkg/version"
1816
)
1917

2018
// Server represents the interface for the MCP server functionality.
@@ -66,6 +64,7 @@ type ResourceTemplate interface {
6664
// Returns a Server that can be used to start handling MCP requests.
6765
func NewServer(
6866
logger *slog.Logger,
67+
version string,
6968
transport string,
7069
transportSSEAddress string,
7170
tools []Tool,
@@ -107,7 +106,7 @@ func NewServer(
107106
// Initialize the MCP server with Firebolt-specific configuration
108107
mcpSrv := mcpserver.NewMCPServer(
109108
"Firebolt MCP Server",
110-
version.GetFullVersion(),
109+
version,
111110
mcpserver.WithInstructions(`
112111
This MCP makes you a Firebolt cloud data warehouse expert with access to specialized tools and resources.
113112
You can assist with SQL queries, data modeling, performance optimization, and analytics for Firebolt.

pkg/server/server_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func TestNewServer(t *testing.T) {
4646
// Create server
4747
srv := server.NewServer(
4848
logger,
49+
"0.0.0",
4950
"stdio",
5051
"localhost:8080",
5152
[]server.Tool{mockTool1},
@@ -66,7 +67,7 @@ func TestNewServer(t *testing.T) {
6667
func TestServeUnsupportedTransport(t *testing.T) {
6768

6869
// Create server with unsupported transport
69-
srv := server.NewServer(slogt.New(t), "test", "", nil, nil, nil)
70+
srv := server.NewServer(slogt.New(t), "0.0.0", "test", "", nil, nil, nil)
7071

7172
// Call Serve and check error
7273
err := srv.Serve(t.Context())

0 commit comments

Comments
 (0)