feat(transport): expose inbound Nostr request event id in MCP requests#70
feat(transport): expose inbound Nostr request event id in MCP requests#70ContextVM-org merged 5 commits intomasterfrom
Conversation
Add support for injecting and accessing the inbound Nostr request event ID in MCP request messages via the _meta field. This enables middleware and tools to access the original Nostr event that triggered the request, including the event's pubkey and full event data through a request-scoped context store.
|
Hey, thanks for putting this up! Being able to access the original Nostr event in middleware is going to be super useful (for things like audit logging) I took a look through the code and the overall approach looks solid. I did notice a few things we might want to tweak before merging: The main thing is around A couple other minor thoughts:
Lmk what you think! |
…equestEvent method Move request event storage from global nostr-request-context module to CorrelationStore. Add injectRequestEventId option to control whether inbound request event ID is injected into _meta field. Add getNostrRequestEvent() method to access stored request events. Add cleanup for dropped requests when middleware doesn't forward.
|
Thanks @1amKhush for your review. Attached your comments. Mergin |
Add support for injecting and accessing the inbound Nostr request event ID in MCP request messages via the _meta field. This enables middleware and tools to access the original Nostr event that triggered the request, including the event's pubkey and full event data through a request-scoped context store.