feat(mcp): add Event Bus MCP server #81
Conversation
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Add bounded MQTT admission controls, pod-local watch status aggregation, load validation tooling, and concise upstream docs for the DSX Exchange MCP server. Validation: go test -mod=vendor ./...; go vet -mod=vendor ./...; go build server/load binaries; helm lint/template; bash -n load wrapper; git diff --check. Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Important Review skippedToo many files! This PR contains 332 files, which is 32 over the limit of 300. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (332)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-06-25 21:13:29 UTC | Commit: dcc377f |
🛡️ CodeQL Analysis✅ No security issues found! 💡 Note: Enable GitHub Advanced Security to see full details in the Security tab. 🕐 Last updated: 2026-06-25 21:14:30 UTC | Commit: dcc377f |
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
Signed-off-by: Daniyal Rana <daniyalr@nvidia.com>
| status: ## Check deployment status | ||
| @echo "CSC Cluster:" | ||
| @kubectl get pods -n event-bus --context kind-csc 2>/dev/null || echo " NATS: Not deployed" | ||
| @kubectl get pods -n mcp-backends --context kind-csc 2>/dev/null || echo " MCP: Not deployed" |
There was a problem hiding this comment.
treat this as a component of event bus, not in an mcp backend bucket
| report_module "$auth_dir" "-mod=vendor" | ||
| report_module "$repo_dir/local/mqtt-client" "" | ||
| report_module "$repo_dir/local/mqttbs" "" | ||
| make -C "$repo_dir/mcp/dsx-exchange-mcp" sync-specs >/dev/null |
There was a problem hiding this comment.
symlink the specs, don't copy them around
|
|
||
| ```bash | ||
| cd ../mcp/dsx-exchange-mcp | ||
| make port-forward-kind |
There was a problem hiding this comment.
metallb load balancer service instead of port forwarding
| go 1.25 | ||
|
|
||
| require ( | ||
| github.com/eclipse/paho.mqtt.golang v1.5.1 |
There was a problem hiding this comment.
use the same config and instrumentation libraries as auth callout
| @@ -0,0 +1,707 @@ | |||
| # dsx-exchange-mcp Architecture | |||
There was a problem hiding this comment.
bake the relevant parts into the readme, and update the fern docs sections
|
|
||
| func newAdmissionLimiter(limit int) *admissionLimiter { | ||
| if limit <= 0 { | ||
| // no limit, allow all tool-calls through |
There was a problem hiding this comment.
this looks like a semaphore. import one of those instead. or directly use a rate limiter package if that's what this is for.
| MIMEType: "application/json", | ||
| }, | ||
| func(_ context.Context, req *mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error) { | ||
| body, _ := json.Marshal(map[string]any{"domains": available}) |
There was a problem hiding this comment.
don't ignore errors
| MIMEType: "application/yaml", | ||
| }, | ||
| func(_ context.Context, req *mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error) { | ||
| body, err := specs.Read(domain) |
There was a problem hiding this comment.
this appears to be pre-computable
| }, | ||
| Name: toolSubscribe, | ||
| Annotations: readOnlyOpenWorldAnnotations("Bounded MQTT subscribe"), | ||
| Description: "Background-friendly bounded MQTT subscribe. Any MCP client planning to call " + |
There was a problem hiding this comment.
use a multiline string
| Count: len(matches), | ||
| Matches: matches, | ||
| } | ||
| raw, _ := json.Marshal(out) |
Summary
Adds new feature:
mcp/dsx-exchange-mcp.This read-only server exposes the NATS event bus and AsyncAPI schema to MCP clients:
mcp/dsx-exchange-mcp/skills/to help agent clients use schema discovery, retained reads, and bounded live subscriptions consistently.`
What Changed
mcp/dsx-exchange-mcpGo module.Vendor Note
This PR intentionally includes
mcp/dsx-exchange-mcp/vendor/.Not Included
Local load-test tooling and generated load-test artifacts are intentionally not part of this PR. Those were
used only for local validation and were kept out to avoid PR bloat.
Validation
Ran successfully:
git diff --checkmake checkmake -C mcp/dsx-exchange-mcp verify-specsmake -C mcp/dsx-exchange-mcp testmake -C mcp/dsx-exchange-mcp lintmake -C mcp/dsx-exchange-mcp buildmake -C mcp/dsx-exchange-mcp imagemake -C local skaffold-runfrom a clean Kind statemake -C local skaffold-runagain against the same stateSkaffold validation confirmed: