feat(scripts): Validate MCP servers before building the image - #19
Merged
morgnza merged 1 commit intoJul 20, 2026
Merged
Conversation
Add a validation gate (Step 7) to setup_mcp_forwarding.sh that runs the MCP tool forwarding compatibility tester on the build instance, against the manifest just written, before the AMI is created. If any configured server would fail to forward (lists no tools, fails to spawn or handshake, or exceeds the 5s budget), it prints the report, terminates the build instance, and aborts, saving the ~25 minutes of AMI creation and image import. Also make the script's base64 calls portable so it runs on macOS/BSD as well as GNU/Linux, and add build/ and .pytest_cache/ to .gitignore.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a validation gate to
setup_mcp_forwarding.shso a broken MCP tool forwarding setup is caught on the build instance, before the ~25 minutes of AMI creation and image import.What changed
base64 -w0 <file>calls with the POSIX formbase64 < file | tr -d '\n', so the script runs on macOS/BSD as well as GNU/Linux (the positional-file form only works on GNU base64). Output is byte-identical on Linux.build/and.pytest_cache/.Testing
INCOMPATIBLE, terminates the build instance, and aborts before the AMI.OK, the build proceeds and completes to a RUNNING fleet. Verified end to end.bash -nandscripts/ci_local.shpass.