Skip to content

fix(mcp): prevent dev watcher from deleting http.js and update docs - #330

Merged
meAmitPatil merged 2 commits into
superserve-ai:mainfrom
Prajwal2246:fix/mcp-dev-watcher
Sep 22, 2026
Merged

meAmitPatil merged 2 commits into
superserve-ai:mainfrom
Prajwal2246:fix/mcp-dev-watcher

Conversation

@Prajwal2246

Copy link
Copy Markdown
Contributor

Summary

This PR fixes the issue where bun run dev deletes dist/http.js and causes @superserve/mcp/http import failures in the Next.js app. It also resolves the missing dependsOn configuration for the dev task.

Fixes #329

Changes Made

  1. turbo.json: Added "dependsOn": ["^build"] to the "dev" task so dependencies are built before the dev server starts (preventing empty dist/ folders on fresh clones).
  2. packages/mcp/package.json: Updated the "dev" script to run both tsup watchers concurrently (tsup --watch & tsup --watch --config tsup.http.config.ts).
  3. packages/mcp/tsup.config.ts: Converted defineConfig to a function and set clean: !options.watch. This prevents the watcher from wiping the directory and deleting http.js during concurrent dev builds.
  4. CONTRIBUTING.md: As requested in the issue, added the missing directories (apps/mcp, packages/mcp, tests/, and docs/) to the Repo Structure section.

Testing

  • Ran bun run build followed by bun run dev locally. Verified that http.js is no longer deleted by the watcher.
  • Successfully verified that all checks pass (bun run lint, bun run typecheck, bun run test, bun run build).

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the superserve Team on Vercel.

A member of the Team first needs to authorize it.

@Prajwal2246

Copy link
Copy Markdown
Contributor Author

Rebased onto main.

Still reproducible on current main: packages/mcp/tsup.config.ts has clean: true, and "dev": "tsup --watch" only runs the bin config — so every watch rebuild cleans dist/ and deletes http.js, which the console imports via @superserve/mcp/http. The comment in tsup.http.config.ts already notes the bin build "owns the output-folder clean"; that holds for build but not for --watch.

This makes clean conditional on watch mode and runs both configs in dev.

Two notes for whoever picks it up:

  • The Vercel checks are red only because the deploys need team authorization, not because of anything in the diff.
  • It also touches CONTRIBUTING.md and turbo.json. Happy to split those into a separate PR if you'd rather review the build fix on its own.

@meAmitPatil sorry to tag you directly — you're the most recent committer in packages/mcp, so you're probably the right person. Happy to close this if it's not wanted.

@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
console Ready Ready Preview Sep 22, 2026 5:22am UTC
superserve-mcp Ready Ready Preview Sep 22, 2026 5:22am UTC
ui Ready Ready Preview Sep 22, 2026 5:22am UTC

Request Review

@meAmitPatil

Copy link
Copy Markdown
Collaborator

@Prajwal2246 Thanks for the contribution and for fixing this!

@meAmitPatil
meAmitPatil merged commit 6567da3 into superserve-ai:main Sep 22, 2026
5 checks passed
@Prajwal2246
Prajwal2246 deleted the fix/mcp-dev-watcher branch September 22, 2026 05:42

This branch was successfully deployed

3 active deployments
Preview – console — 28314408 Deployed Sep 22, 2026 by vercel[bot]
Preview – superserve-mcp — 28314408 Deployed Sep 22, 2026 by vercel[bot]
Preview – ui — 28314408 Deployed Sep 22, 2026 by vercel[bot]
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.

mcp: bun run dev deletes dist/http.js, breaking apps/mcp import of @superserve/mcp/http

2 participants