Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(mcp): report package version from metadata#222

Merged
KIvanow merged 1 commit into
BetterDB-inc:masterfrom
RitwijParmar:ritwij/fix-mcp-server-version
Jul 7, 2026
Merged

fix(mcp): report package version from metadata#222
KIvanow merged 1 commit into
BetterDB-inc:masterfrom
RitwijParmar:ritwij/fix-mcp-server-version

Conversation

@RitwijParmar

Copy link
Copy Markdown
Contributor

Summary\n- derive the MCP server version from packages/mcp/package.json instead of a hardcoded 0.1.0\n- keeps the MCP handshake version aligned with the published package version\n\nFixes #152.\n\n## Test\n- pnpm --filter @betterdb/mcp build

@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown

All contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@RitwijParmar

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

recheck

@RitwijParmar

Copy link
Copy Markdown
Contributor Author

recheck

@RitwijParmar

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@RitwijParmar

Copy link
Copy Markdown
Contributor Author

recheck

github-actions Bot added a commit that referenced this pull request May 26, 2026
@KIvanow

KIvanow commented Jul 7, 2026

Copy link
Copy Markdown
Member

Thanks for the fix — the hardcoded 0.1.0 has been stale since the first release, so this is needed.

One minor suggestion: createRequire pulls in a CJS shim just to load JSON. A pure-ESM alternative would be more consistent with the rest of the codebase:

import { readFileSync } from 'node:fs';
const { version } = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf-8'));

Also, can you confirm the ../package.json path resolves correctly from the compiled output in dist/? If the build flattens the directory structure it could break.

Not a blocker — approving as-is.

@KIvanow KIvanow 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.

LGTM

@KIvanow KIvanow merged commit 644b563 into BetterDB-inc:master Jul 7, 2026
1 of 2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants