Skip to content

Commit ee58d2b

Browse files
feat: integrate go-sdk mcpgen code generator (Phase 3)
- Add replace directive in go.mod to use fork with schema caching - Create tool input types with jsonschema tags (tool_inputs.go) - Add go:generate directive for mcpgen code generator - Generate SchemaProvider implementations (github_mcp_gen.go) This enables zero-reflection schema generation for tool input types, with pre-computed and pre-resolved schemas for improved performance. Co-authored-by: SamMorrowDrums <[email protected]>
1 parent 55c8d8e commit ee58d2b

File tree

4 files changed

+395
-2
lines changed

4 files changed

+395
-2
lines changed

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ module github.com/github/github-mcp-server
22

33
go 1.24.0
44

5+
// Use fork with schema caching and SchemaProvider interface for zero-reflection schema generation
6+
replace github.com/modelcontextprotocol/go-sdk => github.com/SamMorrowDrums/go-sdk v0.0.0-20251204134647-65102e1bc3eb
7+
58
require (
69
github.com/google/go-github/v79 v79.0.0
710
github.com/google/jsonschema-go v0.3.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/SamMorrowDrums/go-sdk v0.0.0-20251204134647-65102e1bc3eb h1:Pyx6o6tyqdRqAZHoHt7P3hp18VOQbO4qqqel6u+0DwU=
2+
github.com/SamMorrowDrums/go-sdk v0.0.0-20251204134647-65102e1bc3eb/go.mod h1:6fM3LCm3yV7pAs8isnKLn07oKtB0MP9LHd3DfAcKw10=
13
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
24
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
35
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
@@ -55,8 +57,6 @@ github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwX
5557
github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA=
5658
github.com/migueleliasweb/go-github-mock v1.3.0 h1:2sVP9JEMB2ubQw1IKto3/fzF51oFC6eVWOOFDgQoq88=
5759
github.com/migueleliasweb/go-github-mock v1.3.0/go.mod h1:ipQhV8fTcj/G6m7BKzin08GaJ/3B5/SonRAkgrk0zCY=
58-
github.com/modelcontextprotocol/go-sdk v1.1.0 h1:Qjayg53dnKC4UZ+792W21e4BpwEZBzwgRW6LrjLWSwA=
59-
github.com/modelcontextprotocol/go-sdk v1.1.0/go.mod h1:6fM3LCm3yV7pAs8isnKLn07oKtB0MP9LHd3DfAcKw10=
6060
github.com/muesli/cache2go v0.0.0-20221011235721-518229cd8021 h1:31Y+Yu373ymebRdJN1cWLLooHH8xAr0MhKTEJGV/87g=
6161
github.com/muesli/cache2go v0.0.0-20221011235721-518229cd8021/go.mod h1:WERUkUryfUWlrHnFSO/BEUZ+7Ns8aZy7iVOGewxKzcc=
6262
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=

pkg/github/github_mcp_gen.go

Lines changed: 319 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)