cli

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides a simple interface for CLI operations with enhanced debugging

func NewClient

func NewClient(serverName string, globalConfig *config.Config, logLevel string) (*Client, error)

NewClient creates a new CLI client for debugging and simple operations

func (*Client) CallTool

func (c *Client) CallTool(ctx context.Context, toolName string, args map[string]interface{}) (*mcp.CallToolResult, error)

CallTool executes a tool (for future CLI extensions)

func (*Client) ClearOAuthToken

func (c *Client) ClearOAuthToken(_ context.Context) error

ClearOAuthToken clears the OAuth token from persistent storage for this server. This is used by the CLI logout command in standalone mode.

func (*Client) Close

func (c *Client) Close() error

Close cleans up the client and closes storage if it was created

func (*Client) Connect

func (c *Client) Connect(ctx context.Context) error

Connect establishes connection with detailed progress output

func (*Client) Disconnect

func (c *Client) Disconnect() error

Disconnect closes the connection

func (*Client) DisconnectWithContext

func (c *Client) DisconnectWithContext(ctx context.Context) error

DisconnectWithContext closes the connection with context timeout

func (*Client) GetOAuthStatus

func (c *Client) GetOAuthStatus() (string, error)

GetOAuthStatus returns the OAuth authentication status for the server

func (*Client) GetServerInfo

func (c *Client) GetServerInfo() *mcp.InitializeResult

GetServerInfo returns server information

func (*Client) IsConnected

func (c *Client) IsConnected() bool

IsConnected returns connection status

func (*Client) ListTools

func (c *Client) ListTools(ctx context.Context) ([]*config.ToolMetadata, error)

ListTools executes tools/list with detailed output

func (*Client) TriggerManualOAuth

func (c *Client) TriggerManualOAuth(ctx context.Context) error

TriggerManualOAuth manually triggers OAuth authentication flow for the server

func (*Client) TriggerManualOAuthWithForce

func (c *Client) TriggerManualOAuthWithForce(ctx context.Context, force bool) error

TriggerManualOAuthWithForce manually triggers OAuth authentication flow for the server If force is true, OAuth flow will be triggered even if initial errors don't seem OAuth-related

Jump to

Keyboard shortcuts

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