Skip to content

feat: surface serverFingerprint on agent mcp fetch/asset replace @W-23608280 - #466

Open
Christian-Vallejos wants to merge 1 commit into
salesforcecli:mainfrom
Christian-Vallejos:t/api-catalog/mcp-server-fingerprint
Open

feat: surface serverFingerprint on agent mcp fetch/asset replace @W-23608280#466
Christian-Vallejos wants to merge 1 commit into
salesforcecli:mainfrom
Christian-Vallejos:t/api-catalog/mcp-server-fingerprint

Conversation

@Christian-Vallejos

Copy link
Copy Markdown
Contributor

Summary

Wires the MCP tool-drift fingerprint through the CLI so admins can protect an
active tool from a silent description swap (rug pull) on an EXTERNAL MCP server.

  • agent mcp fetch now prints the serverFingerprint returned by POST /fetch
    (an opaque hash of the server's current tool definitions).
  • agent mcp asset replace gains --server-fingerprint (-f): round-trip the
    value from a prior fetch so the server can confirm the reviewed definitions
    haven't drifted. Without it, keeping an already-active OUT_OF_SYNC tool active
    is rejected with a 409 conflict — re-fetch, review, then resend with the new
    fingerprint.

Dependency

Requires the serverFingerprint field added in forcedotcom/agents#325
(McpServerFetchOutput / McpServerAssetReplaceInput). Merge and publish that
first, then this PR bumps @salesforce/agents to the published version.

What's included

  • src/commands/agent/mcp/fetch.ts — print the fingerprint after the assets table.
  • src/commands/agent/mcp/asset/replace.ts — add the --server-fingerprint flag
    and forward it into the replace input.
  • messages/agent.mcp.fetch.md, messages/agent.mcp.asset.replace.md — docs,
    flag summary, and an example round-tripping the fingerprint.
  • Regenerated command-snapshot.json and schemas/agent-mcp-fetch.json.

Test plan

  • tsc --noEmit — clean.
  • eslint on the changed commands — clean.
  • bin/dev.js schema:compare — no changes detected.
  • bin/dev.js snapshot:compare — no changes detected.

🤖 Generated with Claude Code

…3608280

Wire the MCP tool-drift fingerprint through the CLI:

- `agent mcp fetch` now prints the `serverFingerprint` returned by POST /fetch
  (an opaque hash of the server's current tool definitions).
- `agent mcp asset replace` gains `--server-fingerprint` (`-f`): round-trip the
  value from a prior fetch so the server can confirm the reviewed definitions
  haven't drifted. Without it, keeping an already-active OUT_OF_SYNC tool active
  is rejected with a 409 conflict — re-fetch, review, then resend with the new
  fingerprint.

Bumps @salesforce/agents for the McpServerFetchOutput/McpServerAssetReplaceInput
serverFingerprint field. Regenerated command-snapshot.json and the fetch schema.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Christian-Vallejos
Christian-Vallejos requested a review from a team as a code owner July 29, 2026 18:39
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