fix(filesystem): read server version from package.json - #4578
Open
cyforkk wants to merge 2 commits into
Open
Conversation
mcp 2.0.0 renamed McpError to MCPError, breaking imports in servers with no upper bound. Cap mcp to <2 in all three Python servers (time, fetch, git) and regenerate lockfiles with the default PyPI index. Closes modelcontextprotocol#4560, modelcontextprotocol#4570 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The serverInfo.version was hardcoded as "0.2.0" while package.json reports "0.6.3". Read the version at runtime so it stays in sync with the published package, matching the approach used for sequentialthinking (PR modelcontextprotocol#4576). Related: modelcontextprotocol#360 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Hey @cyforkk - This specific failure mode (unpinned agent dependencies
silently crashing production pipelines) is exactly what corporate CISOs
look for during SOC 2 supply chain audits.
While capping the dependency to <2 locally fixes the immediate crash,
enterprise environments require deterministic manifest verification before
these servers can be safely deployed.
If your team is shipping MCP servers to corporate clients and hitting
procurement friction over dependency governance, our free GitHub App
automatically flags version drift and endpoint security posture in
PRs: *github.com/marketplace/ecz-id-mcp-agent-check
<https://www.google.com/search?q=https%3A%2F%2Fgithub.com%2Fmarketplace%2Fecz-id-mcp-agent-check>*
…On Wed, Jul 29, 2026 at 2:13 PM cyforkk ***@***.***> wrote:
Description
Related: #360 <#360>
The serverInfo.version returned during MCP initialization was hardcoded
as "0.2.0" while package.json reports "0.6.3". This causes confusion when
diagnosing client/server issues — the reported version looks like a very
old release.
This PR reads the version at runtime from package.json, matching the
approach used for the sequentialthinking server (PR #4576
<#4576>).
Changes
- src/filesystem/version.ts (new): resolvePackageVersion() that works
from both source and dist/ layouts
- src/filesystem/index.ts: import SERVER_VERSION from version.js,
replace hardcoded "0.2.0"
- src/filesystem/__tests__/server-version.test.ts (new): asserts
version matches package.json, plus stdio smoke test (skipped when dist/
is absent)
Checklist
- PR title follows conventional commits
- Related issue #360
<#360>
- Tests added
- Matches existing pattern from PR #4576
<#4576>
Co-Authored-By: Claude Fable 5 ***@***.***
------------------------------
You can view, comment on, or merge this pull request online at:
#4578
Commit Summary
- 4369d8c
<4369d8c>
fix(python): cap mcp dependency to <2 across all Python servers
- 0a4408f
<0a4408f>
fix(filesystem): read server version from package.json
File Changes
(9 files <https://github.com/modelcontextprotocol/servers/pull/4578/files>
)
- *M* src/fetch/pyproject.toml
<https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-9ebddfcba7203950888834d646ce9cf07f061d6b2d7cc5c1964195da56b3ee1a>
(2)
- *M* src/fetch/uv.lock
<https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-bd9bb40e7418b433b93cfa67471628876f3e75e1bfa7091a4a2487423a92fbdf>
(2)
- *A* src/filesystem/__tests__/server-version.test.ts
<https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-5ba09be8eb9f441609cfe4cd8432de27f3113ece357e6298ad9a0a831e1c0a2c>
(57)
- *M* src/filesystem/index.ts
<https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-aa601c5b57e1ae1d4df870a5ab623fa7661b935e36261124c39f0f9613f96946>
(3)
- *A* src/filesystem/version.ts
<https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-2c9f5a89ad837b45097592af31deebe398ed4e9677619449db79f35a04b21b2a>
(33)
- *M* src/git/pyproject.toml
<https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-0258d4dd5dd89355c4fe5354fd894ef24ef2f494ad6962f69333008ad21bbbfb>
(2)
- *M* src/git/uv.lock
<https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-3b2540c336df9745f92f5cd0eb5deb216ddc62016ff3454fbe967c39a0c5ab9e>
(2)
- *M* src/time/pyproject.toml
<https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-6463bc847e7a4a1c35b85e14579034edeb1e232a77bfc02c0f41cc158e25e083>
(2)
- *M* src/time/uv.lock
<https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-709add7eda7fc1270eba3d9548a17514844b3d7f3c8509e1aa41e92da80d5a22>
(2)
Patch Links:
- https://github.com/modelcontextprotocol/servers/pull/4578.patch
- https://github.com/modelcontextprotocol/servers/pull/4578.diff
—
Reply to this email directly, view it on GitHub
<#4578?email_source=notifications&email_token=CBJRDB7RDCEF2IU3DEJIBFD5HH2ARA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DCNRQG43TMMJVHGTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVRTG633UMVZF6Y3MNFRWW>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/CBJRDB4CKQ2T5VOJFOLT2ZL5HH2ARAVCNFSNUABFKJSXA33TNF2G64TZHM4DSMBWGY4DOOJZHNEXG43VMU5TKMBQHE3DINJRGQY2C5QC>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
|
Hey @cyforkk - From an enterprise deployment perspective, hardcoded
versions in agent metadata are a massive red flag.
When CISOs audit MCP deployments, they require deterministic version
reporting to track vulnerabilities and enforce authorization boundaries. If
an agent reports a stale version to the host, the entire identity boundary
is compromised.
For devs building on top of this who need to verify their agent metadata
and security posture before a corporate audit, we map out the required
TrustOps architecture at *mcp.ecocitizenz.com <http://mcp.ecocitizenz.com>*.
Solid fix.
On Wed, Jul 29, 2026 at 6:55 PM EcoCitizenz EcoCitizens <
***@***.***> wrote:
… Hey @cyforkk - This specific failure mode (unpinned agent dependencies
silently crashing production pipelines) is exactly what corporate CISOs
look for during SOC 2 supply chain audits.
While capping the dependency to <2 locally fixes the immediate crash,
enterprise environments require deterministic manifest verification before
these servers can be safely deployed.
If your team is shipping MCP servers to corporate clients and hitting
procurement friction over dependency governance, our free GitHub App
automatically flags version drift and endpoint security posture in PRs: *github.com/marketplace/ecz-id-mcp-agent-check
<https://www.google.com/search?q=https%3A%2F%2Fgithub.com%2Fmarketplace%2Fecz-id-mcp-agent-check>*
On Wed, Jul 29, 2026 at 2:13 PM cyforkk ***@***.***> wrote:
> Description
>
> Related: #360
> <#360>
>
> The serverInfo.version returned during MCP initialization was hardcoded
> as "0.2.0" while package.json reports "0.6.3". This causes confusion
> when diagnosing client/server issues — the reported version looks like a
> very old release.
>
> This PR reads the version at runtime from package.json, matching the
> approach used for the sequentialthinking server (PR #4576
> <#4576>).
> Changes
>
> - src/filesystem/version.ts (new): resolvePackageVersion() that works
> from both source and dist/ layouts
> - src/filesystem/index.ts: import SERVER_VERSION from version.js,
> replace hardcoded "0.2.0"
> - src/filesystem/__tests__/server-version.test.ts (new): asserts
> version matches package.json, plus stdio smoke test (skipped when
> dist/ is absent)
>
> Checklist
>
> - PR title follows conventional commits
> - Related issue #360
> <#360>
> - Tests added
> - Matches existing pattern from PR #4576
> <#4576>
>
> Co-Authored-By: Claude Fable 5 ***@***.***
> ------------------------------
> You can view, comment on, or merge this pull request online at:
>
> #4578
> Commit Summary
>
> - 4369d8c
> <4369d8c>
> fix(python): cap mcp dependency to <2 across all Python servers
> - 0a4408f
> <0a4408f>
> fix(filesystem): read server version from package.json
>
> File Changes
>
> (9 files
> <https://github.com/modelcontextprotocol/servers/pull/4578/files>)
>
> - *M* src/fetch/pyproject.toml
> <https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-9ebddfcba7203950888834d646ce9cf07f061d6b2d7cc5c1964195da56b3ee1a>
> (2)
> - *M* src/fetch/uv.lock
> <https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-bd9bb40e7418b433b93cfa67471628876f3e75e1bfa7091a4a2487423a92fbdf>
> (2)
> - *A* src/filesystem/__tests__/server-version.test.ts
> <https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-5ba09be8eb9f441609cfe4cd8432de27f3113ece357e6298ad9a0a831e1c0a2c>
> (57)
> - *M* src/filesystem/index.ts
> <https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-aa601c5b57e1ae1d4df870a5ab623fa7661b935e36261124c39f0f9613f96946>
> (3)
> - *A* src/filesystem/version.ts
> <https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-2c9f5a89ad837b45097592af31deebe398ed4e9677619449db79f35a04b21b2a>
> (33)
> - *M* src/git/pyproject.toml
> <https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-0258d4dd5dd89355c4fe5354fd894ef24ef2f494ad6962f69333008ad21bbbfb>
> (2)
> - *M* src/git/uv.lock
> <https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-3b2540c336df9745f92f5cd0eb5deb216ddc62016ff3454fbe967c39a0c5ab9e>
> (2)
> - *M* src/time/pyproject.toml
> <https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-6463bc847e7a4a1c35b85e14579034edeb1e232a77bfc02c0f41cc158e25e083>
> (2)
> - *M* src/time/uv.lock
> <https://github.com/modelcontextprotocol/servers/pull/4578/files#diff-709add7eda7fc1270eba3d9548a17514844b3d7f3c8509e1aa41e92da80d5a22>
> (2)
>
> Patch Links:
>
> - https://github.com/modelcontextprotocol/servers/pull/4578.patch
> - https://github.com/modelcontextprotocol/servers/pull/4578.diff
>
> —
> Reply to this email directly, view it on GitHub
> <#4578?email_source=notifications&email_token=CBJRDB7RDCEF2IU3DEJIBFD5HH2ARA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DCNRQG43TMMJVHGTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVRTG633UMVZF6Y3MNFRWW>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/CBJRDB4CKQ2T5VOJFOLT2ZL5HH2ARAVCNFSNUABFKJSXA33TNF2G64TZHM4DSMBWGY4DOOJZHNEXG43VMU5TKMBQHE3DINJRGQY2C5QC>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related: #360
The
serverInfo.versionreturned during MCP initialization was hardcoded as"0.2.0"whilepackage.jsonreports"0.6.3". This causes confusion when diagnosing client/server issues — the reported version looks like a very old release.This PR reads the version at runtime from
package.json, matching the approach used for the sequentialthinking server (PR #4576).Changes
src/filesystem/version.ts(new):resolvePackageVersion()that works from both source anddist/layoutssrc/filesystem/index.ts: importSERVER_VERSIONfromversion.js, replace hardcoded"0.2.0"src/filesystem/__tests__/server-version.test.ts(new): asserts version matchespackage.json, plus stdio smoke test (skipped whendist/is absent)Checklist
Co-Authored-By: Claude Fable 5 noreply@anthropic.com