Skip to content

feat: add serverFingerprint to MCP fetch/replace types @W-23827791@ - #334

Open
dgs87 wants to merge 1 commit into
forcedotcom:mainfrom
dgs87:dsanchiz/w-23827791_add_server_fingerprint
Open

feat: add serverFingerprint to MCP fetch/replace types @W-23827791@#334
dgs87 wants to merge 1 commit into
forcedotcom:mainfrom
dgs87:dsanchiz/w-23827791_add_server_fingerprint

Conversation

@dgs87

@dgs87 dgs87 commented Aug 13, 2026

Copy link
Copy Markdown

What & why

ApiCatalog.fetchMcpServer and ApiCatalog.replaceMcpServerAssets are unaware of serverFingerprint
API now returns from POST /mcp-servers/{id}/fetch and accepts on PUT /mcp-servers/{id}/assets

Without it, @salesforce/agents consumers have no way to detect that a remote MCP server's tool definitions changed between reviewing them and saving the allowlist.

Change

Added serverFingerprint?: string to two existing types in src/apiCatalogTypes.ts:

  • McpServerFetchOutput — the /fetch response (producer)
  • McpServerAssetReplaceInput — the PUT /assets request body (consumer)

No changes to src/apiCatalog.ts: both fetchMcpServer and replaceMcpServerAssets already pass the full body/response through the generic request() helper, so the new field flows through automatically once the types declare it. No changes to src/index.ts: both types were already re-exported.

Test plan

  • Updated test/apiCatalog.test.ts: fetchMcpServer now asserts serverFingerprint is returned when present and left undefined when absent from the response;
    replaceMcpServerAssets now asserts serverFingerprint is round-tripped in the serialized request body when supplied and omitted (not sent as undefined)
    when not.
  • yarn build && yarn test green (15/15), 100% statement/branch/function/line coverage on apiCatalog.ts.

this is a continuation of the work made on #325

@W-23827791@

@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @dgs87 to sign the Salesforce Inc. Contributor License Agreement.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant