You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor to build inventory once before authentication fork
- Move inventory building outside OnAuthenticated callback in NewUnauthenticatedMCPServer
- Build inventory once before creating auth tools, eliminating duplication
- Reuse the same inventory instance in OnAuthenticated via closure
- Tool filters are now applied only once, preventing stale auth tools
- Reduces code duplication without changing architecture
- All tests pass, 0 lint issues
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
// Create the MCP server with capabilities advertised for dynamic tool registration
320
334
serverOpts:=&mcp.ServerOptions{
321
335
Instructions: "GitHub MCP Server - Authentication Required\n\nYou are not currently authenticated with GitHub. Use the auth_login tool to complete authentication. This is a single, blocking call that will guide you through the entire device authorization flow and return once authentication has finished.",
0 commit comments