 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  const ( RegistryTypeNPM = "npm" RegistryTypePyPI = "pypi" RegistryTypeOCI = "oci" RegistryTypeNuGet = "nuget" RegistryTypeMCPB = "mcpb" )
Registry Types - supported package registry types
      View Source
      
  const ( RegistryURLNPM = "https://registry.npmjs.org" RegistryURLPyPI = "https://pypi.org" RegistryURLNuGet = "https://api.nuget.org" RegistryURLGitHub = "https://github.com" RegistryURLGitLab = "https://gitlab.com" )
Registry Base URLs - supported package registry base URLs
      View Source
      
  const ( TransportTypeStreamableHTTP = "streamable-http" TransportTypeSSE = "sse" TransportTypeStdio = "stdio" )
Transport Types - supported remote transport protocols
      View Source
      
  const ( RuntimeHintNPX = "npx" RuntimeHintUVX = "uvx" RuntimeHintDocker = "docker" RuntimeHintDNX = "dnx" )
Runtime Hints - supported package runtime hints
      View Source
      
  const ( // CurrentSchemaVersion is the current supported schema version date CurrentSchemaVersion = "2025-10-17" // CurrentSchemaURL is the full URL to the current schema CurrentSchemaURL = "https://static.modelcontextprotocol.io/schemas/" + CurrentSchemaVersion + "/server.schema.json" )
Schema versions
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument struct {
	InputWithVariables `json:",inline"`
	Type               ArgumentType `json:"type" doc:"Argument type: 'positional' or 'named'" example:"positional"`
	Name               string       `` /* 143-byte string literal not displayed */
	ValueHint          string       `` /* 137-byte string literal not displayed */
	IsRepeated         bool         `json:"isRepeated,omitempty" doc:"Whether the argument can be repeated multiple times."`
}
    type ArgumentType ¶
type ArgumentType string
const ( ArgumentTypePositional ArgumentType = "positional" ArgumentTypeNamed ArgumentType = "named" )
type Input ¶
type Input struct {
	Description string   `json:"description,omitempty" doc:"A description of the input, which clients can use to provide context to the user."`
	IsRequired  bool     `json:"isRequired,omitempty" doc:"Whether the input is required"`
	Format      Format   `` /* 194-byte string literal not displayed */
	Value       string   `` /* 237-byte string literal not displayed */
	IsSecret    bool     `` /* 153-byte string literal not displayed */
	Default     string   `` /* 193-byte string literal not displayed */
	Placeholder string   `` /* 195-byte string literal not displayed */
	Choices     []string `` /* 126-byte string literal not displayed */
}
    type InputWithVariables ¶
type KeyValueInput ¶
type KeyValueInput struct {
	InputWithVariables `json:",inline"`
	Name               string `json:"name" doc:"Name of the header or environment variable." example:"SOME_VARIABLE"`
}
    type Package ¶
type Package struct {
	// RegistryType indicates how to download packages (e.g., "npm", "pypi", "oci", "nuget", "mcpb")
	RegistryType string `` /* 149-byte string literal not displayed */
	// RegistryBaseURL is the base URL of the package registry (used by npm, pypi, nuget; not used by oci, mcpb)
	RegistryBaseURL string `json:"registryBaseUrl,omitempty" format:"uri" doc:"Base URL of the package registry" example:"https://registry.npmjs.org"`
	// Identifier is the package identifier:
	//   - For NPM/PyPI/NuGet: package name or ID
	//   - For OCI: full image reference (e.g., "ghcr.io/owner/repo:v1.0.0")
	//   - For MCPB: direct download URL
	Identifier string `` /* 179-byte string literal not displayed */
	// Version is the package version (required for npm, pypi, nuget; optional for mcpb; not used by oci where version is in the identifier)
	Version string `` /* 186-byte string literal not displayed */
	// FileSHA256 is the SHA-256 hash for integrity verification (required for mcpb, optional for others)
	FileSHA256 string `` /* 473-byte string literal not displayed */
	// RunTimeHint suggests the appropriate runtime for the package
	RunTimeHint string `` /* 187-byte string literal not displayed */
	// Transport is required and specifies the transport protocol configuration
	Transport Transport `json:"transport" doc:"Transport protocol configuration for the package"`
	// RuntimeArguments are passed to the package's runtime command (e.g., docker, npx)
	RuntimeArguments []Argument `` /* 206-byte string literal not displayed */
	// PackageArguments are passed to the package's binary
	PackageArguments []Argument `json:"packageArguments,omitempty" doc:"A list of arguments to be passed to the package's binary."`
	// EnvironmentVariables are set when running the package
	EnvironmentVariables []KeyValueInput `json:"environmentVariables,omitempty" doc:"A mapping of environment variables to be set when running the package."`
}
    Package represents a package configuration. The RegistryType field determines which other fields are relevant:
- NPM: RegistryType, Identifier (package name), Version, RegistryBaseURL (optional)
- PyPI: RegistryType, Identifier (package name), Version, RegistryBaseURL (optional)
- NuGet: RegistryType, Identifier (package ID), Version, RegistryBaseURL (optional)
- OCI: RegistryType, Identifier (full image reference like "ghcr.io/owner/repo:tag")
- MCPB: RegistryType, Identifier (download URL), Version (optional), FileSHA256 (required)
type Repository ¶
type Transport ¶
type Transport struct {
	Type    string          `json:"type" doc:"Transport type (stdio, streamable-http, or sse)" example:"stdio"`
	URL     string          `json:"url,omitempty" doc:"URL for streamable-http or sse transports" example:"https://api.example.com/mcp"`
	Headers []KeyValueInput `json:"headers,omitempty" doc:"HTTP headers for streamable-http or sse transports"`
}
     Click to show internal directories. 
   Click to hide internal directories.