Skip to content

serverInfo.version and server.json disagree, and neither moves when the tool surface does #573

Description

@serge-ivo

The MCP server reports two different versions, and neither has moved since June

initialize is the only moment a client learns what build it is talking to. Ours answers with
a version that is both wrong and stale, in two disagreeing places.

Verified

Two values, one server:

  • workers/mcp/src/index.ts:43new McpServer({ name: "ProAgentStore", version: "0.1.0" }, …)
    — this is what a connecting client reads from serverInfo.version.
  • server.json:6"version": "0.1.1" — this is the public MCP-registry manifest, published by
    .github/workflows/publish-mcp-registry.yml on any push touching that file.

They have never agreed. server.json was last touched by 45c2c4d (2026-06-23), a commit about
parse-tool-calls tests. index.ts's 0.1.0 predates it.

Four commits today changed what the surface serves, and neither version moved:

SHA Change
951ef59 every tool re-registered via registerTool; server instructions added
b2b0ac4 readOnlyHint on all 135 tools
778c5d2 destructiveHint on runtime tools
e392754 outputSchema + structuredContent on list_agents / my_instances

e392754 in particular changed a response shapemy_instances went from a bare array to
{"instances":[…]}. A client that cached the old contract has no signal that anything changed.

Why this is more than hygiene

Hosts cache tool metadata. That is not a hypothesis: the ProAgentStore connector in ChatGPT
served the pre-b2b0ac4 unannotated tool list until manually refreshed, because the annotations
landed with no version change to invalidate against. "Hit Refresh" is currently the only
invalidation mechanism this server offers, and it requires a human who already knows something
shipped.

A monotonic serverInfo.version is the standard signal here, and we serve a constant.

Acceptance criteria

  1. index.ts:43 and server.json derive from one source rather than two hand-typed
    literals, so they cannot disagree again.
  2. That version changes when the served surface changes. Decide and state what "changes" means —
    tool count, annotation set, and declared outputSchema are the candidates, since those are
    what a caching host keys on. A commit that only edits a handler's internals need not bump it.
  3. A docs-drift.mjs check in its existing style: the advertised version, the manifest version,
    and any documented version claim agree. Per ADR 0002 the success line states its denominator,
    and the input set is asserted rather than assumed.
  4. The check goes red when the two literals are edited apart, demonstrated.
  5. Decide whether publish-mcp-registry.yml should fire on an MCP surface change rather than
    only on a server.json edit — today the registry entry can only be refreshed by remembering
    to touch one file by hand. If the answer is no, say why in the issue.

Verified vs inferred

  • Verified: both literals and their file:line, server.json's last-touching commit and
    date, the four SHAs and what each changed, the my_instances shape change (measured live
    2026-08-15), and the registry workflow's paths: trigger.
  • Inferred: that a moving serverInfo.version would have caused ChatGPT to re-fetch. The
    stale-cache symptom is observed and the absent version signal is verified; that a bump would
    specifically have invalidated it is standard host behaviour but was not tested against
    OpenAI's client.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions