mcp

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 33 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,
	SilenceUsage:  true,
	SilenceErrors: false,
	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 a published MCP server from the registry.

Examples:
  arctl mcp delete my-server --version 1.0.0`,
	Args:          cobra.ExactArgs(1),
	SilenceUsage:  true,
	SilenceErrors: false,
	RunE:          runDelete,
}
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`,
}
View Source
var PublishCmd = &cobra.Command{
	Use:   "publish [server-name|local-path]",
	Short: "Publish an MCP server to the registry",
	Long: `Publish an MCP server to the registry.

There are two modes:

1. Package-based (installable artifact):
   Requires --type and --package-id. Use for servers distributed via npm, PyPI, or OCI.

2. Remote-only (already-deployed endpoint):
   Use --remote-url for servers already running in the cloud (e.g. Databricks, hosted SaaS).
   No --type or --package-id needed.

If no argument is provided and mcp.yaml exists in the current directory, metadata is read from it.
If a local path is provided, metadata (name, version, description) is read from mcp.yaml.
Otherwise, --version and --description are required.

Examples:
  # Publish a remote MCP server hosted on Databricks (no package to install)
  arctl mcp publish com.databricks/unity-catalog \
    --remote-url https://my-workspace.cloud.databricks.com/mcp \
    --version 1.0.0 \
    --description "Databricks Unity Catalog MCP server"

  # Publish from current folder (reads metadata from mcp.yaml)
  arctl mcp publish \
    --type oci \
    --package-id docker.io/myorg/my-server:1.0.0

  # Publish an OCI image with explicit server name
  arctl mcp publish myorg/my-server \
    --type oci \
    --package-id docker.io/myorg/my-server:1.0.0 \
    --version 1.0.0 \
    --description "My MCP server"

  # Publish an NPM package
  arctl mcp publish myorg/filesystem-server \
    --type npm \
    --package-id @modelcontextprotocol/server-filesystem \
    --version 1.0.0 \
    --description "Filesystem MCP server" \
    --arg /path/to/directory

  # Publish a PyPI package
  arctl mcp publish myorg/server \
    --type pypi \
    --package-id mcp-server-package \
    --version 1.0.0 \
    --description "Python MCP server"

  # Publish from specific local folder
  arctl mcp publish ./my-server \
    --type oci \
    --package-id docker.io/myorg/my-server:1.0.0`,

	Args:          cobra.MaximumNArgs(1),
	SilenceUsage:  true,
	SilenceErrors: false,
	RunE:          runMCPServerPublish,
}
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 is automatically built before running. Use --no-build to skip the build step.`,
	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,
}

Functions

func SetAPIClient

func SetAPIClient(client *client.Client)

Types

type ServerJSONParams added in v0.1.24

type ServerJSONParams struct {
	Name        string
	Description string
	Title       string
	Version     string
	GitURL      string

	// Package info
	RegistryType     string
	Identifier       string
	PackageVersion   string
	RuntimeHint      string
	RuntimeArguments []string
	PackageArguments []string
	TransportType    string
	TransportURL     string
}

ServerJSONParams contains all parameters needed to build a ServerJSON.

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