sdk/js: publish an agentmesh MCP stdio server to the MCP registry #837
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 374 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.355
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #837"
general
weight: 0.35
aojea
Fixes #544
This implements the tasks in #544 as written. The issue predates the SAM → agentmesh rename, so the code uses today's names: the
agentmeshbin,AGENTMESH_variables and@agentmesh-p2p/sdk.Tasks
1.
agentmeshexecutable (sdk/js/src/cli.ts,mcp-server.ts): McpServer + StdioServerTransport over MeshSession.- It exposes
get_mesh_info,discover_remote_services,find_remote_tools,describe_remote_toolandcall_remote_tool, with the node's parameter contracts and failure behaviour. Mesh-wide fan-out has a per-provider deadline, and a failing provider becomes an error row.- No
list_local_services. Inference is left out: inference services are discoverable but not callable, because there is no/v1endpoint here.- Configuration comes from
AGENTMESH_CONTROL_PLANE_URL,AGENTMESH_BOOTSTRAP_TOKEN_PATHorAGENTMESH_JWT_PATH,AGENTMESH_STATE_DIRandAGENTMESH_INSECURE_CONTROL_PLANE. The first run enrolls; later runs resume as the same peer. No secret is passed on the command line.- Logs go to stderr only.
2.
mcpName:io.github.google/agentmesh.3.
sdk/js/server.json: one npm package with stdio transport. The token paths are markedisSecret, and the version is stamped byhack/sdk-version.sh.4. Auth: GitHub OIDC from
release.yml. The registry grantsio.github.google/to workflows ingoogle/agentmesh, so no DNS record or secret is needed.5.
release.yml: afternpm publish, it runsmcp-publisher login github-oidcandmcp-publisher publish, and skips a version that is already listed. The publisher is downloaded at a pinned version, and its SHA-256 is checked.6. Tests:
- Unit tests for the tool mapping in
sdk/js/src/mcp-server.test.ts.-
TestNativeSDKMCPStdiodrives the executable with a stdio MCP client againstagentmesh-one. It checks parameter contracts against the node's own registrations, discovery and calls, that policy and label refusals never reach the backend, and identity reuse after a restart.7. Docs: Connecting agents stays node-first. A new section, "Without a node: the MCP registry server", covers the stdio server as a lighter, complementary caller.
Validation
-
make sdk-jspasses (154 tests).-
TestNativeSDKMCPStdiopasses with-race.-
mcp-publisher validateacceptsserver.json.- actionlint is clean.
-
sdk-version.shstampsserver.jsontogether withpackage.json.agentmesh-oneand anagentmesh-nodeprovider. It discovered, described and called tools. A policy-denied call was refused, and a relaunch resumed the same peer ID.🤖 Generated with Claude Code