mcp

package
v0.0.163 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(ctx context.Context, logger logger.Logger) error

Install installs the agentuity tool for the given command and args. It will install the tool for each MCP client config that is detected and not already installed.

func Register

func Register(ctx MCPContext) error

func Uninstall

func Uninstall(ctx context.Context, logger logger.Logger) error

Uninstall uninstalls the agentuity tool for the given command and args. It will uninstall the tool for each MCP client config that is detected and not already uninstalled.

Types

type CreateAgentArguments

type CreateAgentArguments struct {
	Name        string `json:"name" jsonschema:"required,description=The name of the agent which must be unique within the project"`
	Description string `json:"description" jsonschema:"required,description=A description of the agent and what it does"`
	AuthType    string `` /* 175-byte string literal not displayed */
	Directory   string `json:"directory" jsonschema:"required,description=The directory where the project is located"`
}

type CreateProjectArguments

type CreateProjectArguments struct {
	Name             string `json:"name" jsonschema:"required,description=The name of the project which must be unique within the organization"`
	Description      string `json:"description" jsonschema:"required,description=A description of the project"`
	AgentName        string `json:"agentName" jsonschema:"required,description=The name of the agent to create"`
	AgentDescription string `json:"agentDescription" jsonschema:"required,description=A description of the agent and what it does"`
	AuthType         string `` /* 175-byte string literal not displayed */
	Directory        string `json:"directory" jsonschema:"required,description=The directory to create the project in in the local file system"`
	Provider         string `` /* 164-byte string literal not displayed */
	Template         string `` /* 158-byte string literal not displayed */
	OrganizationId   string `` /* 238-byte string literal not displayed */
}

type DeleteAgentArguments added in v0.0.75

type DeleteAgentArguments struct {
	AgentIds  []string `json:"agentIds" jsonschema:"required,description=The IDs of the agents to delete"`
	Directory string   `json:"directory" jsonschema:"required,description=The directory where the project is located"`
}

type DeployArguments

type DeployArguments struct {
	Directory   string   `json:"directory" jsonschema:"required,description=The directory where the project is located"`
	Tags        []string `json:"tags,omitempty" jsonschema:"description=Tags to associate with this deployment"`
	Description string   `json:"description,omitempty" jsonschema:"description=Description for the deployment tag(s)"`
	Message     string   `json:"message,omitempty" jsonschema:"description=Message for the deployment tag(s)"`
}

type EnvDeleteArguments

type EnvDeleteArguments struct {
	Keys      []string `json:"keys" jsonschema:"required,description=The names of the environment variables or secrets to delete"`
	Directory string   `json:"directory" jsonschema:"required,description=The directory where the project is located"`
}

type EnvListArguments

type EnvListArguments struct {
	Directory string `json:"directory" jsonschema:"required,description=The directory where the project is located"`
}

type EnvSetArguments

type EnvSetArguments struct {
	Key       string `json:"key" jsonschema:"required,description=The name of the environment variable or secret to set"`
	Value     string `json:"value" jsonschema:"required,description=The value to set the environment variable or secret to set"`
	IsSecret  bool   `` /* 155-byte string literal not displayed */
	Directory string `json:"directory" jsonschema:"required,description=The directory where the project is located"`
}

type ListAgentsArguments

type ListAgentsArguments struct {
	Directory string `json:"directory" jsonschema:"required,description=The directory where the project is located"`
}

type ListTemplatesArguments

type ListTemplatesArguments struct {
	Provider string `` /* 178-byte string literal not displayed */
}

type MCPClientApplicationConfig

type MCPClientApplicationConfig struct {
	MacOS   []string
	Windows []string
	Linux   []string
}

type MCPClientConfig

type MCPClientConfig struct {
	Name           string
	ConfigLocation string
	Command        string
	Application    *MCPClientApplicationConfig
	Transport      string
	Config         *MCPConfig `json:"-"`
	Detected       bool       `json:"-"` // if the agentuity mcp server is detected in the config file
	Installed      bool       `json:"-"` // if this client is installed on this machine
	IsAMP          bool       `json:"-"`
}

func Detect

func Detect(logger logger.Logger, all bool) ([]MCPClientConfig, error)

Detect detects the MCP clients that are installed and returns an array of MCP client names found.

type MCPConfig

type MCPConfig struct {
	MCPServers    map[string]MCPServerConfig `json:"mcpServers,omitempty"`
	AMPMCPServers map[string]MCPServerConfig `json:"amp.mcpServers,omitempty"`
	AMPURL        string                     `json:"amp.url"`

	Extra map[string]interface{} `json:"-"`
	// contains filtered or unexported fields
}

func (*MCPConfig) AddIfNotExists

func (c *MCPConfig) AddIfNotExists(name string, command string, args []any, env map[string]any, isAMP bool) bool

func (*MCPConfig) MarshalJSON added in v0.0.148

func (c *MCPConfig) MarshalJSON() ([]byte, error)

func (*MCPConfig) Save

func (c *MCPConfig) Save() error

func (*MCPConfig) UnmarshalJSON added in v0.0.148

func (c *MCPConfig) UnmarshalJSON(data []byte) error

type MCPContext

type MCPContext struct {
	Context      context.Context
	Logger       logger.Logger
	Command      *cobra.Command
	Server       *mcp_golang.Server
	APIKey       string
	APIURL       string
	TransportURL string
	AppURL       string
	LoggedIn     bool
	ProjectDir   string
	Project      *project.Project
	TemplateDir  string
}

type MCPServerConfig

type MCPServerConfig struct {
	Command string         `json:"command"`
	Args    []any          `json:"args,omitempty"`
	Env     map[string]any `json:"env,omitempty"`
}

type NoArguments

type NoArguments struct {
}

type RegisterCallback

type RegisterCallback func(ctx MCPContext) error

Jump to

Keyboard shortcuts

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