Skip to content

fix: agent-friendly publish, install, and search commands (SMI-1549, #680)#704

Merged
arjunkmrm merged 1 commit intomainfrom
arjun/smi-1549-publish-command-is-not-agent-friendly
Mar 18, 2026
Merged

fix: agent-friendly publish, install, and search commands (SMI-1549, #680)#704
arjunkmrm merged 1 commit intomainfrom
arjun/smi-1549-publish-command-is-not-agent-friendly

Conversation

@arjunkmrm
Copy link
Collaborator

Summary

  • Publish (SMI-1549): In non-TTY/JSON mode, the CLI returns immediately with structured JSON after triggering a deploy. A detached background process polls status and writes logs to a temp file the agent can cat later. Background watcher has safety limits: 10-minute timeout and max 3 consecutive API errors before exiting.
  • Install/Uninstall ([Bug]: mcp add/remove commands hang indefinitely when stdin is not a TTY and target client is running #680): Skip interactive restart prompt in non-TTY to prevent indefinite hangs. In JSON mode, suppress spinners and output structured JSON.
  • Search: Add --namespace flag to smithery mcp search for filtering by namespace (e.g. smithery mcp search --namespace arjunkmrm).
  • Shared spinner utility: createSpinner() returns a no-op in JSON mode — no timers, no intervals, no stderr noise. Introduces a Spinner interface to replace the ReturnType<typeof yoctoSpinner> type leak.

Test plan

  • pnpm test — 366 tests pass
  • npx biome check — clean
  • Manual: echo "" | smithery mcp add arjunkmrm/simple-echo --client claude-code → returns JSON, no hang
  • Manual: echo "" | smithery publish <url> --name gerbil-fmYE/test-agent-publish → returns JSON immediately, background watcher writes to log file, release succeeds
  • Manual: smithery mcp search --namespace arjunkmrm → returns 7 servers
  • Manual: cat <logFile> shows full deployment logs including success

Closes #680
Relates to SMI-1549

🤖 Generated with Claude Code

…680)

- Publish (SMI-1549): In non-TTY/JSON mode, spawn a background watcher
  that polls deployment status and writes logs to a temp file. The CLI
  returns immediately with structured JSON (deploymentId, logFile, statusUrl)
  so agents can check progress later via `cat <logFile>`.

- Install/Uninstall (#680): Skip interactive restart prompt in non-TTY to
  prevent indefinite hangs. In JSON mode, suppress spinners and output
  structured JSON result instead of colored text.

- Search: Add --namespace flag to `smithery mcp search` to filter registry
  results by namespace (e.g. `smithery mcp search --namespace arjunkmrm`).

- Shared spinner utility: Add createSpinner() that returns a no-op in
  JSON mode, avoiding timers/intervals and noisy stderr writes. Introduce
  Spinner interface to replace the yocto-spinner type leak.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@arjunkmrm arjunkmrm merged commit 4872b6c into main Mar 18, 2026
4 checks passed
@arjunkmrm arjunkmrm deleted the arjun/smi-1549-publish-command-is-not-agent-friendly branch March 18, 2026 05:18
@smithery-chore-bot smithery-chore-bot bot mentioned this pull request Mar 18, 2026
arjunkmrm pushed a commit that referenced this pull request Mar 18, 2026
Automated Release PR
---


## [4.7.3](v4.7.2...v4.7.3)
(2026-03-18)


### Bug Fixes

* agent-friendly publish, install, and search commands (SMI-1549,
[#680](#680))
([#704](#704))
([4872b6c](4872b6c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: smithery-chore-bot[bot] <259537197+smithery-chore-bot[bot]@users.noreply.github.com>
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.

[Bug]: mcp add/remove commands hang indefinitely when stdin is not a TTY and target client is running

1 participant