Skip to content

fix: mcp sse register#5840

Open
akitaSummer wants to merge 1 commit intonextfrom
fix/mcp-controller-sse
Open

fix: mcp sse register#5840
akitaSummer wants to merge 1 commit intonextfrom
fix/mcp-controller-sse

Conversation

@akitaSummer
Copy link

@akitaSummer akitaSummer commented Mar 25, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved Model Context Protocol server initialization by ensuring all registration steps complete sequentially before establishing the server connection.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a potential issue where MCP server registration calls were not being properly awaited. By adding await to these calls, the system now correctly handles the asynchronous nature of these operations, improving the robustness and reliability of the registration process.

Highlights

  • Asynchronous Operations: The mcpToolRegister, mcpResourceRegister, and mcpPromptRegister methods are now correctly awaited, ensuring their asynchronous operations complete before proceeding.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dc1f379e-35e1-4924-b3f2-72cade8bea64

📥 Commits

Reviewing files that changed from the base of the PR and between 53bd879 and 962f615.

📒 Files selected for processing (1)
  • tegg/plugin/controller/src/lib/impl/mcp/MCPControllerRegister.ts

📝 Walkthrough

Walkthrough

The MCPControllerRegister SSE server initialization handler now awaits MCP tool, resource, and prompt registration calls within processing loops, ensuring these async operations complete sequentially before establishing server connections.

Changes

Cohort / File(s) Summary
MCP Registration Async Sequencing
tegg/plugin/controller/src/lib/impl/mcp/MCPControllerRegister.ts
Added await keywords to mcpToolRegister, mcpResourceRegister, and mcpPromptRegister method calls to enforce sequential completion of registration operations during SSE server initialization.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Hops with joy!

Awaiting each registration's care,
Tools and resources, prompts in the air,
Sequential stitches now bind them tight,
MCP's sequence shines ever bright! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references the MCP SSE registration fix that is the primary change, making the relevant code async-awaited during server initialization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mcp-controller-sse

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.63%. Comparing base (53bd879) to head (962f615).

Additional details and impacted files
@@ Coverage Diff @@ ## next #5840 +/- ## ======================================= Coverage 85.63% 85.63% ======================================= Files 665 665 Lines 13004 13004 Branches 1495 1495 ======================================= Hits 11136 11136 Misses 1744 1744 Partials 124 124 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@cloudflare-workers-and-pages
Copy link

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: 962f615
Status: ✅  Deploy successful!
Preview URL: https://fb55a661.egg-cci.pages.dev
Branch Preview URL: https://fix-mcp-controller-sse.egg-cci.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 962f615
Status: ✅  Deploy successful!
Preview URL: https://050e7dd8.egg-v3.pages.dev
Branch Preview URL: https://fix-mcp-controller-sse.egg-v3.pages.dev

View logs

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the MCPControllerRegister to correctly await asynchronous calls to mcpToolRegister, mcpResourceRegister, and mcpPromptRegister. This ensures that these registration operations complete before proceeding, which is crucial for proper asynchronous execution flow. There are no review comments to address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant