Skip to content

fix(sequentialthinking): read server version from package.json - #4576

Open
KarlLeen wants to merge 2 commits into
modelcontextprotocol:mainfrom
KarlLeen:fix/sequentialthinking-package-version
Open

fix(sequentialthinking): read server version from package.json#4576
KarlLeen wants to merge 2 commits into
modelcontextprotocol:mainfrom
KarlLeen:fix/sequentialthinking-package-version

Conversation

@KarlLeen

Copy link
Copy Markdown

Fixes #4575

Read serverInfo.version from package.json at runtime instead of hardcoding "0.2.0".

Published @modelcontextprotocol/server-sequential-thinking@2026.7.4 still ships dist/index.js with version: "0.2.0" while its package.json is "2026.7.4". Same class of bug as #4406 for memory; related to #360.

Changes

  • Add version.ts with resolvePackageVersion() (source + dist/ layouts)
  • Wire McpServer to SERVER_VERSION
  • Tests: not "0.2.0", optional dist resolve, stdio initialize smoke via SDK client

How Has This Been Tested?

  • cd src/sequentialthinking && npm run build && npm test → 17 passed
  • rm -rf dist && npm test → 15 passed, 2 skipped
  • Stdio smoke: SDK Client + StdioClientTransport against dist/index.js; getServerVersion().version matches package.json

Note

Aligns serverInfo with package.json (in-tree 0.6.2). CalVer on the next publish follows whatever release writes into package.json (see #3870).

Server Details

  • Server: sequentialthinking
  • Changes to: serverInfo version reporting

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have tested this with an LLM client (stdio initialize smoke)
  • My code follows the repository's style guidelines
  • New and existing tests pass locally

KarlLeen added 2 commits July 29, 2026 05:46
Replace the hardcoded 0.2.0 so initialize serverInfo tracks the
package version (0.6.2 in-tree; CalVer after release), matching the
approach used for memory server version sync.

Skip the dist-layout assertion when dist/ is absent so CI's
test-before-build job (and local runs without prepare) still pass.
Spawn the built server over stdio and assert getServerVersion() matches
package.json (and is not the old hardcoded 0.2.0). Skip when dist/ is
absent so test-before-build CI still passes.
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.

sequentialthinking: serverInfo.version hardcoded as "0.2.0" (published package is 2026.7.4)

1 participant