FreshCtx: pre-action freshness protection for MCP tools at tools/call #852
bhooshanvarma
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Pre-submission Checklist
What would you like to share?
I built a pre-action freshness guard for consequential MCP tool calls.
The failure case is narrow: an agent can make a valid decision from current evidence, but that evidence can change before the MCP tool executes.
FreshCtx 0.9.0 adds protection at the native
tools/callboundary. Immediately before a configured tool handler runs, FreshCtx revalidates the evidence declared for that action.A reproducible scenario:
available_balance = $10,000$8,000transfer is valid$2,000STALE_REASONINGThe outcomes are explicit:
CURRENT→ protected handler proceedsSTALE_REASONING→ blocked before the handlerUNVERIFIABLE→ blocked because required evidence could not be confirmedMultiple protected tools can have independent dependency sets, so stale evidence affecting one tool does not automatically block unrelated tools.
The main design challenge was keeping this boundary narrow. FreshCtx does not replace MCP authentication, authorization, transaction controls, idempotency, or tool-level safety.
It asks one additional question immediately before the protected action:
Is the evidence that justified this specific tool call still current?
I would especially value feedback from MCP server authors on whether
tools/callis the right boundary for this check in real MCP architectures.Relevant Links
GitHub:
https://github.com/Hyperwise-LLC/freshctx
MCP Guard documentation:
https://github.com/Hyperwise-LLC/freshctx/blob/main/docs/MCP_GUARD.md
Runnable three-outcome demo:
https://github.com/Hyperwise-LLC/freshctx/blob/main/examples/mcp_balance_guard.py
PyPI:
https://pypi.org/project/freshctx/0.9.0/
freshctx-mcp-stale-action-demo.mp4
All reactions