docs(mcp): clarify micro-app build requirement and Python prereq in a2ui-in-mcpapps README#1686
docs(mcp): clarify micro-app build requirement and Python prereq in a2ui-in-mcpapps README#1686polina-c wants to merge 1 commit into
Conversation
The top-level README for the a2ui-in-mcpapps sample marked the
micro-app build as "Optional" and described server/apps/public/
artifacts as present. In a fresh checkout those single-file HTML
artifacts are git-ignored and absent, so the Basic/Editor surfaces
fail to load until at least one app is built. Reword the section to
state the build is required for a surface to render (the server still
starts without it).
Also stop hardcoding "Python 3.10+" in the prerequisites and instead
point to server/.python-version as the source of truth, which uv
fetches automatically.
Verified end-to-end in a clean worktree: root yarn install,
client yarn build:sandbox (generates sandbox.{js,html}),
server uv sync + uv run python server.py --transport sse --port 8000
(SSE endpoint returns HTTP 200 text/event-stream), client ng serve
(index served HTTP 200), and server/apps/src yarn build:all generates
public/app.html.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the README.md for the a2ui-in-mcpapps sample, clarifying that the Python version is managed by uv and explaining that the micro-apps must be built on a fresh checkout because they are git-ignored. The reviewer suggests simplifying the prerequisites section by listing only uv as a requirement, since it automatically downloads and manages the correct Python version.
|
|
||
| - [Node.js](https://nodejs.org/) (LTS recommended) | ||
| - [Python 3.10+](https://www.python.org/) with `uv` | ||
| - [Python](https://www.python.org/) with [`uv`](https://docs.astral.sh/uv/) (the required version is pinned in `server/.python-version`; `uv` fetches it automatically) |
There was a problem hiding this comment.
Since uv automatically downloads and manages the correct Python version specified in server/.python-version, users do not need to install Python manually. We can simplify this prerequisite to just uv to reduce setup friction.
| - [Python](https://www.python.org/) with [`uv`](https://docs.astral.sh/uv/) (the required version is pinned in `server/.python-version`; `uv` fetches it automatically) | |
| - [uv](https://docs.astral.sh/uv/) (Python is managed automatically by uv using the version pinned in server/.python-version) |
References
- Avoid overdesigning simple utility commands or scripts in documentation (such as README files) with complex error handling and conditional checks when a straightforward command is sufficient.
What was unclear
While validating
samples/community/mcp/a2ui-in-mcpapps/README.mdend-to-end in a fresh worktree, two things were misleading:Micro-app build framed as purely "Optional." The server reads its surfaces from
server/apps/public/{app,editor}.html, but those single-file artifacts are git-ignored and absent in a fresh checkout. Following the README literally (skipping the "optional" step) starts the server but the Basic/Editor surfaces fail to load (Resource file not found). Reworded to state the build is required for a surface to render, while noting the server itself still starts without it.Hardcoded "Python 3.10+". Replaced with a pointer to
server/.python-version(the source of truth, whichuvfetches automatically) so the doc doesn't drift from the actual pin.What still works (verified, left unchanged)
yarn install(repo root) — OKcd client && yarn install && yarn build:sandbox— generatesclient/public/sandbox_iframe/sandbox.{js,html}cd server && uv sync && uv run python server.py --transport sse --port 8000—--transport sse/--portvalid;/ssereturns HTTP 200text/event-streamcd client && yarn start(ng serve) — index served HTTP 200 with<app-root>cd server/apps/src && yarn build:all— generatesserver/apps/public/app.htmlArchitecture, mermaid diagram, and communication-flow sections preserved. No code changes.
🤖 Generated with Claude Code