Skip to content

Conversation

@Obad94
Copy link
Contributor

@Obad94 Obad94 commented Oct 14, 2025

Summary

  • align both MCP demo servers (Node + Python) with the template-uri hot-reload guidance
  • auto-select dev/CDN/local hashed assets based on ENVIRONMENT/DOMAIN/PORT without hand-editing HTML
  • add the shared python-runner script and the pizzaz video widget bundle

Fixes #17.

Testing

All scenarios were manually tested following the test plan below. These tests were performed by hand to verify functionality.

ID Area Preconditions Steps Expected Outcome Result
TS-001 Workspace Bootstrap Node.js ≥18, pnpm installed 1. pnpm install Dependencies install cleanly; lockfile unchanged.
TS-002 Build Pipeline TS-001 completed 1. pnpm run build assets/ populated with *-<hash>.{js,css,html} bundles; build reports the 4-char hash.
TS-003 Static Asset Server TS-002 completed 1. pnpm run serve Static server responds on port 4444; bundles served with same hash as TS-002.
TS-004 Node MCP Quick Start pnpm available 1. cd pizzaz_server_node 2. pnpm install 3. pnpm start Server listens on http://localhost:8000/mcp and logs GET /mcp / POST /mcp/messages.
TS-005 Static Assets + .env + ngrok .env files set with ENVIRONMENT=production, DOMAIN=<static-origin>, optional PORT; static server running (TS-003) 1. Run Node/Python server 2. Tunnel MCP port via ngrok 3. Tunnel static port via ngrok and update DOMAIN 4. Invoke widgets via ChatGPT connector Widgets load via tunneled static origin with ?v=<hash> suffix; server respects port overrides.
TS-006 Local Dev Mode + .env + ngrok .env updated with ENVIRONMENT=local, DOMAIN=<dev-origin>; pnpm run dev running 1. Start Vite dev server 2. Expose dev server via ngrok and set DOMAIN 3. Start MCP server 4. Tunnel MCP port 5. Invoke widgets after editing src/ Template URIs emit ?v=dev-*; widgets reflect live edits through ChatGPT via dev tunnel.
TS-007 CDN Fallback + ngrok assets/ removed/renamed; .env unset 1. Start MCP server 2. Tunnel default port 3. Invoke widgets Widgets load via CDN (persistent.oaistatic.com) with default port 8000.
TS-008 Pizzaz Python Quick Start Python ≥3.10, venv tooling 1. python -m venv .venv 2. Activate venv 3. pip install -r pizzaz_server_python/requirements.txt 4. python pizzaz_server_python/main.py Uvicorn exposes /mcp; metadata matches Node server tools.
TS-009 Pizzaz Python pnpm Wrapper TS-008 venv active 1. pnpm start:pizzaz-python Wrapper locates interpreter and starts server equivalent to TS-008.
TS-010 Solar System Python Quick Start Reuse venv; pip install -r solar-system_server_python/requirements.txt 1. python solar-system_server_python/main.py /mcp serves solar-system widget; structured response includes planet metadata.
TS-011 Solar System pnpm Wrapper TS-010 dependencies present 1. pnpm start:solar-python Wrapper launches uvicorn with same behavior as direct run.
TS-012 Shared .env Validation .env files present in each server directory 1. Start each server sequentially All servers honor shared env keys (ENVIRONMENT, DOMAIN, PORT).
TS-013 ngrok Tunneling ngrok installed; one server active 1. ngrok http <port> 2. Configure ChatGPT connector ChatGPT connects and renders widgets through tunnel; ngrok dashboard shows traffic.
TS-014 Windows Compatibility Smoke Windows 11 + PowerShell Execute TS-001–TS-013 using PowerShell syntax (.\.venv\Scripts\activate). All workflows succeed without shell incompatibilities.
TS-015 Linux Compatibility Smoke Ubuntu shell Repeat TS-001–TS-013 with POSIX commands (source, export). All workflows succeed on Linux.
TS-016 README Consistency Review None Cross-check README instructions with observed behavior. Documentation matches actual steps; noted zero discrepancies.
TS-017 Pizzaz Video Production Widget Production mode as in TS-005 Invoke pizza-video via ChatGPT/mcp-inspector. Widget references hashed production assets and renders fallback video; template URI uses ?v=<hash>.
TS-018 Pizzaz Video Local Dev Widget Local dev mode as in TS-006 Invoke pizza-video while editing source. Requests hit dev origin without hash; template URI shows ?v=dev-*; widget reflects edits.
TS-019 Template Version Hash Propagation Build completed (TS-002) Inspect bundles + MCP resource list. Every widget template URI ends with the same 4-char hash; no mismatches.

- add environment-aware asset selection for Node and Python MCP servers

- expose pizzaz video widget, shared scripts, and env examples
@Obad94 Obad94 force-pushed the feature/template-uri-alignment branch from 55a8023 to f440a2d Compare October 15, 2025 17:11
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.

How to Define Access for templateUri Resources

1 participant