fix(setup): repair Claude MCP tool discovery#192
fix(setup): repair Claude MCP tool discovery#192Alan-TheGentleman merged 2 commits intoGentleman-Programming:mainfrom
Conversation
Alan-TheGentleman
left a comment
There was a problem hiding this comment.
Requesting changes because this PR is not merge-ready yet.
Blockers:
- It does not compile
- The new readiness subtests in
cmd/engram/main_extra_test.godeclarestdoutand do not use it. - I applied the PR patch in a temp copy and ran
go test ./cmd/engram ./internal/mcp -count=1. - Result:
cmd/engramfails to build, whileinternal/mcppasses.
--init-delay=<duration>skips the next flag
- In
cmd/engram/main.go, the--init-delay=branch incrementsi. - That is only valid for the separated form (
--init-delay 1s), not the equals form. - Example:
engram mcp --init-delay=1s --project=testprojwill skip--project. Same risk with--tools.
- This is not yet a real readiness handshake
internal/mcp/mcp.goshows tools are registered beforeserveMCP()is called.- The current change adds a sleep plus a stderr log, but does not wire any supported client/setup path in this repo to wait for that signal.
internal/setup/setup.gostill generatesengram mcp --tools=agentwith no readiness consumer.
Suggested fixes:
- Remove the unused variables so the PR compiles.
- Remove the extra
i++from the--init-delay=<duration>branch. - Add a regression test combining
--init-delaywith--project/--tools. - Either wire an actual consumer for the readiness signal or add a reproducible test proving the server-side-only change resolves issue #190.
|
Hi @Reviewer, thanks for the detailed review. All four blockers have been addressed in the latest push (312c007). Here's how each point was resolved:
|
312c007 to
790f86b
Compare
|
I pushed a rework of this PR to avoid the fixed startup delay. The branch now repairs Claude Code MCP tool discovery directly: setup derives permissions from the actual |
Alan-TheGentleman
left a comment
There was a problem hiding this comment.
Scoped, tested, linked to the approved issue. CI and PR validation are green. Approving.
a477c9d
into
Gentleman-Programming:main
Fixes #190
Summary
This reworks the original readiness-delay approach into a deterministic Claude Code setup repair.
Changes
--init-delay, notime.Sleep, and no stderr readiness contract.agenttool profile viamcp.ResolveTools("agent").mcp__engram__...) and legacy plugin-scoped permissions (mcp__plugin_engram_engram__...).engram setup claude-codeas the repair path.Validation
go test ./cmd/engram ./internal/setup ./internal/mcpgit diff --check