fix: restore MCP landing page flow #678
Open
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
Restore the MCP landing page and stop the infinite redirect loop that effectively bricked the site when clicking "Try TanStack MCP".
Changes
handleRedirectsthat routed all MCP URLs to CLI docsmcptolandingComponentsso/mcp/latestrendersMcpLandingContext
This behavior was introduced in commit 1889db3 ("builder alpha.2"), which added
handleRedirectsfor MCP insrc/libraries/libraries.ts. The MCP library was originally added in a71ea35 ("mcp") with its own landing page and docs.What went wrong
The
handleRedirectsadded in 1889db3 redirected any/mcpor/mcp/latestnavigation to/cli/latest/docs/mcp/mcp-overview. Because the navigation was client side, this caused an infinite redirect loop where the app would keep attempting to resolve MCP routes and immediately redirect again. In practice, clicking "Try TanStack MCP" would freeze the UI and make the site unusable until a hard refresh. That is effectively a full-site brick from a single nav action.Why this fix is necessary
This PR fixes a critical bug that renders the website unusable when the MCP entry point is clicked, restoring the intended landing flow for MCP users.