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
{{ message }}
Repository navigation
v0.26.0+ stdio mode panics: ToolDependencies not found in context #1646
After PR #1640 (inject deps via context instead of closures), the stdio server panics on any tool call:
panic: ToolDependencies not found in context; use ContextWithDeps to inject
Root Cause
In internal/ghmcp/server.go, NewMCPServer() creates deps at line ~196-204 and passes them to inventory.RegisterAll(), but the new context-based tool handlers created by NewServerToolWithContextHandler expect deps to be in context via MustDepsFromContext(ctx).
No middleware injects deps into context before tool handlers execute.
Thanks for the report, apologies for dropping the ball with that. The prior pattern had caused a performance regression due to the way the tool handler registration was working with the closure in remote server, so I was pretty laser focused on getting that shipped.
Thanks for the excellent report and suggested fix. I am AFK, but I assigned copilot and given your fairly surgical suggestion I fully expect a good end product, if it succeeds I will merge and tag.
Activity
SamMorrowDrums commentedon Dec 18, 2025
Thanks for the report, apologies for dropping the ball with that. The prior pattern had caused a performance regression due to the way the tool handler registration was working with the closure in remote server, so I was pretty laser focused on getting that shipped.
Thanks for the excellent report and suggested fix. I am AFK, but I assigned copilot and given your fairly surgical suggestion I fully expect a good end product, if it succeeds I will merge and tag.
SamMorrowDrums commentedon Dec 18, 2025
Fix is in main @JayRMorris will test when I can.