From e2a2e73e308eb46ebaa52ddc9aa5065a44965933 Mon Sep 17 00:00:00 2001 From: Sam Morrow Date: Mon, 7 Apr 2025 17:51:51 +0200 Subject: [PATCH] chore: pass version through to server --- cmd/github-mcp-server/main.go | 2 +- pkg/github/server.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/github-mcp-server/main.go b/cmd/github-mcp-server/main.go index f3dff6d3..dd4d41a7 100644 --- a/cmd/github-mcp-server/main.go +++ b/cmd/github-mcp-server/main.go @@ -158,7 +158,7 @@ func runStdioServer(cfg runConfig) error { t, dumpTranslations := translations.TranslationHelper() // Create - ghServer := github.NewServer(ghClient, cfg.readOnly, t) + ghServer := github.NewServer(ghClient, version, cfg.readOnly, t) stdioServer := server.NewStdioServer(ghServer) stdLogger := stdlog.New(cfg.logger.Writer(), "stdioserver", 0) diff --git a/pkg/github/server.go b/pkg/github/server.go index 3ca69558..bf3583b9 100644 --- a/pkg/github/server.go +++ b/pkg/github/server.go @@ -15,11 +15,11 @@ import ( ) // NewServer creates a new GitHub MCP server with the specified GH client and logger. -func NewServer(client *github.Client, readOnly bool, t translations.TranslationHelperFunc) *server.MCPServer { +func NewServer(client *github.Client, version string, readOnly bool, t translations.TranslationHelperFunc) *server.MCPServer { // Create a new MCP server s := server.NewMCPServer( "github-mcp-server", - "0.0.1", + version, server.WithResourceCapabilities(true, true), server.WithLogging())