Skip to content

fix(server-memory): read version from package.json instead of hardcoding#4444

Closed
amerilain wants to merge 2 commits into
modelcontextprotocol:mainfrom
amerilain:fix/memory-server-version-dynamic
Closed

fix(server-memory): read version from package.json instead of hardcoding#4444
amerilain wants to merge 2 commits into
modelcontextprotocol:mainfrom
amerilain:fix/memory-server-version-dynamic

Conversation

@amerilain

Copy link
Copy Markdown

Description

Fixes #4406.

The serverInfo.version in the memory server was hardcoded as "0.6.3", which has not matched the actual npm package version since the transition to calendar versioning (2025.4.25 onward).

Change

This PR reads the version dynamically from package.json at runtime using createRequire, so the reported version always reflects the published package version.

Testing

  • Verified the TypeScript compiles cleanly with the createRequire import pattern
  • The change is minimal — 2 lines added, 1 line removed

Impact

No runtime behavior change beyond the version string. Fixes a confusing discrepancy where memory-server reported "0.6.3" regardless of the installed version.

The server-info version in the memory server was hardcoded as '0.6.3',
which doesn't match the actual npm package version (2026.1.26).

This change reads the version dynamically from package.json at runtime,
so it always reflects the published package version.

Fixes modelcontextprotocol#4406
@amerilain amerilain closed this Jun 30, 2026
@amerilain amerilain deleted the fix/memory-server-version-dynamic branch June 30, 2026 10:59
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.

serverInfo.version hardcoded as "0.6.3" in @modelcontextprotocol/server-memory@2026.1.26

1 participant