mcpimport

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayName

func DisplayName(source string) string

DisplayName returns the registered human-readable source name.

func HasSource

func HasSource(source string) bool

HasSource reports whether an import adapter is registered.

func PrepareContext

func PrepareContext(source, cwd string) (string, error)

PrepareContext captures the opaque adapter context needed to preserve source scope across later refreshes.

func RefreshContext

func RefreshContext(source, savedContext string) (string, error)

RefreshContext renews execution details while preserving the identity of a previously saved source scope. File-backed adapters need no renewal.

func SameContext

func SameContext(source, left, right string) bool

SameContext reports whether two opaque contexts identify the same source scope. Execution details may differ without changing source identity.

Types

type Candidate

type Candidate struct {
	Name                   string
	Enabled                bool
	DisabledReason         string
	Transport              string
	AuthStatus             string
	OAuthScopes            []string
	OAuthClientMetadataURL string
	OAuthUnsupportedReason string
	Supported              bool
	UnsupportedReason      string
	Server                 config.ServerConfig
}

Candidate is one server offered by an external MCP configuration source.

func List

func List(ctx context.Context, source, sourceContext string) ([]Candidate, error)

List resolves candidates from one registered source. sourceContext is an opaque adapter input; file-backed clients currently interpret it as the workspace directory used to resolve project-scoped configuration.

func ListCodex

func ListCodex(ctx context.Context, sourceContext string) ([]Candidate, error)

ListCodex returns Codex's resolved MCP catalog, including plugin-provided servers. It invokes Codex only for this explicit import operation.

func ParseCodexCatalog

func ParseCodexCatalog(raw []byte) ([]Candidate, error)

ParseCodexCatalog converts Codex's resolved catalog into transport-only mcpx candidates. OAuth credentials remain owned by Codex and are never exported.

type Source

type Source struct {
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
	Description string `json:"description"`
}

Source describes one import adapter exposed by mcpx.

func Sources

func Sources() []Source

Sources returns the registered import adapters in stable order.

Jump to

Keyboard shortcuts

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