feat: surface serverFingerprint on agent mcp fetch/asset replace @W-23608280 - #466
Open
Christian-Vallejos wants to merge 1 commit into
Open
Conversation
…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>
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.
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 fetchnow prints theserverFingerprintreturned byPOST /fetch(an opaque hash of the server's current tool definitions).
agent mcp asset replacegains--server-fingerprint(-f): round-trip thevalue from a prior fetch so the server can confirm the reviewed definitions
haven't drifted. Without it, keeping an already-active
OUT_OF_SYNCtool activeis rejected with a
409conflict — re-fetch, review, then resend with the newfingerprint.
Dependency
Requires the
serverFingerprintfield added in forcedotcom/agents#325(
McpServerFetchOutput/McpServerAssetReplaceInput). Merge and publish thatfirst, then this PR bumps
@salesforce/agentsto 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-fingerprintflagand 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.
command-snapshot.jsonandschemas/agent-mcp-fetch.json.Test plan
tsc --noEmit— clean.eslinton the changed commands — clean.bin/dev.js schema:compare— no changes detected.bin/dev.js snapshot:compare— no changes detected.🤖 Generated with Claude Code