fix: reject unexpanded shell vars in MCP args - #628
Merged
Conversation
Detect literal $1/$2-style placeholders from misconfigured MCP clients, return actionable ExpectedMcpError guidance, and keep those validation failures out of Sentry (including historical absolute-path messages). Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
kody-bot
marked this pull request as ready for review
July 24, 2026 19:57
|
View your CI Pipeline Execution ↗ for commit e6244a4
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
4 tasks
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
Sentry track E-1 (
EPICSHOP-EF,EPICSHOP-B3,EPICSHOP-B1,EPICSHOP-FR): one user’s MCP client was passing literal unexpanded shell placeholders ($1,$2) into@epic-web/workshop-mcp, producing ~1,600 events (~40% of epicshop project volume). Those are caller/config mistakes, not workshop bugs.This change:
workshopDirectory/exerciseNumbervalidationExpectedMcpErrorthat tells the user their MCP config has a literal$1/$2that was never substitutedbeforeSendfilter for the new messages plus the historicalmust be an absolute pathmessage (already fixed by Handle relative workshop directories in MCP #589 allowing relative paths)Sibling issues covered and resolved in Sentry:
EPICSHOP-EF,EPICSHOP-B3(double-report via mcp-server integration),EPICSHOP-B1,EPICSHOP-FR.Test plan
nx run @epic-web/workshop-mcp:testnx run @epic-web/workshop-mcp:typechecknx run @epic-web/workshop-mcp:buildRelease note
Patch release for
@epic-web/workshop-mcp(fix:commit). Publishes clearer arg-validation errors and keeps those expected failures out of Sentry.