mcpregistry

package
v0.0.1-dev.7 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PublisherMetadata  = "io.modelcontextprotocol.registry/publisher-provided"
	MaxDescriptorBytes = 1 << 20
)

Variables

This section is empty.

Functions

func BuildRecord

func BuildRecord(app protocol.App, catalogEnv map[string]protocol.Input, descriptor *Descriptor) protocol.BuildRecord

func Variables

func Variables(template string, declared map[string]InputFields, required bool) (map[string]wire.Input, error)

Types

type Descriptor

type Descriptor struct {
	Icons       []wire.Icon `json:"icons,omitempty"`
	Name        string      `json:"name"`
	Title       string      `json:"title"`
	Version     string      `json:"version"`
	Description string      `json:"description"`
	WebsiteURL  string      `json:"websiteUrl"`
	Repository  struct {
		URL string `json:"url"`
	} `json:"repository"`
	Remotes  []Transport                 `json:"remotes"`
	Packages []Package                   `json:"packages"`
	Meta     map[string]json.RawMessage  `json:"_meta"`
	Requires map[string]wire.RegistryRef `json:"-"`
	Egress   wire.Egress                 `json:"-"`
}

func Fetch

func Fetch(ctx context.Context, ref protocol.RegistryRef) (*Descriptor, error)

func ParseDescriptor

func ParseDescriptor(data []byte) (*Descriptor, error)

func (*Descriptor) Identity

func (d *Descriptor) Identity() mcpcontract.Identity

type DescriptorInput

type DescriptorInput struct {
	InputFields

	Name      string                 `json:"name"`
	Type      string                 `json:"type"`
	ValueHint string                 `json:"valueHint"`
	Variables map[string]InputFields `json:"variables"`
}

func ParseInput

func ParseInput(raw json.RawMessage) (DescriptorInput, wire.Input, map[string]wire.Input, error)

func (DescriptorInput) Parse

func (spec DescriptorInput) Parse() (wire.Input, map[string]wire.Input, error)

type HolonMetadata

type HolonMetadata struct {
	Requires map[string]wire.RegistryRef `description:"Dependencies keyed by app name." json:"requires"`

	Egress wire.Egress `` /* 137-byte string literal not displayed */
}

type InputFields

type InputFields wire.Input

type Package

type Package struct {
	Version          string            `json:"version"`
	RegistryType     string            `json:"registryType"`
	Identifier       string            `json:"identifier"`
	Transport        Transport         `json:"transport"`
	Environment      []json.RawMessage `json:"environmentVariables"`
	RuntimeArguments []json.RawMessage `json:"runtimeArguments"`
	PackageArguments []json.RawMessage `json:"packageArguments"`
}

func (Package) App

func (p Package) App(values map[string]Value, run RunConfig) (protocol.App, error)

func (Package) Port

func (p Package) Port() (int, error)

func (Package) ValidateTransport

func (p Package) ValidateTransport() error

type RunConfig

type RunConfig struct {
	Args []string
	Env  map[string]Value
}

type Transport

type Transport struct {
	Type      string                 `json:"type"`
	URL       string                 `json:"url"`
	Headers   []DescriptorInput      `json:"headers"`
	Variables map[string]InputFields `json:"variables"`
}

func SelectServerSource

func SelectServerSource(d *Descriptor, source protocol.RegistrySource) (int, *Transport, error)

func (Transport) Remote

func (t Transport) Remote(values map[string]Value) (*protocol.Remote, map[string]protocol.Input, error)

type Value

type Value struct {
	Value  *string `json:"-"`
	Secret string  `json:"secret,omitempty" minLength:"1" pattern:"^[A-Za-z_][A-Za-z0-9_]*$" required:"true"`
}

func (*Value) UnmarshalJSON

func (a *Value) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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