Skip to content

feat(mcp): support push notifications#1203

Open
Streamweaver wants to merge 10 commits into
RightNow-AI:mainfrom
Streamweaver:mcp-push-notifications
Open

feat(mcp): support push notifications#1203
Streamweaver wants to merge 10 commits into
RightNow-AI:mainfrom
Streamweaver:mcp-push-notifications

Conversation

@Streamweaver
Copy link
Copy Markdown
Contributor

@Streamweaver Streamweaver commented May 15, 2026

Summary

Adds MCP resource push-notification support across the type, runtime, and kernel layers. This lets OpenFang subscribe to MCP resources, receive server-side notifications, bridge them into kernel events, and replay subscriptions after MCP reconnects.

Refs #1096.

Changes

  • Adds typed MCP push notification, subscription, and event contracts.
  • Extends the MCP runtime to subscribe to resources, handle push events, rate-limit notifications, and emit tool-list-change events for targeted capability refreshes.
  • Bridges MCP push events through the kernel trigger path so agents can react to resource changes.
  • Adds an mcp_resource_subscribe tool and matching capability/config support.
  • Replays MCP subscriptions after reconnect so long-lived agents do not silently lose resource watches.

This is currently one focused draft PR. I can split it into stacked PRs if maintainers would prefer type contracts, runtime handling, kernel bridging, and tool surface changes reviewed separately.

Testing

  • cargo fmt --all -- --check passes locally
  • cargo check --workspace passes locally with openfang-desktop included
  • cargo clippy --workspace --all-targets -- -D warnings passes locally with openfang-desktop included
  • cargo test --workspace passes locally with openfang-desktop included
  • CI check/test/clippy/format matrix passes
  • cargo audit currently fails on an existing workspace dependency advisory: lettre 0.11.21 / RUSTSEC-2026-0141; fix is to upgrade to lettre >= 0.11.22
  • Live integration tested (if applicable)

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries

@Streamweaver Streamweaver marked this pull request as ready for review May 15, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant