Skip to content

Commit 5f341a9

Browse files
make a working version of completions
1 parent 023f59d commit 5f341a9

25 files changed

+242
-50
lines changed

e2e/e2e_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import (
2020
"github.com/github/github-mcp-server/pkg/github"
2121
"github.com/github/github-mcp-server/pkg/translations"
2222
gogithub "github.com/google/go-github/v69/github"
23-
mcpClient "github.com/mark3labs/mcp-go/client"
24-
"github.com/mark3labs/mcp-go/mcp"
23+
mcpClient "github.com/sammorrowdrums/mcp-go/client"
24+
"github.com/sammorrowdrums/mcp-go/mcp"
2525
"github.com/stretchr/testify/require"
2626
)
2727

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ go 1.23.7
55
require (
66
github.com/google/go-github/v69 v69.2.0
77
github.com/josephburnett/jd v1.9.2
8-
github.com/mark3labs/mcp-go v0.30.0
98
github.com/migueleliasweb/go-github-mock v1.3.0
9+
github.com/sammorrowdrums/mcp-go v0.0.0-20250528234530-f0daf2216052
1010
github.com/sirupsen/logrus v1.9.3
1111
github.com/spf13/cobra v1.9.1
1212
github.com/spf13/viper v1.20.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN
4747
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
4848
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
4949
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
50-
github.com/mark3labs/mcp-go v0.30.0 h1:Taz7fiefkxY/l8jz1nA90V+WdM2eoMtlvwfWforVYbo=
51-
github.com/mark3labs/mcp-go v0.30.0/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
5250
github.com/migueleliasweb/go-github-mock v1.3.0 h1:2sVP9JEMB2ubQw1IKto3/fzF51oFC6eVWOOFDgQoq88=
5351
github.com/migueleliasweb/go-github-mock v1.3.0/go.mod h1:ipQhV8fTcj/G6m7BKzin08GaJ/3B5/SonRAkgrk0zCY=
5452
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
@@ -62,6 +60,8 @@ github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWN
6260
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
6361
github.com/sagikazarmark/locafero v0.9.0 h1:GbgQGNtTrEmddYDSAH9QLRyfAHY12md+8YFTqyMTC9k=
6462
github.com/sagikazarmark/locafero v0.9.0/go.mod h1:UBUyz37V+EdMS3hDF3QWIiVr/2dPrx49OMO0Bn0hJqk=
63+
github.com/sammorrowdrums/mcp-go v0.0.0-20250528234530-f0daf2216052 h1:c9HI0HGuXED8zwXCdnk2iGyaSC8mvZlBGl+SdHxYJgs=
64+
github.com/sammorrowdrums/mcp-go v0.0.0-20250528234530-f0daf2216052/go.mod h1:Kwt02UMWGJxJ1IHMO9Wrj4GabTSvv9uVUrpht1vjiuk=
6565
github.com/shurcooL/githubv4 v0.0.0-20240727222349-48295856cce7 h1:cYCy18SHPKRkvclm+pWm1Lk4YrREb4IOIb/YdFO0p2M=
6666
github.com/shurcooL/githubv4 v0.0.0-20240727222349-48295856cce7/go.mod h1:zqMwyHmnN/eDOZOdiTohqIUKUrTFX62PNlu7IJdu0q8=
6767
github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 h1:17JxqqJY66GmZVHkmAsGEkcIu0oCe3AM420QDgGwZx0=

internal/ghmcp/server.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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,

pkg/github/code_scanning.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99

1010
"github.com/github/github-mcp-server/pkg/translations"
1111
"github.com/google/go-github/v69/github"
12-
"github.com/mark3labs/mcp-go/mcp"
13-
"github.com/mark3labs/mcp-go/server"
12+
"github.com/sammorrowdrums/mcp-go/mcp"
13+
"github.com/sammorrowdrums/mcp-go/server"
1414
)
1515

1616
func GetCodeScanningAlert(getClient GetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {

pkg/github/context_tools.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"context"
55

66
"github.com/github/github-mcp-server/pkg/translations"
7-
"github.com/mark3labs/mcp-go/mcp"
8-
"github.com/mark3labs/mcp-go/server"
7+
"github.com/sammorrowdrums/mcp-go/mcp"
8+
"github.com/sammorrowdrums/mcp-go/server"
99
)
1010

1111
// GetMe creates a tool to get details of the authenticated user.

pkg/github/dynamic_tools.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77

88
"github.com/github/github-mcp-server/pkg/toolsets"
99
"github.com/github/github-mcp-server/pkg/translations"
10-
"github.com/mark3labs/mcp-go/mcp"
11-
"github.com/mark3labs/mcp-go/server"
10+
"github.com/sammorrowdrums/mcp-go/mcp"
11+
"github.com/sammorrowdrums/mcp-go/server"
1212
)
1313

1414
func ToolsetEnum(toolsetGroup *toolsets.ToolsetGroup) mcp.PropertyOption {

pkg/github/helper_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"net/http"
66
"testing"
77

8-
"github.com/mark3labs/mcp-go/mcp"
8+
"github.com/sammorrowdrums/mcp-go/mcp"
99
"github.com/stretchr/testify/assert"
1010
"github.com/stretchr/testify/require"
1111
)

pkg/github/issues.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"github.com/github/github-mcp-server/pkg/translations"
1313
"github.com/go-viper/mapstructure/v2"
1414
"github.com/google/go-github/v69/github"
15-
"github.com/mark3labs/mcp-go/mcp"
16-
"github.com/mark3labs/mcp-go/server"
15+
"github.com/sammorrowdrums/mcp-go/mcp"
16+
"github.com/sammorrowdrums/mcp-go/server"
1717
"github.com/shurcooL/githubv4"
1818
)
1919

pkg/github/notifications.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111

1212
"github.com/github/github-mcp-server/pkg/translations"
1313
"github.com/google/go-github/v69/github"
14-
"github.com/mark3labs/mcp-go/mcp"
15-
"github.com/mark3labs/mcp-go/server"
14+
"github.com/sammorrowdrums/mcp-go/mcp"
15+
"github.com/sammorrowdrums/mcp-go/server"
1616
)
1717

1818
const (

0 commit comments

Comments
 (0)