MCP Gateway 0.6 blog post, inc mermaid plugin#89
Conversation
Signed-off-by: David Martin <davmarti@redhat.com>
✅ Deploy Preview for relaxed-faloodeh-7fa6f1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe changes add Mermaid diagram rendering support to the website and introduce a new blog post announcing the MCP Gateway 0.6 tech preview release, which includes details on Kubernetes operator installation, configuration updates, Redis-backed scaling, and protocol elicitation features. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/blog/mcp-gateway-tech-preview/mcp-gateway-tech-preview.md (1)
7-9: Duplicate link to the same release page.Line 7 links to the v0.6.0 release page twice in the same sentence ("0.6 tech preview release" and "0.6.0 release page"). Consider rewording so the second link points somewhere distinct (e.g. the changelog or milestone) or dropping the redundant link to tighten the intro.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/blog/mcp-gateway-tech-preview/mcp-gateway-tech-preview.md` around lines 7 - 9, The intro duplicates the same release URL for "0.6 tech preview release" and "0.6.0 release page"; update the sentence so the second reference is not the same link—either remove the second link and leave it as plain text, or point the second link to a different resource (e.g., the changelog or milestone) instead. Locate the sentence containing the phrases "0.6 tech preview release" and "0.6.0 release page" and replace the second occurrence of the https://github.com/Kuadrant/mcp-gateway/releases/tag/v0.6.0 link with a unique target or plain text to eliminate the duplicate link.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/_includes/layout.njk`:
- Around line 148-159: The loader unconditionally imports and runs mermaid
causing the CDN fetch on every page and lacks SRI/crossorigin; change the logic
in the script so you first check document.querySelector('code.language-mermaid')
and only then perform a dynamic import (e.g.,
import('https://cdn.jsdelivr.net/npm/mermaid@11.X.Y/...') inside that if) before
calling mermaid.initialize(...) and mermaid.run(), and pin the import URL to an
exact mermaid version and add Subresource Integrity and crossorigin="anonymous"
(or load via a script tag with integrity/crossorigin) to harden the external
fetch referenced by mermaid and the code paths that use
document.querySelectorAll('code.language-mermaid'), mermaid.initialize, and
mermaid.run.
In `@src/blog/mcp-gateway-tech-preview/mcp-gateway-tech-preview.md`:
- Line 48: Fix two copy nits in the markdown: add a comma after "For the full
list of changes" in the sentence that begins with that phrase, and remove the
trailing space at the end of the sentence that ends with "from the client." (use
these exact sentence fragments to locate the lines in
src/blog/mcp-gateway-tech-preview/mcp-gateway-tech-preview.md).
---
Nitpick comments:
In `@src/blog/mcp-gateway-tech-preview/mcp-gateway-tech-preview.md`:
- Around line 7-9: The intro duplicates the same release URL for "0.6 tech
preview release" and "0.6.0 release page"; update the sentence so the second
reference is not the same link—either remove the second link and leave it as
plain text, or point the second link to a different resource (e.g., the
changelog or milestone) instead. Locate the sentence containing the phrases "0.6
tech preview release" and "0.6.0 release page" and replace the second occurrence
of the https://github.com/Kuadrant/mcp-gateway/releases/tag/v0.6.0 link with a
unique target or plain text to eliminate the duplicate link.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bf4c8547-9c2f-4c98-ad27-59a740e37048
📒 Files selected for processing (2)
src/_includes/layout.njksrc/blog/mcp-gateway-tech-preview/mcp-gateway-tech-preview.md
| <script type="module"> | ||
| import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs'; | ||
| mermaid.initialize({ startOnLoad: false }); | ||
| document.querySelectorAll('code.language-mermaid').forEach(el => { | ||
| const pre = el.parentElement; | ||
| const div = document.createElement('div'); | ||
| div.classList.add('mermaid'); | ||
| div.textContent = el.textContent; | ||
| pre.replaceWith(div); | ||
| }); | ||
| await mermaid.run(); | ||
| </script> |
There was a problem hiding this comment.
Mermaid loader runs on every page; consider scoping and adding SRI.
A couple of observations on the new loader:
- The script is included in the base layout, so every page on the site will fetch ~1MB of Mermaid ESM from
cdn.jsdelivr.neteven when no diagrams are present. Consider gating execution on the presence of acode.language-mermaidelement before importing, e.g. dynamicimport()inside anif (document.querySelector('code.language-mermaid'))check, to avoid the network/parse cost on unrelated pages. - The CDN script is loaded without a Subresource Integrity (
integrity) hash or version pin beyond the major (mermaid@11). A compromised or unexpectedly updated upstream would execute on every page. Pinning to an exact version and addingintegrity/crossorigin="anonymous"would harden this.
♻️ Suggested guard to skip the import when no diagrams are on the page
<script type="module">
- import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
- mermaid.initialize({ startOnLoad: false });
- document.querySelectorAll('code.language-mermaid').forEach(el => {
+ const blocks = document.querySelectorAll('code.language-mermaid');
+ if (blocks.length === 0) return;
+ const { default: mermaid } = await import('https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs');
+ mermaid.initialize({ startOnLoad: false });
+ blocks.forEach(el => {
const pre = el.parentElement;
const div = document.createElement('div');
div.classList.add('mermaid');
div.textContent = el.textContent;
pre.replaceWith(div);
});
await mermaid.run();
</script>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <script type="module"> | |
| import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs'; | |
| mermaid.initialize({ startOnLoad: false }); | |
| document.querySelectorAll('code.language-mermaid').forEach(el => { | |
| const pre = el.parentElement; | |
| const div = document.createElement('div'); | |
| div.classList.add('mermaid'); | |
| div.textContent = el.textContent; | |
| pre.replaceWith(div); | |
| }); | |
| await mermaid.run(); | |
| </script> | |
| <script type="module"> | |
| const blocks = document.querySelectorAll('code.language-mermaid'); | |
| if (blocks.length === 0) return; | |
| const { default: mermaid } = await import('https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs'); | |
| mermaid.initialize({ startOnLoad: false }); | |
| blocks.forEach(el => { | |
| const pre = el.parentElement; | |
| const div = document.createElement('div'); | |
| div.classList.add('mermaid'); | |
| div.textContent = el.textContent; | |
| pre.replaceWith(div); | |
| }); | |
| await mermaid.run(); | |
| </script> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/_includes/layout.njk` around lines 148 - 159, The loader unconditionally
imports and runs mermaid causing the CDN fetch on every page and lacks
SRI/crossorigin; change the logic in the script so you first check
document.querySelector('code.language-mermaid') and only then perform a dynamic
import (e.g., import('https://cdn.jsdelivr.net/npm/mermaid@11.X.Y/...') inside
that if) before calling mermaid.initialize(...) and mermaid.run(), and pin the
import URL to an exact mermaid version and add Subresource Integrity and
crossorigin="anonymous" (or load via a script tag with integrity/crossorigin) to
harden the external fetch referenced by mermaid and the code paths that use
document.querySelectorAll('code.language-mermaid'), mermaid.initialize, and
mermaid.run.
|
|
||
| ### MCP Specification Elicitation Support | ||
|
|
||
| This release adds support for the MCP protocol's [elicitation](https://modelcontextprotocol.io/specification/2025-11-25/client/elicitation) capability. Elicitation allows an MCP server to request additional information from the client during a tool call, enabling multi-turn exchanges between the agent and server. Below is a sequence diagram showing how elicitation events are mapped at the gateway between the client and server. Note the different request IDs on either side of the gateway, as the gateway abstracts this from the client. |
There was a problem hiding this comment.
Minor copy nits.
- LanguageTool flags a missing comma on line 7: "For the full list of changes**,** you can check out…".
- Line 48 ends with a trailing space after "from the client."; harmless but worth trimming.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/blog/mcp-gateway-tech-preview/mcp-gateway-tech-preview.md` at line 48,
Fix two copy nits in the markdown: add a comma after "For the full list of
changes" in the sentence that begins with that phrase, and remove the trailing
space at the end of the sentence that ends with "from the client." (use these
exact sentence fragments to locate the lines in
src/blog/mcp-gateway-tech-preview/mcp-gateway-tech-preview.md).
Depends on Kuadrant/docs.kuadrant.io#234
Summary by CodeRabbit
Release Notes
New Features
Documentation