Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Add Cloudflare Workers support to create-modelfetch CLI#19

Merged
phuctm97 merged 1 commit intomainfrom
cloudflare
Jul 6, 2025
Merged

Add Cloudflare Workers support to create-modelfetch CLI#19
phuctm97 merged 1 commit intomainfrom
cloudflare

Conversation

@phuctm97
Copy link
Copy Markdown
Owner

@phuctm97 phuctm97 commented Jul 6, 2025

Summary

  • Adds comprehensive Cloudflare Workers support to the create-modelfetch CLI
  • Introduces JavaScript and TypeScript templates for Cloudflare Workers deployment
  • Fixes Deno template documentation to reflect the correct default port (8000)

Changes

New Features

  • Cloudflare Workers Templates: Added both JavaScript and TypeScript templates for creating MCP servers that deploy to Cloudflare Workers
  • Wrangler Configuration: Uses modern wrangler.jsonc format with configurable compatibility date
  • TypeScript Support: Includes generated types from wrangler types for proper Cloudflare Workers type safety
  • CLI Integration: Updated create-modelfetch CLI to include Cloudflare Workers as a runtime option

Bug Fixes

  • Fixed default port in Deno template READMEs from 3000 to 8000
  • Added missing .gitignore files to Deno templates

Technical Details

  • Templates use @modelfetch/cloudflare adapter for seamless integration
  • TypeScript template includes satisfies ExportedHandler<Env> for type safety
  • Removed deprecated @cloudflare/workers-types in favor of generated types
  • Consistent project structure across all runtime templates

Test Plan

  • Run npx create-modelfetch@latest and select Cloudflare Workers runtime
  • Test both JavaScript and TypeScript template creation
  • Verify wrangler dev starts the development server successfully
  • Confirm MCP Inspector can connect to the Cloudflare Workers dev server
  • Check that all generated files have correct content and formatting

🤖 Generated with Claude Code

Introduces comprehensive Cloudflare Workers support with both JavaScript and TypeScript templates, enabling developers to deploy MCP servers as edge functions. The templates include proper wrangler configuration, generated TypeScript types, and consistent project structure matching other runtime templates. Also fixes Deno template documentation to reflect the correct default port (8000).
@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
modelfetch-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 6, 2025 8:28am

@phuctm97 phuctm97 merged commit 938b662 into main Jul 6, 2025
2 checks passed
@phuctm97 phuctm97 deleted the cloudflare branch July 6, 2025 08:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant