Skip to content

Publish MCP package; improve publishing ergonomics#2

Merged
blakekrammes merged 1 commit intomainfrom
refine-publishing
May 1, 2026
Merged

Publish MCP package; improve publishing ergonomics#2
blakekrammes merged 1 commit intomainfrom
refine-publishing

Conversation

@blakekrammes
Copy link
Copy Markdown
Contributor

@blakekrammes blakekrammes commented Apr 30, 2026

This PR includes the following changes:

  1. Adds publish flow for standalone Formio MCP server
  2. Updates GH workflow to publish both @formio/ai and @formio/mcp
  3. Adds prepublishOnly scripts for both packages that build and test each package before publishing
  4. Adds root-level script (release:get-tag) to check for existence of .changeset/.pre.json file to get prerelease (rc) tag (I tried using changeset publish, which handles this automatically, but it didn't handle the pnpm scripts in the plugin package, so I opted for pnpm publish instead)*
  5. Clears pre-publish changesets and adds a changeset for 1.0.0-rc.0 for both packages– after this PR is merged, release.yml should create a subsequent version PR, which should publish to NPM on merge
  6. Cleans up standalone MCP server build for distribution
  7. Told the AI to (verbatim) copy the MCP-relevant content from main readme into a new readme for the MCP package

*For pre-release versions, we'll use 0.x, and only use the rc tag after the release of 1.x. Since this PR deletes the pre.json file, the rc tag will not be included in the npm publish command

Comment thread package.json
"changeset": "changeset",
"changeset:version": "changeset version",
"release:plugin": "pnpm --filter @formio/ai publish --no-git-checks"
"release:get-tag": "node -p \"require('fs').existsSync('.changeset/pre.json')?require('./.changeset/pre.json').tag:'latest'\"",
Copy link
Copy Markdown
Contributor Author

@blakekrammes blakekrammes Apr 30, 2026

Choose a reason for hiding this comment

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

This will default to latest if pre.json does not exist. This file is managed by changeset CLI commands.

https://github.com/changesets/changesets/blob/main/docs/prereleases.md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried using changeset publish, which handles this automatically, but it didn't handle the pnpm scripts in the plugin package, so I opted for pnpm publish instead along with this workaround to auto-load the rc tag.

@blakekrammes
Copy link
Copy Markdown
Contributor Author

Worth noting that npm adds the latest tag (at least when I was testing with verdaccio) on the initial publish, even if you use the --tag flag with a specific tag.

Starts with
npm publish --tag rc

npm publish --tag rc                                               

> @formio/mcp@1.0.0-rc.0 prepublishOnly
> pnpm test && pnpm build


> @formio/mcp@1.0.0-rc.0 test /Users/blakekrammes/projects/ai/packages/mcp-server
> vitest run


 RUN  v3.2.4 /Users/blakekrammes/projects/ai/packages/mcp-server

 ✓ src/__tests__/token-cache.test.ts (5 tests) 21ms
 ✓ src/__tests__/formio-client-integration.test.ts (2 tests) 52ms
 ✓ src/__tests__/skills-library.test.ts (33 tests) 93ms
...

 Test Files  32 passed (32)
      Tests  277 passed (277)
   Start at  16:13:58
   Duration  5.25s (transform 626ms, setup 430ms, collect 4.71s, tests 10.25s, environment 4ms, prepare 2.23s)


> @formio/mcp@1.0.0-rc.0 build /Users/blakekrammes/projects/ai/packages/mcp-server
> tsc -p tsconfig.build.json

npm warn publish npm auto-corrected some errors in your package.json when publishing.  Please run "npm pkg fix" to address these errors.
npm warn publish errors corrected:
npm warn publish "bin[formio-mcp]" script name dist/stdio.js was invalid and removed
npm notice
npm notice 📦  @formio/mcp@1.0.0-rc.0
...
npm notice Publishing to https://pkg.test-form.io with tag rc and public access
+ @formio/mcp@1.0.0-rc.0
 ~/projects/ai/packages/mcp-server   refine-publishing ±  npm dist-tag ls @formio/mcp         
                                
latest: 1.0.0-rc.0
rc: 1.0.0-rc.0

notice output of npm dist-tag ls @formio/mcp is:
latest: 1.0.0-rc.0
rc: 1.0.0-rc.0

Comment thread .changeset/initial-1.0.md Outdated
'@formio/ai': major
---

Initial 1.0 release candidate.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Initial release will be a beta

Copy link
Copy Markdown
Contributor Author

@blakekrammes blakekrammes May 1, 2026

Choose a reason for hiding this comment

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

I've set both package versions to 0.1.0. We can do a manual publish for now and then when the next changeset comes through it should trigger the version creation/publishing automation. Alternatively, could bump the versions back manually to 0.0.0 and then make a changeset file for 0.1.0 to trigger automation.

@blakekrammes blakekrammes merged commit c7c7da4 into main May 1, 2026
1 check passed
@blakekrammes blakekrammes deleted the refine-publishing branch May 1, 2026 19:40
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.

2 participants