File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,11 @@ func NewHTTPMcpHandler(cfg *HTTPServerConfig,
7676 }
7777}
7878
79+ // RegisterRoutes registers the routes for the MCP server
7980func (h * HTTPMcpHandler ) RegisterRoutes (r chi.Router ) {
80- r .Mount ( "/" , h )
81+ r .Use ( middleware . WithRequestConfig )
8182
83+ r .Mount ("/" , h )
8284 // Mount readonly and toolset routes
8385 r .With (withToolset ).Mount ("/x/{toolset}" , h )
8486 r .With (withReadonly , withToolset ).Mount ("/x/{toolset}/readonly" , h )
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import (
1212 "time"
1313
1414 "github.com/github/github-mcp-server/pkg/github"
15- "github.com/github/github-mcp-server/pkg/http/middleware"
1615 "github.com/github/github-mcp-server/pkg/lockdown"
1716 "github.com/github/github-mcp-server/pkg/translations"
1817 "github.com/github/github-mcp-server/pkg/utils"
@@ -99,7 +98,6 @@ func RunHTTPServer(cfg HTTPServerConfig) error {
9998 r := chi .NewRouter ()
10099
101100 handler := NewHTTPMcpHandler (& cfg , deps , t , logger )
102- r .Use (middleware .WithRequestConfig )
103101 handler .RegisterRoutes (r )
104102
105103 addr := fmt .Sprintf (":%d" , cfg .Port )
You can’t perform that action at this time.
0 commit comments