Skip to content

PIGS-642: Fix MCP server reporting version as 0.0.0-dev in initialize response#51

Closed
IvanK-Nitro wants to merge 2 commits into
mainfrom
PIGS-642-fix-version-in-initialize-response
Closed

PIGS-642: Fix MCP server reporting version as 0.0.0-dev in initialize response#51
IvanK-Nitro wants to merge 2 commits into
mainfrom
PIGS-642-fix-version-in-initialize-response

Conversation

@IvanK-Nitro

Copy link
Copy Markdown
Contributor

Summary

  • The build task in node-version/Taskfile.yml now runs esbuild directly with --define:process.env.MCP_SERVER_VERSION="{{.VERSION}}", baking the version from manifest.json into the bundle at compile time
  • Previously it delegated to task bundle (via npm run bundle) which called esbuild without the --define flag, so process.env.MCP_SERVER_VERSION was always undefined at runtime and fell back to 0.0.0-dev
  • The version is already read from manifest.json in this task (to name the output .mcpb file), so no new logic was needed — just passing it one step earlier into esbuild

Test plan

  • Run task build and confirm the produced bundle reports the correct version in the MCP initialize response
  • Run task bundle standalone and confirm it still works (unchanged behaviour)

Fixes PIGS-642

🤖 Generated with Claude Code

Add --define:process.env.MCP_SERVER_VERSION to the esbuild invocation in
the build task so the version from manifest.json is baked into dist/bundle.cjs
at compile time, replacing the 0.0.0-dev fallback in the initialize response.
@claude

claude Bot commented Apr 29, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@IvanK-Nitro

Copy link
Copy Markdown
Contributor Author

This is not urgent, whenever you have time

@claude

claude Bot commented Apr 30, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@rpalekar

Copy link
Copy Markdown
Contributor

@rpalekar rpalekar closed this Apr 30, 2026
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.

3 participants