Conversation
🧪 BenchmarkShould we run the MCP Gateway benchmark for this PR? React with 👍 to run the benchmark.
Benchmark will run on the next push after you react. |
Release OptionsShould a new version be published when this PR is merged? React with an emoji to vote on the release type:
Current version: Deployment
|
There was a problem hiding this comment.
2 issues found across 14 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="apps/docs/client/src/content/pt-br/mcp-mesh/mcp-servers.mdx">
<violation number="1" location="apps/docs/client/src/content/pt-br/mcp-mesh/mcp-servers.mdx:64">
P2: The example uses `connectionId` but this variable is never defined. Consider adding a placeholder definition or a comment explaining where it comes from.</violation>
</file>
<file name="apps/docs/client/src/content/en/mcp-mesh/mcp-servers.mdx">
<violation number="1" location="apps/docs/client/src/content/en/mcp-mesh/mcp-servers.mdx:60">
P2: The code example references `connectionId` which is never defined or explained. Consider adding a comment explaining where this value comes from, or defining it (perhaps from `state`).</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| const state = process.env.MESH_STATE ? JSON.parse(process.env.MESH_STATE) : {}; | ||
|
|
||
| // Usar token para chamadas à API mesh | ||
| const response = await fetch(`${meshUrl}/mcp/${connectionId}`, { |
There was a problem hiding this comment.
P2: The example uses connectionId but this variable is never defined. Consider adding a placeholder definition or a comment explaining where it comes from.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/docs/client/src/content/pt-br/mcp-mesh/mcp-servers.mdx, line 64:
<comment>The example uses `connectionId` but this variable is never defined. Consider adding a placeholder definition or a comment explaining where it comes from.</comment>
<file context>
@@ -1,24 +1,86 @@
+const state = process.env.MESH_STATE ? JSON.parse(process.env.MESH_STATE) : {};
+
+// Usar token para chamadas à API mesh
+const response = await fetch(`${meshUrl}/mcp/${connectionId}`, {
+ headers: { Authorization: `Bearer ${meshToken}` },
+ // ...
</file context>
✅ Addressed in 4e7fe45
| const state = process.env.MESH_STATE ? JSON.parse(process.env.MESH_STATE) : {}; | ||
|
|
||
| // Use token for mesh API calls | ||
| const response = await fetch(`${meshUrl}/mcp/${connectionId}`, { |
There was a problem hiding this comment.
P2: The code example references connectionId which is never defined or explained. Consider adding a comment explaining where this value comes from, or defining it (perhaps from state).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/docs/client/src/content/en/mcp-mesh/mcp-servers.mdx, line 60:
<comment>The code example references `connectionId` which is never defined or explained. Consider adding a comment explaining where this value comes from, or defining it (perhaps from `state`).</comment>
<file context>
@@ -8,7 +8,69 @@ import Callout from "../../../components/ui/Callout.astro";
+const state = process.env.MESH_STATE ? JSON.parse(process.env.MESH_STATE) : {};
+
+// Use token for mesh API calls
+const response = await fetch(`${meshUrl}/mcp/${connectionId}`, {
+ headers: { Authorization: `Bearer ${meshToken}` },
+ // ...
</file context>
✅ Addressed in 0c31351
525871e to
fe66674
Compare
1d3989b to
af27cb0
Compare
72bd970 to
914afab
Compare
There was a problem hiding this comment.
1 issue found across 7 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="apps/mesh/src/tools/eventbus/subscribe.ts">
<violation number="1" location="apps/mesh/src/tools/eventbus/subscribe.ts:27">
P2: `subscriberId` from input is accepted without any authorization check, so a caller can subscribe on behalf of another connection. Gate the override to trusted gateway calls or verify access to the target connection before using it.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
- Added documentation requirements to ensure updates accompany code changes. - Introduced a new section on STDIO connections in README.md, detailing environment variable usage for local MCPs. - Expanded the MCP servers documentation to clarify connection types and token handling. - Implemented a reset mechanism for STDIO connections to refresh credentials on app restart. - Updated JWT handling to support infinite tokens for STDIO connections. - Improved error handling and logging in connection management. This commit aims to improve developer experience and maintain accurate documentation alongside code changes.
- Add spawn_failed status with 5-minute cooldown to prevent retry loops - Pass MESH_CONNECTION_ID env var to STDIO servers for event bus subscriptions - Suppress noisy 'Method not found' errors for MCPs without prompts - Add pendingProcessRequest to event-bus worker for events published during batch - Add subscriberId option to EVENT_SUBSCRIBE for gateway subscriptions - Improve concurrently to kill processes on SIGTERM (better HMR cleanup) - Only log 'Connection closed unexpectedly' when previously connected
1c6113d to
a144a78
Compare
…riptions - Implemented a check to verify that the provided subscriberId belongs to the same organization as the caller's connection. - Added error handling to prevent subscriptions on behalf of connections outside the user's organization, enhancing security and integrity of event bus interactions.
Summary by cubic
Adds robust STDIO MCP connection support with environment-based credentials and stable process management. Improves hot-reload stability.
New Features
Bug Fixes
Written for commit 97e37b1. Summary will update on new commits.