Skip to content

feat: add MCP discovery router#494

Merged
thymikee merged 1 commit into
mainfrom
publish-agentdevice-mcp-router
May 11, 2026
Merged

feat: add MCP discovery router#494
thymikee merged 1 commit into
mainfrom
publish-agentdevice-mcp-router

Conversation

@thymikee
Copy link
Copy Markdown
Member

@thymikee thymikee commented May 11, 2026

Summary

Add an official agent-device mcp stdio router for discovery-oriented MCP clients. It exposes only status, install, and version-matched help tools, plus workflow prompts/resources, while keeping device automation on the CLI.

Add MCP registry metadata (mcpName, server.json, smithery.yaml) and concise README/website install guidance for registry discovery. Metadata versions are kept in sync by scripts/sync-mcp-metadata.mjs, checked during pnpm check:tooling and prepack, and documented in AGENTS.md for version/metadata edits.

Touched 14 files. Scope stayed within MCP discovery/routing, CLI help, registry metadata, docs, focused tests, metadata sync tooling, and agent instructions.

Validation

  • PATH="$HOME/.nvm/versions/node/v24.13.0/bin:$HOME/Library/pnpm:$PATH" pnpm format
  • PATH="$HOME/.nvm/versions/node/v24.13.0/bin:$HOME/Library/pnpm:$PATH" pnpm exec vitest run src/mcp/__tests__/router.test.ts src/utils/__tests__/args.test.ts
  • PATH="$HOME/.nvm/versions/node/v24.13.0/bin:$HOME/Library/pnpm:$PATH" pnpm check:mcp-metadata
  • PATH="$HOME/.nvm/versions/node/v24.13.0/bin:$HOME/Library/pnpm:$PATH" pnpm check:tooling
  • PATH="$HOME/.nvm/versions/node/v24.13.0/bin:$HOME/Library/pnpm:$PATH" pnpm check:fallow
  • printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | PATH="$HOME/.nvm/versions/node/v24.13.0/bin:$HOME/Library/pnpm:$PATH" node bin/agent-device.mjs mcp
  • printf '%s\n' '[{"jsonrpc":"2.0","id":1,"method":"ping"},{"jsonrpc":"2.0","id":2,"method":"tools/list"}]' | PATH="$HOME/.nvm/versions/node/v24.13.0/bin:$HOME/Library/pnpm:$PATH" node bin/agent-device.mjs mcp
  • git diff --check

Known gap: external listings on Smithery, Cline, mcp.so, mcpservers.org, and awesome-mcp-servers still require follow-up submissions after merge/publish.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-494/

Built to branch gh-pages at 2026-05-11 15:25 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 520ea7d81a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/mcp/server.ts
Comment on lines +64 to +66
if (Array.isArray(parsed)) {
for (const message of parsed) this.sink(message as JsonRpcMessage);
return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Return batch responses as one JSON-RPC message

When an MCP client sends a JSON-RPC batch over stdio, this branch sinks each item independently, which makes writeMessage emit one top-level response per request. JSON-RPC batch callers expect a single array response for the batch, so clients that batch MCP requests can hang or reject the replies even though each individual handler succeeded; collect the per-entry responses and write one array for the batch.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in b82e5546: batch payloads are now collected into a single JSON-RPC array response, with notifications filtered out of the response array. Added a focused unit test and a runtime stdio batch smoke command to the PR validation.

@thymikee thymikee force-pushed the publish-agentdevice-mcp-router branch 3 times, most recently from c2135b2 to 63e789b Compare May 11, 2026 15:19
@thymikee thymikee force-pushed the publish-agentdevice-mcp-router branch from 63e789b to 5bf8e35 Compare May 11, 2026 15:24
@thymikee thymikee merged commit 25d7289 into main May 11, 2026
17 checks passed
@thymikee thymikee deleted the publish-agentdevice-mcp-router branch May 11, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant