fix(monorepo): exclude apps/mcp-server from bun workspaces#2950
Merged
Conversation
apps/mcp-server is a public npm-published package (@trycompai/mcp-server) with only npm-public dependencies (@modelcontextprotocol/sdk, express, zod, @stricli/core). It doesn't import any @trycompai/* workspace packages, so it doesn't need workspace membership. WHY THIS IS NECESSARY: Speakeasy's CI publish flow runs `npm install --ignore-scripts` inside apps/mcp-server. With apps/mcp-server as a workspace member, npm walks up to the root package.json, sees the `workspace:*` references in packages/auth, packages/billing, etc., and fails with EUNSUPPORTEDPROTOCOL (npm doesn't understand bun's workspace: protocol). Without the workspace context, npm only reads apps/mcp-server/package.json (which uses only normal semver versions) and installs cleanly. LOCAL DEV IMPACT: Devs working on apps/mcp-server directly will need to run `cd apps/mcp-server && bun install` once to install its dependencies. Other apps and packages are unaffected. In practice apps/mcp-server is regenerated by Speakeasy (`speakeasy run`) rather than hand-edited, so this is a rare workflow. Fixes the publish workflow failure in run 26596920929 and the generate workflow failure in run 26597302360. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
Contributor
|
🎉 This PR is included in version 3.65.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
apps/mcp-serveris excluded from the root bun workspace, so npm-based tooling (Speakeasy's CI publish flow) can install it cleanly without choking on bun'sworkspace:*protocol in sibling packages.Why this is necessary
The Speakeasy publish workflow runs
npm install --ignore-scriptsinsideapps/mcp-server. Whileapps/mcp-serveris a workspace member, npm walks up to the root `package.json`, sees `workspace:*` references inpackages/auth,packages/billing,packages/company,packages/email, andpackages/integrations, and fails with:```
npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:*
```
The
.npmrcworkspaces=falsesetting is being ignored by npm (per the actual log warning).Concrete CI failures this fixes:
apps/mcp-server/v)Why this is safe
apps/mcp-serveronly depends on public npm packages — verified:@modelcontextprotocol/sdk@stricli/coreexpresszod@anthropic-ai/mcpb(dev)Zero
@trycompai/*workspace imports. It's a standalone published package.Local dev impact
Devs working on
apps/mcp-serverdirectly will need a one-time:```bash
cd apps/mcp-server && bun install
```
In practice the directory is regenerated by Speakeasy rather than hand-edited, so this is a rare workflow.
Other apps and packages are unaffected.
What's next
After this merges:
@trycompai/mcp-server@0.0.1lands on npmThe malformed empty-version release
apps/mcp-server/vcan be cleaned up separately withgh release delete "apps/mcp-server/v" --cleanup-tag --yes.Test plan
🤖 Generated with Claude Code
Summary by cubic
Excluded
apps/mcp-serverfrom the root Bun workspaces so npm-based CI can install and publish it cleanly. FixesEUNSUPPORTEDPROTOCOLerrors fromworkspace:*in sibling packages during Generate/Publish.Bug Fixes
package.jsonto listapps/api,apps/app,apps/framework-editor,apps/portalonly; excludedapps/mcp-serverand regeneratedbun.lock.Migration
apps/mcp-server, runbun installin that folder once. Other apps/packages are unaffected.Written for commit 4d723bf. Summary will update on new commits.
Review in cubic