mcp-cli

command module
v0.0.0-...-11fe9f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

mcp-cli

A Go CLI tool for querying Model Context Protocol (MCP) servers with a natural-language question and printing plain-text answers to stdout.

Installation

go install github.com/groovy-sky/mcp-cli@latest

Or build from source:

git clone https://github.com/groovy-sky/mcp-cli.git
cd mcp-cli
go build -o mcp-cli .

Usage

mcp-cli --server URL --question TEXT [--timeout DURATION]
Flag Description Default
--server Absolute HTTP/HTTPS URL of the MCP server (required)
--question Natural-language question to send (required)
--timeout Request timeout, e.g. 30s, 2m (must be > 0) 45s
Example – Microsoft Learn MCP
mcp-cli \
  --server https://learn.microsoft.com/api/mcp \
  --question "explain what is Azure Container App"
Pipe output to another command
mcp-cli \
  --server https://learn.microsoft.com/api/mcp \
  --question "what is Azure Kubernetes Service?" | less
mcp-cli \
  --server https://learn.microsoft.com/api/mcp \
  --question "list Azure storage account types" > answer.txt

How it works

  1. Connects to the MCP server using the Streamable HTTP transport.
  2. Lists available tools and selects one that accepts a single query/question/search/prompt/text argument, preferring tools with semantically relevant names/descriptions.
  3. Calls the selected tool with the supplied question.
  4. Prints extracted text content to stdout (errors and diagnostics go to stderr).

License

MIT – see LICENSE.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL