@@ -16,8 +16,8 @@ import (
1616 mcplog "github.com/github/github-mcp-server/pkg/log"
1717 "github.com/github/github-mcp-server/pkg/translations"
1818 gogithub "github.com/google/go-github/v69/github"
19- "github.com/mark3labs /mcp-go/mcp"
20- "github.com/mark3labs /mcp-go/server"
19+ "github.com/sammorrowdrums /mcp-go/mcp"
20+ "github.com/sammorrowdrums /mcp-go/server"
2121 "github.com/shurcooL/githubv4"
2222 "github.com/sirupsen/logrus"
2323)
@@ -91,7 +91,15 @@ func NewMCPServer(cfg MCPServerConfig) (*server.MCPServer, error) {
9191 OnBeforeInitialize : []server.OnBeforeInitializeFunc {beforeInit },
9292 }
9393
94- ghServer := github .NewServer (cfg .Version , server .WithHooks (hooks ))
94+ getClient := func (_ context.Context ) (* gogithub.Client , error ) {
95+ return restClient , nil // closing over client
96+ }
97+
98+ getGQLClient := func (_ context.Context ) (* githubv4.Client , error ) {
99+ return gqlClient , nil // closing over client
100+ }
101+
102+ ghServer := github .NewServer (getClient , cfg .Version , server .WithHooks (hooks ))
95103
96104 enabledToolsets := cfg .EnabledToolsets
97105 if cfg .DynamicToolsets {
@@ -104,14 +112,6 @@ func NewMCPServer(cfg MCPServerConfig) (*server.MCPServer, error) {
104112 }
105113 }
106114
107- getClient := func (_ context.Context ) (* gogithub.Client , error ) {
108- return restClient , nil // closing over client
109- }
110-
111- getGQLClient := func (_ context.Context ) (* githubv4.Client , error ) {
112- return gqlClient , nil // closing over client
113- }
114-
115115 // Create default toolsets
116116 toolsets , err := github .InitToolsets (
117117 enabledToolsets ,
0 commit comments