Test CLI tool and starter apps - #19
Merged
MiguelsPizza merged 7 commits intoNov 8, 2025
Merged
Conversation
- Replace zod catalog reference with explicit version ^3.25.1 - Add missing @types/node dependency to devDependencies The React template is meant to be scaffolded via create-webmcp-app outside the monorepo, so it cannot use pnpm catalog references. These changes ensure the template works correctly when copied to a new project directory. Tested: - pnpm install: ✅ - pnpm typecheck: ✅ - pnpm lint: ✅ - pnpm build: ✅
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
mcp-ui-with-webmcp-my-mcp-server | a8632d1 | Nov 08 2025, 05:37 PM |
Both template READMEs now include a "Testing WebMCP Tools" section that explains how to test registered tools using the MCP-B Chrome extension. This provides a quick way to debug and verify WebMCP tools without setting up a full chat UI. Testing instructions: 1. Start dev server (pnpm dev) 2. Visit localhost URL in Chrome 3. Open MCP-B extension 4. Test registered tools directly Both templates follow CONTRIBUTING.md standards: - ✅ Type Safety: Proper TypeScript, no `any` types - ✅ Single Source of Truth: No duplication - ✅ Modularity: Small, focused functions - ✅ Code Cleanliness: JSDoc on all public APIs
The lockfile was out of sync with templates/react/package.json after adding @types/node and changing zod from catalog reference to explicit version. This caused CI to fail with frozen-lockfile error. Changes in lockfile: - Add @types/node@^24.9.2 to React template - Update zod specifier from 'catalog:' to '^3.25.1' Verified locally: ✅ pnpm install succeeds ✅ pnpm check passes (lint + typecheck) ✅ All templates build and typecheck successfully
The CLI needs to bundle templates when published to npm. Added build step to copy templates into the package and clean them of build artifacts. Changes: - Add copy-templates script that copies templates and removes: - node_modules directories - dist directories - .turbo cache directories - tsconfig.tsbuildinfo files - worker-configuration.d.ts files - Update build script to run copy-templates before tsc - Add templates/ and *.tgz to .gitignore Template path resolution: - Development mode: looks for templates at ../../templates/ - Published mode: looks for templates at ../templates/ (bundled) Tested: ✅ pnpm pack creates clean tarball with templates ✅ Vanilla template from package: install, typecheck pass ✅ React template from package: install, typecheck, build pass ✅ Templates are ~50 files each instead of 500+ with node_modules Ready for npm publish via: pnpm publish
Templates now live with the CLI instead of at repo root, simplifying the build process and making the package structure clearer. **Benefits:** ✅ No complex copy-templates script needed ✅ Simple build process (just `tsc`) ✅ Templates version-controlled with CLI ✅ Clearer ownership - templates belong to CLI ✅ Package structure matches standard CLIs (create-vite, etc.) **Changes:** 1. **Moved templates:** - From: `templates/` (repo root) - To: `apps/create-webmcp-app/templates/` 2. **Updated CLI code (src/index.ts):** - Simplified template path resolution - Removed dual-mode logic (repo vs published) - Now always: `join(__dirname, '..', 'templates', templateType)` 3. **Simplified build (package.json):** - Removed complex copy-templates script - Build is now just: `tsc` 4. **Updated .gitignore:** - No longer ignore templates/ directory - Only ignore generated files in templates 5. **Updated pnpm-workspace.yaml:** - Removed `templates/*` from packages - Templates are now part of create-webmcp-app package **Tested:** ✅ pnpm pack creates clean tarball ✅ React template: install, typecheck, build all pass ✅ Package size remains small (no node_modules) The CLI is already interactive using @clack/prompts with: - Project path input - Template selection (Vanilla/React) - Optional dependency installation
The workspace now has 1 fewer package (templates/* removed from workspace, now part of create-webmcp-app), so the lockfile needs to reflect this change.
Ensure CLI package follows CONTRIBUTING.md standards by adding quality check scripts and eslint dependencies. **Added:** - `pnpm lint` - ESLint with TypeScript support - `pnpm typecheck` - Type checking without build - ESLint dependencies (@eslint/js, eslint, typescript-eslint, globals) **Already compliant with CONTRIBUTING.md:** ✅ Type Safety: Interface types, explicit parameters, no `any` ✅ Single Source of Truth: No duplication, config in one place ✅ Modularity: Small focused functions (main, copyTemplate) ✅ Code Cleanliness: JSDoc on all public APIs with @param/@example **Verified:** - pnpm typecheck: ✅ passes - pnpm lint: ✅ passes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The React template is meant to be scaffolded via create-webmcp-app outside the monorepo, so it cannot use pnpm catalog references. These changes ensure the template works correctly when copied to a new project directory.
Tested:
Description
Type of Change
Related Issues
Fixes #
Related to #
Changes Made
Testing
Test Commands Run
Manual Testing
pnpm dev)pnpm build && preview)Screenshots
Checklist
pnpm test) and they passBreaking Changes
None
Additional Notes