mcp

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddToolCmd = &cobra.Command{
	Use:   "add-tool [tool-name]",
	Short: "Add a new MCP tool to your project",
	Long: `Generate a new MCP tool that will be automatically loaded by the server.

This command creates a new tool file in src/tools/ with a generic template.
The tool will be automatically discovered and loaded when the server starts.

Each tool is a Python file containing a function decorated with @mcp.tool().
The function should use the @mcp.tool() decorator from FastMCP.
`,
	Example: `  arctl mcp add-tool weather
  arctl mcp add-tool database --description "Database operations tool"
  arctl mcp add-tool weather --force`,
	Args: cobra.ExactArgs(1),
	RunE: runAddTool,
}
View Source
var BuildCmd = &cobra.Command{
	Use:   "build",
	Short: "Build MCP server as a Docker image",
	Long: `Build an MCP server from the current project.
	
This command will detect the project type and build the appropriate
MCP server Docker image.`,
	Args: cobra.ExactArgs(1),
	RunE: runBuild,
	Example: `  arctl mcp build                              # Build Docker image from current directory
  arctl mcp build ./my-project   # Build Docker image from specific directory`,
}
View Source
var DeleteCmd = &cobra.Command{
	Use:   "delete <server-name>",
	Short: "Delete an MCP server from the registry",
	Long: `Delete an MCP server from the registry.
The server must not be published or deployed unless --force is used.

Examples:
  arctl mcp delete my-server --version 1.0.0
  arctl mcp delete my-server --version 1.0.0 --force`,
	Args: cobra.ExactArgs(1),
	RunE: runDelete,
}
View Source
var DeployCmd = &cobra.Command{
	Use:           "deploy <server-name>",
	Short:         "Deploy an MCP server",
	Long:          `Deploy an MCP server to the runtime.`,
	Args:          cobra.ExactArgs(1),
	RunE:          runDeploy,
	SilenceUsage:  true,
	SilenceErrors: false,
}
View Source
var InitCmd = &cobra.Command{
	Use:   "init [project-type] [project-name]",
	Short: "Initialize a new MCP server project",
	Long: `Initialize a new MCP server project with dynamic tool loading.

This command provides subcommands to initialize a new MCP server project
using one of the supported frameworks.`,
	RunE: runInit,
}
View Source
var ListCmd = &cobra.Command{
	Use:   "list",
	Short: "List MCP servers",
	Long:  `List MCP servers from connected registries.`,
	RunE:  runList,
}
View Source
var McpCmd = &cobra.Command{
	Use:   "mcp",
	Short: "Commands for managing MCP servers",
	Long:  `Commands for managing MCP servers.`,
	Args:  cobra.ArbitraryArgs,
	Example: `arctl mcp list
arctl mcp show my-mcp-server
arctl mcp publish ./my-mcp-server
arctl mcp deploy my-mcp-server
arctl mcp remove my-mcp-server`,
}
View Source
var PublishCmd = &cobra.Command{
	Use:   "publish <mcp-server-folder-path|server-name>",
	Short: "Build and publish an MCP Server or re-publish an existing server",
	Long: `Publish an MCP Server to the registry.

This command supports two modes:
1. Build and publish from local folder: Provide a path to a folder containing mcp.yaml
2. Re-publish existing server: Provide a server name from the registry to change its status to published

Examples:
  # Build and publish from local folder
  arctl mcp publish ./my-server --docker-url docker.io/myorg --push

  # Re-publish an existing server from the registry
  arctl mcp publish io.github.example/my-server`,
	Args: cobra.ExactArgs(1),
	RunE: runMCPServerPublish,
}
View Source
var RemoveCmd = &cobra.Command{
	Use:           "remove <server-name>",
	Short:         "Remove a deployed MCP server",
	Long:          `Remove a deployed MCP server from the runtime.`,
	Args:          cobra.ExactArgs(1),
	RunE:          runRemove,
	SilenceUsage:  true,
	SilenceErrors: false,
}
View Source
var RunCmd = &cobra.Command{
	Use:   "run <server-name|path>",
	Short: "Run an MCP server",
	Long: `Run an MCP server locally.

You can run either:
  - A server from the registry by name (e.g., 'arctl mcp run @modelcontextprotocol/server-everything')
  - A local MCP project by path (e.g., 'arctl mcp run .' or 'arctl mcp run ./my-mcp-server')

For local projects, the server must be built first using 'arctl mcp build'.`,
	Args: cobra.ExactArgs(1),
	RunE: runRun,
}
View Source
var ShowCmd = &cobra.Command{
	Use:   "show <server-name>",
	Short: "Show details of an MCP server",
	Long:  `Shows detailed information about an MCP server.`,
	Args:  cobra.ExactArgs(1),
	RunE:  runShow,
}
View Source
var UnpublishCmd = &cobra.Command{
	Use:   "unpublish <server-name>",
	Short: "Unpublish an MCP server",
	Long: `Unpublish an MCP server from the registry.

This marks the server as unpublished, hiding it from public listings.
The server data is not deleted and can be re-published later.

Use --all to unpublish all versions of the server.`,
	Args: cobra.ExactArgs(1),
	RunE: runUnpublish,
}

Functions

func SetAPIClient

func SetAPIClient(client *client.Client)

Types

type ServerVersionGroup

type ServerVersionGroup struct {
	BaseName string
	Servers  []*v0.ServerResponse
}

ServerVersionGroup groups servers with the same base name but different versions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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