Skip to content

Conversation

@jonathannorris
Copy link
Member

@jonathannorris jonathannorris commented Aug 21, 2025

Add Ably Event Publishing for MCP Worker Installs

This PR adds real-time event publishing to the dashboard when users successfully install and authenticate with the hosted MCP Worker.

Changes

  • Event Publishing: Publishes mcp-install events to Ably on successful OAuth completion
  • Channel: Dynamic channel naming using ${orgId}-mcp-install
  • Payload: Raw JWT claims from DevCycle/Auth0 authentication
  • Implementation: Uses Ably.Rest.Promise following existing EventForwardingObject pattern
  • Performance: Fire-and-forget publishing with waitUntil() to avoid blocking OAuth flow

Files Modified

  • mcp-worker/src/telemetry.ts - New centralized telemetry module
  • mcp-worker/src/auth.ts - Simplified OAuth callback with event publishing
  • mcp-worker/package.json - Added Ably dependency
  • mcp-worker/wrangler.toml - Environment variable comments
  • mcp-worker/worker-configuration.d.ts - Added ABLY_API_KEY typing
  • mcp-worker/README.md - Updated documentation

Configuration Required

  • Set ABLY_API_KEY secret in Cloudflare Workers dashboard

Note: Only applies to hosted @devcycle/mcp-worker, not local @mcp/ version.

This comment was marked as outdated.

@jonathannorris jonathannorris requested a review from Copilot August 21, 2025 19:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds real-time event publishing to notify the dashboard when users successfully complete OAuth authentication with the hosted MCP Worker. The implementation uses Ably for publishing events to organization-specific channels.

  • Added Ably event publishing for MCP worker OAuth completion
  • Created centralized telemetry module with error handling
  • Updated configuration and documentation for new dependency

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
mcp-worker/src/ably.ts New module for publishing MCP install events to Ably channels
mcp-worker/src/auth.ts Added event publishing to OAuth callback flow
mcp-worker/package.json Added Ably dependency
mcp-worker/wrangler.toml Added ABLY_API_KEY configuration comment and enabled AI binding
mcp-worker/README.md Documented new event publishing functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jonathannorris jonathannorris enabled auto-merge (squash) August 22, 2025 03:00
@jonathannorris jonathannorris merged commit 6bace0b into main Aug 22, 2025
8 checks passed
@jonathannorris jonathannorris deleted the feat-ably-mcp-install-message branch August 22, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants