mcp

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyClient

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

ProxyClient manages connection to a remote MCP server and forwards requests

func NewProxyClient

func NewProxyClient(ctx context.Context, url string) (*ProxyClient, error)

NewProxyClient creates a new proxy client for the given remote server configuration

func (*ProxyClient) Close

func (p *ProxyClient) Close() error

Close closes the connection to the remote MCP server

func (*ProxyClient) RegisterPrompts

func (p *ProxyClient) RegisterPrompts(ctx context.Context, server *mcp.Server) error

RegisterPrompts discovers prompts from remote server and registers them as proxy prompts

func (*ProxyClient) RegisterResourceTemplates

func (p *ProxyClient) RegisterResourceTemplates(ctx context.Context, server *mcp.Server) error

RegisterResourceTemplates discovers resource templates from remote server and registers them as proxy resource templates

func (*ProxyClient) RegisterResources

func (p *ProxyClient) RegisterResources(ctx context.Context, server *mcp.Server) error

RegisterResources discovers resources from remote server and registers them as proxy resources

func (*ProxyClient) RegisterTools

func (p *ProxyClient) RegisterTools(ctx context.Context, server *mcp.Server) error

RegisterTools discovers tools from remote server and registers them as proxy tools

type ResourceInfo

type ResourceInfo struct {
	CPU    string `json:"cpu,omitempty"`
	Memory string `json:"memory,omitempty"`
}

ResourceInfo represents resource allocation information

type Server

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

Server wraps the MCP server with Tiger-specific functionality

func NewServer

func NewServer(ctx context.Context) (*Server, error)

NewServer creates a new Tiger MCP server instance

func (*Server) Close

func (s *Server) Close() error

Close gracefully shuts down the MCP server and all proxy connections

func (*Server) HTTPHandler

func (s *Server) HTTPHandler() http.Handler

Returns an HTTP handler that implements the http transport

func (*Server) StartStdio

func (s *Server) StartStdio(ctx context.Context) error

Run starts the MCP server with the stdio transport

type ServiceCreateInput

type ServiceCreateInput struct {
	Name      string   `json:"name,omitempty"`
	Addons    []string `json:"addons,omitempty"`
	Region    string   `json:"region,omitempty"`
	CPUMemory string   `json:"cpu_memory,omitempty"`
	Replicas  int      `json:"replicas,omitempty"`
	Free      bool     `json:"free,omitempty"`
	Wait      bool     `json:"wait,omitempty"`
	Timeout   int      `json:"timeout,omitempty"`
}

ServiceCreateInput represents input for tiger_service_create

func (ServiceCreateInput) Schema

type ServiceCreateOutput

type ServiceCreateOutput struct {
	Service         ServiceDetail               `json:"service"`
	Message         string                      `json:"message"`
	PasswordStorage *util.PasswordStorageResult `json:"password_storage,omitempty"`
}

ServiceCreateOutput represents output for tiger_service_create

type ServiceDetail

type ServiceDetail struct {
	ServiceID      string        `json:"id"`
	Name           string        `json:"name"`
	Status         string        `json:"status"`
	Type           string        `json:"type"`
	Region         string        `json:"region"`
	Created        string        `json:"created,omitempty"`
	Resources      *ResourceInfo `json:"resources,omitempty"`
	Replicas       int           `json:"replicas,omitempty"`
	DirectEndpoint string        `json:"direct_endpoint,omitempty"`
	PoolerEndpoint string        `json:"pooler_endpoint,omitempty"`
	Paused         bool          `json:"paused"`
}

ServiceDetail represents detailed service information

type ServiceInfo

type ServiceInfo struct {
	ServiceID string        `json:"id"`
	Name      string        `json:"name"`
	Status    string        `json:"status"`
	Type      string        `json:"type"`
	Region    string        `json:"region"`
	Created   string        `json:"created,omitempty"`
	Resources *ResourceInfo `json:"resources,omitempty"`
}

ServiceInfo represents simplified service information for MCP output

type ServiceListInput

type ServiceListInput struct{}

ServiceListInput represents input for tiger_service_list

func (ServiceListInput) Schema

type ServiceListOutput

type ServiceListOutput struct {
	Services []ServiceInfo `json:"services"`
}

ServiceListOutput represents output for tiger_service_list

type ServiceShowInput

type ServiceShowInput struct {
	ServiceID string `json:"service_id"`
}

ServiceShowInput represents input for tiger_service_show

func (ServiceShowInput) Schema

type ServiceShowOutput

type ServiceShowOutput struct {
	Service ServiceDetail `json:"service"`
}

ServiceShowOutput represents output for tiger_service_show

type ServiceUpdatePasswordInput

type ServiceUpdatePasswordInput struct {
	ServiceID string `json:"service_id"`
	Password  string `json:"password"`
}

ServiceUpdatePasswordInput represents input for tiger_service_update_password

func (ServiceUpdatePasswordInput) Schema

type ServiceUpdatePasswordOutput

type ServiceUpdatePasswordOutput struct {
	Message         string                      `json:"message"`
	PasswordStorage *util.PasswordStorageResult `json:"password_storage,omitempty"`
}

ServiceUpdatePasswordOutput represents output for tiger_service_update_password

Jump to

Keyboard shortcuts

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