feat(glama): standalone nyxid-mcp-demo crate (refs #593)#615
Merged
Conversation
Glama's scoring runners time out on `cargo build -p nyxid` because the full backend has 400+ deps (mongodb, axum, JWT crates with C build dependencies). Cold compile is 10-15 min on constrained CI. Adds a tiny `mcp-demo` workspace crate with serde_json + std as the only dependency. Cold build: ~4s. Stripped binary: ~530K. Mirrors the same four curated gateway tools the backend's mcp_demo module exposes (nyx_proxy_request, nyx_list_services, nyx_request_approval, nyx_exchange_identity), so the public surface stays consistent. Also updates Dockerfile.glama as the reference for the Glama admin UI (Glama does not auto-read this file from the repo; paste the build step + CMD into their admin Dockerfile page). Refs #593.
…ne crate The `nyxid mcp-demo` subcommand introduced in PR #609 only existed for Glama's directory listing, which now uses the dedicated `nyxid-mcp-demo` binary from the new `mcp-demo` workspace crate. Removing the duplicate keeps a single source of truth for the curated tool definitions and shrinks the backend binary's argv surface.
…e member backend/Dockerfile and cli/Dockerfile.node copy the workspace manifests selectively, so adding mcp-demo to the workspace's members list without copying its Cargo.toml and source breaks `cargo build` on workspace resolution. The publish-images workflow runs on every push to main, so this would land as a regression. Both Dockerfiles now copy mcp-demo alongside backend/ and cli/. The backend image still excludes the mcp-demo binary -- only nyxid-cli and nyxid (backend) get installed at runtime. Verified with `docker build -f backend/Dockerfile .` and `docker build -f cli/Dockerfile.node .` locally; both produce working images.
This was referenced May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mcp-demo/workspace crate producingnyxid-mcp-demo— a tiny standalone stdio MCP server for directory-listing introspection (Glama).serde_json. Cold cargo build: ~4 seconds (vs. 10-15+ min for the full backend, which was timing out on Glama's runners).nyxid mcp-demo:nyx_proxy_request,nyx_list_services,nyx_request_approval,nyx_exchange_identity. No duplication of intent — the same surface, shipped two ways.Dockerfile.glamaas the reference for what to paste into Glama's admin Dockerfile UI (Glama does not auto-read it from the repo).Why a separate crate
Glama runners are timing out trying to build
nyxidfrom scratch — the backend pulls 400+ transitive crates (mongodb, axum, jsonwebtoken withaws_lc_rsrequiring cmake/clang, etc.). The directory's scoring pipeline only needstools/listover stdio, so we don't need any of that machinery to be on the same compile path.The standalone crate has just
serde_jsonas a direct dep (~5 transitive crates total). Builds in seconds, runs from a 530K binary, doesn't share state or build deps with the production backend.The backend's
nyxid mcp-demosubcommand is left in place — useful for production self-discovery on real installs and harmless to keep.Verification
$ cargo build --release -p nyxid-mcp-demo Compiling serde_core v1.0.228 Compiling serde_json v1.0.149 Compiling memchr v2.8.0 Compiling itoa v1.0.18 Compiling nyxid-mcp-demo v0.1.0 Finished `release` profile [optimized] target(s) in 3.83s $ printf '{"jsonrpc":"2.0","id":1,"method":"tools/list"}\n' \ | ./target/release/nyxid-mcp-demo \ | jq '.result.tools | length' 4Full workspace still builds clean (
cargo build --release -p nyxid -p nyxid-cli -p nyxid-mcp-demofinished in 2m 54s on M2). Pre-commit hooks (cargo fmt + clippy) passed locally.Post-merge steps
mainpost-merge).tools/listintrospection lands a real score.@punkpeye's format.Test plan
cargo build,cargo test,cargo clippy,cargo fmt --check(pre-commit hooks already passed locally)nyxid-mcp-demoresponds toinitialize,tools/list,ping, and unknown methods (-32601)docker build -f Dockerfile.glama .reproduces the Glama config and the resulting image speaks stdio MCP