Skip to content

docs(mcp): clarify micro-app build requirement and Python prereq in a2ui-in-mcpapps README#1686

Open
polina-c wants to merge 1 commit into
mainfrom
docs/readme-mcp-a2ui-in-mcpapps
Open

docs(mcp): clarify micro-app build requirement and Python prereq in a2ui-in-mcpapps README#1686
polina-c wants to merge 1 commit into
mainfrom
docs/readme-mcp-a2ui-in-mcpapps

Conversation

@polina-c

Copy link
Copy Markdown
Collaborator

What was unclear

While validating samples/community/mcp/a2ui-in-mcpapps/README.md end-to-end in a fresh worktree, two things were misleading:

  1. 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.

  2. Hardcoded "Python 3.10+". Replaced with a pointer to server/.python-version (the source of truth, which uv fetches automatically) so the doc doesn't drift from the actual pin.

What still works (verified, left unchanged)

  • yarn install (repo root) — OK
  • cd client && yarn install && yarn build:sandbox — generates client/public/sandbox_iframe/sandbox.{js,html}
  • cd server && uv sync && uv run python server.py --transport sse --port 8000--transport sse/--port valid; /sse returns HTTP 200 text/event-stream
  • cd client && yarn start (ng serve) — index served HTTP 200 with <app-root>
  • cd server/apps/src && yarn build:all — generates server/apps/public/app.html

Architecture, mermaid diagram, and communication-flow sections preserved. No code changes.

🤖 Generated with Claude Code

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>
@google-cla

google-cla Bot commented Jun 17, 2026

Copy link
Copy Markdown

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
- [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
  1. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant