cli

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package cli implements mctop's headless subcommands. Each returns a process exit code; main dispatches to them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(args []string) int

Call invokes one tool and prints its result. Arguments are given as key=value pairs (each value parsed as JSON, falling back to a string) or as a single --json object. A tool that reports an error exits non-zero.

func LS

func LS(args []string) int

LS connects to the target and prints its tools, resources, and prompts.

func Login

func Login(args []string) int

Login runs the OAuth flow for an http(s) MCP server and caches the token so later commands authenticate automatically.

func Logout

func Logout(args []string) int

Logout forgets the cached token for a server.

func TUI

func TUI(args []string) int

TUI connects to a target and opens the interactive browser. It is what a bare "mctop <target>" runs.

func Test

func Test(args []string) int

Test runs a contract spec against its server and exits 0 when every check passes, 1 when any fails, so it can gate CI.

func Upgrade

func Upgrade(version string) int

Upgrade replaces the running binary with the latest release. version is this build's version, used to skip the download when already current.

Types

This section is empty.

Jump to

Keyboard shortcuts

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