mcp-data-platform-v1.86.2
Overview
Patch release fixing a rendering failure for React component artifacts in the portal. Any React artifact that imported React explicitly and relied on auto-mount failed to render with a JavaScript syntax error, showing a blank panel in both the artifact viewer and its thumbnail.
Bug Fixes
Portal: React artifacts failed to render with "Identifier 'React' has already been declared" (#625, #626)
Who was affected: Anyone viewing a React/JSX artifact whose source began with import React from 'react' (the standard header for AI-generated React artifacts) and that did not mount itself with createRoot(). This is a common shape, so a broad class of artifacts was affected.
Symptom: The artifact rendered blank. The browser console showed:
Uncaught SyntaxError: Identifier 'React' has already been declared
Both the artifact viewer and the generated thumbnail were affected, since both build a sandboxed iframe through the same prelude.
Root cause: The renderer wraps artifact source in a sandboxed iframe and, on the auto-mount path, prepended its own import React from 'react' and import { createRoot } from 'react-dom/client'. The JSX transform (Sucrase, automatic runtime) preserves the artifact's own imports rather than stripping them, so an artifact that already imported React produced a module with two top-level React bindings. That is a hard ES module syntax error, so the module never executed and nothing mounted. The same prelude was duplicated in the thumbnail builder, which is why both surfaces broke.
Fix: The injected mount helpers are now imported under collision-proof namespaced aliases (__artifactReact, __artifactCreateRoot) instead of the bare React / createRoot identifiers, in both the viewer and the thumbnail builder. This cannot clash with anything the artifact imports, and is more robust than trying to strip the artifact's own React import (which would also have to handle import React, { useState }, namespace imports, and ReactDOM aliases). createElement resolves as a named export on the same module path the renderer already uses, so behavior is otherwise unchanged.
Unaffected: Self-mounting artifacts (those that call createRoot() / ReactDOM.render() themselves) and artifacts that do not import React were never affected and render exactly as before.
Tests: Regression tests were added for both builders asserting the generated iframe HTML has at most one top-level import React (the artifact's own), uses the namespaced helpers, and leaves self-mount and no-import artifacts unchanged.
Upgrade notes
No configuration changes, no migrations, no API changes. This is a frontend-only fix shipped in the embedded portal UI; upgrading the binary or container is sufficient.
Installation
Homebrew (macOS)
brew install txn2/tap/mcp-data-platformClaude Code CLI
claude mcp add mcp-data-platform -- mcp-data-platformDocker
docker pull ghcr.io/txn2/mcp-data-platform:v1.86.2Verification
All release artifacts are signed with Cosign. Verify with:
cosign verify-blob --bundle mcp-data-platform_1.86.2_linux_amd64.tar.gz.sigstore.json \
mcp-data-platform_1.86.2_linux_amd64.tar.gz