feat: add signed MCP audit receipts#7535
Open
gyx09212214-prog wants to merge 1 commit into
Open
Conversation
gyx09212214-prog
marked this pull request as ready for review
June 12, 2026 15:52
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
Adds optional signed JSONL audit receipts for OpenBB MCP server tool calls, addressing #7455 with a narrowly scoped MVP.
The feature is disabled by default. When enabled, each MCP tool call emits a tamper-evident receipt containing the tool name, canonical argument hash, timestamp, status, duration, principal, public key, and Ed25519 signature.
What changed
AuditReceiptmodel andAuditReceiptMiddlewarefor FastMCPon_call_toolevents.arguments_sha256, not raw tool arguments, to reduce the chance of persisting sensitive query details.Validation
python -m pytest tests -q181 passed, 2 skippedpython -m ruff check openbb_mcp_server\models\audit.py openbb_mcp_server\utils\audit.py openbb_mcp_server\models\settings.py openbb_mcp_server\app\app.py tests\utils\test_audit.py tests\models\test_mcp_settings.py tests\app\test_app.pyAll checks passed!Notes
This intentionally does not add a policy engine in the first PR.
policy_decisionis recorded asallowso the receipt schema has a stable place for future authorization decisions without expanding the initial review scope.