Skip to content

fix(monorepo): exclude apps/mcp-server from bun workspaces#2950

Merged
tofikwest merged 1 commit into
mainfrom
tofik/exclude-mcp-from-bun-workspaces
May 28, 2026
Merged

fix(monorepo): exclude apps/mcp-server from bun workspaces#2950
tofikwest merged 1 commit into
mainfrom
tofik/exclude-mcp-from-bun-workspaces

Conversation

@tofikwest
Copy link
Copy Markdown
Contributor

@tofikwest tofikwest commented May 28, 2026

Summary

apps/mcp-server is excluded from the root bun workspace, so npm-based tooling (Speakeasy's CI publish flow) can install it cleanly without choking on bun's workspace:* protocol in sibling packages.

Why this is necessary

The Speakeasy publish workflow runs npm install --ignore-scripts inside apps/mcp-server. While apps/mcp-server is a workspace member, npm walks up to the root `package.json`, sees `workspace:*` references in packages/auth, packages/billing, packages/company, packages/email, and packages/integrations, and fails with:

```
npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:*
```

The .npmrc workspaces=false setting is being ignored by npm (per the actual log warning).

Concrete CI failures this fixes:

  • Publish run 26596920929 (which created the malformed empty-version release apps/mcp-server/v)
  • Generate run 26597302360

Why this is safe

apps/mcp-server only depends on public npm packages — verified:

  • @modelcontextprotocol/sdk
  • @stricli/core
  • express
  • zod
  • @anthropic-ai/mcpb (dev)

Zero @trycompai/* workspace imports. It's a standalone published package.

Local dev impact

Devs working on apps/mcp-server directly 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:

  1. Manually trigger the Generate workflow (will succeed now)
  2. Review + merge the auto-PR it opens
  3. main → release auto-PR opens (existing automation)
  4. Merge that → Publish workflow succeeds → @trycompai/mcp-server@0.0.1 lands on npm

The malformed empty-version release apps/mcp-server/v can be cleaned up separately with gh release delete "apps/mcp-server/v" --cleanup-tag --yes.

Test plan

  • Local `bun install` succeeds after the workspaces change
  • `bun.lock` regenerated cleanly (-516 lines, -1 workspace package)
  • Generate workflow succeeds in CI after this merges
  • Publish workflow succeeds after the resulting regen PR is merged through main → release

🤖 Generated with Claude Code


Summary by cubic

Excluded apps/mcp-server from the root Bun workspaces so npm-based CI can install and publish it cleanly. Fixes EUNSUPPORTEDPROTOCOL errors from workspace:* in sibling packages during Generate/Publish.

  • Bug Fixes

    • Updated root package.json to list apps/api, apps/app, apps/framework-editor, apps/portal only; excluded apps/mcp-server and regenerated bun.lock.
  • Migration

    • If working in apps/mcp-server, run bun install in that folder once. Other apps/packages are unaffected.

Written for commit 4d723bf. Summary will update on new commits.

Review in cubic

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

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

Project Deployment Actions Updated (UTC)
app Building Building Preview, Comment May 28, 2026 7:37pm
comp-framework-editor Ready Ready Preview, Comment May 28, 2026 7:37pm
portal Building Building Preview, Comment May 28, 2026 7:37pm

Request Review

@tofikwest tofikwest merged commit 5e40aed into main May 28, 2026
8 of 10 checks passed
@tofikwest tofikwest deleted the tofik/exclude-mcp-from-bun-workspaces branch May 28, 2026 19:38
claudfuen pushed a commit that referenced this pull request May 28, 2026
## [3.65.1](v3.65.0...v3.65.1) (2026-05-28)

### Bug Fixes

* **monorepo:** exclude apps/mcp-server from bun workspaces ([4d723bf](4d723bf))
* **monorepo:** use glob+negation for workspaces (unbreak Docker build) ([7b9dd15](7b9dd15)), closes [#2950](#2950) [#2950](#2950)
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.65.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants