Skip to content

Add mcpc formula - #55

Draft
jancurn wants to merge 1 commit into
mainfrom
feat/add-mcpc-formula
Draft

Add mcpc formula#55
jancurn wants to merge 1 commit into
mainfrom
feat/add-mcpc-formula

Conversation

@jancurn

@jancurn jancurn commented Jul 31, 2026

Copy link
Copy Markdown
Member

Adds a formula for mcpc, Apify's universal MCP command-line client, published to npm as @apify/mcpc. Installs the published npm tarball (which already contains the build output), so Homebrew only needs node.

mcpc is the first scoped package to go through the shared update flow, which needs two fixes for it:

  • update_formula.sh takes an optional NPM package name, because @apify/mcpc cannot be a formula name. Omitted, it still defaults to the formula name, and update_formula.yaml gained a matching optional npm_package input.
  • The sed separator moves from @ to |: an unescaped @ inside the replacement (.../@apify/mcpc-0.5.1.tgz) ends the expression early and fails with unknown option to `s'. Rerunning the updater for apify-cli 1.7.1 produces a byte-identical formula.

Two formula details worth a look:

  • The shebangs of both executables are rewritten to Homebrew's node, same as apify-cli.
  • test do deliberately require()s the @napi-rs/keyring native addon. It is tied to a Node.js ABI, and mcpc silently falls back to file-based credential storage when it fails to load — without the canary, a node major bump would quietly downgrade credential storage instead of failing here and asking for a revision bump.

Bumps are triggered by hand for now (mcpc's release workflow only prints the command), so after merging this the formula is verified by dispatching update_formula.yaml with package=mcpc, npm_package=@apify/mcpc, version=0.5.1. Draft until apify/mcpc#357 lands.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BcRjUSnuwKjKhQRgKQ1zzv

mcpc is Apify's universal MCP command-line client (https://github.com/apify/mcpc),
published to npm as `@apify/mcpc`.

Being a scoped package, it needs two fixes in the shared update flow:

- `update_formula.sh` takes an optional NPM package name, since `@apify/mcpc`
  cannot be a formula name. Omitted, it keeps defaulting to the formula name.
- The `sed` separator moves from `@` to `|`: an unescaped `@` inside the
  replacement (`.../@apify/mcpc-0.5.1.tgz`) ends the expression early and fails
  with "unknown option to `s'". Rerunning the updater for `apify-cli` produces a
  byte-identical formula.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BcRjUSnuwKjKhQRgKQ1zzv
@jancurn
jancurn requested a review from fnesveda July 31, 2026 22:21
jancurn added a commit to apify/mcpc that referenced this pull request Jul 31, 2026
Lets macOS and Linux users install mcpc with `brew install
apify/tap/mcpc` instead of setting up Node.js or Bun first. The formula
lives in [apify/homebrew-tap](https://github.com/apify/homebrew-tap)
next to `apify-cli` (added in apify/homebrew-tap#55).

Its bump is started **manually for now** — the release workflow only
prints the `gh workflow run` command in its run summary rather than
dispatching it. That workflow points `Formula/mcpc.rb` at the new npm
tarball, installs and `brew test`s it on Linux and macOS, then merges
the bump.

- README documents Homebrew as the first install option
- Changelog entry, plus the manual bump command in the release section
of `CLAUDE.md`
- The release step is last and `continue-on-error`, so nothing
Homebrew-related can fail a release that is already tagged, published to
npm and announced
- Skipping a bump only leaves Homebrew users on the previous version;
npm and Bun installs are unaffected

Merge apify/homebrew-tap#55 before the first bump, otherwise there is no
formula to update.

Fixes #355

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01BcRjUSnuwKjKhQRgKQ1zzv

---------

Co-authored-by: Claude <noreply@anthropic.com>

@fnesveda fnesveda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 Are you planning on upstreaming this to https://github.com/homebrew/homebrew-core?

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.

4 participants