feat: CLI tool for human/AI MCP tool access over Streamable HTTP (stdio bridge) #18

Closed
opened 2026-04-04 12:38:22 +00:00 by sgcommand · 0 comments
Member

Overview

Add a CLI tool (cmd/amcs-cli or similar) that lets humans and AI agents quickly invoke any AMCS MCP tool from the command line. The CLI must bridge MCP over stdio so AI clients that speak the stdio MCP transport can connect to the remote AMCS server. Optional output is set to JSON or YML for human readable output.

Key Requirement

The CLI must connect to the MCP server via URL + bearer token — not a local socket or in-process connection.

Requirements

Human-facing UX

  • Interactive mode: browse and call tools with prompts/autocomplete
  • Non-interactive mode: amcs-cli call <tool_name> [args...] for scripting
  • Pretty-printed JSON output
  • --server <url> and --token <token> flags (also readable from env: AMCS_URL, AMCS_TOKEN)

AI stdio bridge

  • When invoked as amcs-cli stdio (or similar), act as a stdio MCP server that proxies all tool calls to the remote AMCS HTTP endpoint
  • This allows AI clients that only speak stdio MCP to use the remote AMCS server transparently
  • Connection: --server <url> --token <token> (or env vars)

Config

  • Support a config file (e.g. ~/.config/amcs/config.yaml) for default server URL and token
  • Flag overrides config, env overrides config, flags override env

Acceptance Criteria

  • amcs-cli call capture_thought --content "hello" works end-to-end
  • amcs-cli stdio --server https://... --token ... acts as a valid stdio MCP server
  • amcs-cli tools lists all available tools from the remote server
  • Token is never logged or printed in error output
  • README section added documenting CLI setup and usage
## Overview Add a CLI tool (`cmd/amcs-cli` or similar) that lets humans **and** AI agents quickly invoke any AMCS MCP tool from the command line. The CLI must bridge MCP over stdio so AI clients that speak the stdio MCP transport can connect to the remote AMCS server. Optional output is set to JSON or YML for human readable output. ## Key Requirement **The CLI must connect to the MCP server via URL + bearer token — not a local socket or in-process connection.** ## Requirements ### Human-facing UX - Interactive mode: browse and call tools with prompts/autocomplete - Non-interactive mode: `amcs-cli call <tool_name> [args...]` for scripting - Pretty-printed JSON output - `--server <url>` and `--token <token>` flags (also readable from env: `AMCS_URL`, `AMCS_TOKEN`) ### AI stdio bridge - When invoked as `amcs-cli stdio` (or similar), act as a **stdio MCP server** that proxies all tool calls to the remote AMCS HTTP endpoint - This allows AI clients that only speak stdio MCP to use the remote AMCS server transparently - Connection: `--server <url> --token <token>` (or env vars) ### Config - Support a config file (e.g. `~/.config/amcs/config.yaml`) for default server URL and token - Flag overrides config, env overrides config, flags override env ## Acceptance Criteria - [ ] `amcs-cli call capture_thought --content "hello"` works end-to-end - [ ] `amcs-cli stdio --server https://... --token ...` acts as a valid stdio MCP server - [ ] `amcs-cli tools` lists all available tools from the remote server - [ ] Token is never logged or printed in error output - [ ] README section added documenting CLI setup and usage
Sign in to join this conversation.