Skip to content

feat: add MCP server manifest - #574

Merged
mergify[bot] merged 7 commits into
mainfrom
feat/564-server-manifest
Jul 10, 2026
Merged

feat: add MCP server manifest#574
mergify[bot] merged 7 commits into
mainfrom
feat/564-server-manifest

Conversation

@charliecreates

@charliecreates charliecreates Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add registry-ready MCP metadata with package mcpName, a schema-valid root server.json, and required HEVY_API_KEY configuration.
  • Keep manifest and package versions synchronized across Changesets, custom/manual version scripts, prepack, and CI enforcement.
  • Include the manifest in the npm package with deterministic sync/check tooling and focused test coverage.

Validation

  • npm run check:server-manifest
  • npm run check:types
  • npm run check
  • npm run build
  • npx vitest run --exclude 'tests/integration/**'
  • npm run check:changeset
  • Official pinned schema validation
  • npm pack --dry-run --json

Resolves #564

✨ PR Description

Purpose: Implement MCP server manifest generation and synchronization to expose registry metadata and ensure consistency between package.json and server.json.

Main changes:

  • Created server manifest validation script with "check" and "sync" modes to detect and repair drift between package.json and server.json
  • Added server.json MCP registry metadata file with npm package configuration, stdio transport, and HEVY_API_KEY environment variable
  • Integrated manifest validation into npm workflows: prepack, version scripting, and CI pipeline checks

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

@mergify

mergify Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.03%. Comparing base (d1f629e) to head (c965c7f).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #574      +/-   ##
==========================================
+ Coverage   91.57%   92.03%   +0.46%     
==========================================
  Files          31       33       +2     
  Lines        1270     1344      +74     
  Branches      317      335      +18     
==========================================
+ Hits         1163     1237      +74     
  Misses         48       48              
  Partials       59       59              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Unit Test Results

  1 files   29 suites   1s ⏱️
429 tests 429 ✅ 0 💤 0 ❌
433 runs  433 ✅ 0 💤 0 ❌

Results for commit c965c7f.

♻️ This comment has been updated with latest results.

@gitstream-cm gitstream-cm Bot left a comment

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.

✨ PR Review

The PR introduces a well-structured MCP server manifest with solid sync/check tooling and good test coverage. One concrete fragility exists in how the changesets version script invokes the CLI binary.

2 issues detected:

🧹 Maintainability - `node ./node_modules/@changesets/cli/bin.js` hardcodes an internal file path within a dependency, which is not part of the package's public API surface and can break on any internal refactor of `@changesets/cli`. 🛠️

Details: The version:changesets script directly invokes node ./node_modules/@changesets/cli/bin.js version instead of using the conventional node_modules/.bin/changeset version or npx changeset version. Accessing an internal package file path bypasses the package's own bin-entry contract and will silently break if the @changesets/cli package reorganizes its internals or moves the bin entrypoint.

File: package.json (53-53)

🛠️ A suggested code correction is included in the review comments.

🐞 Bug - When `drift` is non-empty but mutation + re-serialization produces bytes identical to the original file, the function returns `changed: false` alongside a non-empty `drift` array, which is a self-contradictory result. 🛠️

Details: In sync mode, after applying drift fixes the function computes updatedContents and writes the file only when updatedContents !== contents. The return value { changed: updatedContents !== contents, drift } is computed AFTER the conditional write. If the serialized result somehow equals the original on-disk content despite reported drift (e.g., a key ordering coincidence after mutation), the function returns { changed: false, drift: [...non-empty...] } — a logically contradictory result that would mislead callers and the CLI output ("server.json is synchronized") while drift entries are non-empty.

File: scripts/server-manifest.mjs (159-163)

🛠️ A suggested code correction is included in the review comments.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how

Comment thread package.json Outdated
Comment thread scripts/server-manifest.mjs Outdated
@charliecreates

Copy link
Copy Markdown
Contributor Author

Repaired codecov/project with coverage for scripts/server-manifest.mjs error handling and CLI sync/error paths. Pushed ab1089ce3ccbb04527978272a02e5263ce881720; focused coverage is now 100% lines and 97.61% branches.

Validated with npm test, npm run check, npm run check:types, and npm run build.

— charlied/pr-check-repair

@gitstream-cm gitstream-cm Bot left a comment

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.

✨ PR Review

The PR adds well-structured MCP manifest tooling with solid validation and test coverage. The main concern is a sequencing bug in the manual version scripts where server.json sync occurs after npm version has already committed, leaving the manifest update uncommitted.

1 issues detected:

🐞 Bug - `npm version patch` commits `package.json` first; the subsequent `sync:server-manifest` call modifies `server.json` after the commit has already been created, leaving an uncommitted change. 🛠️

Details: The version:patch, version:minor, and version:major scripts run npm run sync:server-manifest after npm version, but npm version already creates a git commit (and tag) before the && chain continues. As a result, server.json is updated on disk but the change is left uncommitted — the version bump commit contains only package.json while server.json drifts behind in the working tree.

File: package.json (54-56)

🛠️ A suggested code correction is included in the review comments.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how

Comment thread package.json Outdated
@chrisdoc

Copy link
Copy Markdown
Owner

@CharlieHelps gitStream AI review raised 3 issues that appear unaddressed:

  1. Maintainability - node ./node_modules/@changesets/cli/bin.js hardcodes an internal dependency path. Should use npx changeset version or node_modules/.bin/changeset version instead. (package.json:53)
  2. Bug - When drift is non-empty but re-serialization produces identical bytes, syncServerManifest returns { changed: false, drift: [...non-empty...] } which is self-contradictory. (scripts/server-manifest.mjs:159-163)
  3. Bug - npm version commits package.json before sync:server-manifest runs, leaving server.json uncommitted in the working tree. The version scripts need to sync server.json before the commit, or use a postversion hook. (package.json:54-56)

@charliecreates

Copy link
Copy Markdown
Contributor Author

Addressed and verified all three against the current PR head:

  • The Changesets scripts already use the public changeset executable; no internal node_modules/@changesets/cli/bin.js path remains.
  • Fixed the sync result invariant in c965c7f: non-empty drift now always writes the canonical manifest and returns changed: true. The regression test explicitly protects that invariant.
  • Confirmed the npm version hook syncs and stages server.json before npm creates the version commit. The existing isolated test verifies that both package.json and server.json land in the commit, the tag points to it, and the worktree stays clean.

Focused tests and the full required local validation passed. All GitHub checks on the new head are terminal with no failures.

@chrisdoc chrisdoc added the queue Add to Mergify merge queue label Jul 10, 2026
@mergify mergify Bot added the queued label Jul 10, 2026
@mergify

mergify Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 2 minutes 34 seconds in the queue, including 1 minute 32 seconds running CI.

Required conditions to merge
  • check-success = "Build and test (Node 24.x)"
  • check-success = "Build and test (Node 26.x)"

mergify Bot added a commit that referenced this pull request Jul 10, 2026
@mergify
mergify Bot merged commit 0a26ed0 into main Jul 10, 2026
25 of 26 checks passed
@mergify
mergify Bot deleted the feat/564-server-manifest branch July 10, 2026 18:57
@mergify mergify Bot removed the queued label Jul 10, 2026
@github-actions github-actions Bot mentioned this pull request Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

queue Add to Mergify merge queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add server.json manifest and mcpName field to package.json

2 participants