mcp

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildConfig

type BuildConfig struct {
	Install string `json:"install,omitempty"` // e.g., "npm install"
	Build   string `json:"build,omitempty"`   // e.g., "npm run build"
	WorkDir string `json:"workdir,omitempty"` // Working directory for build
}

BuildConfig defines how to build an MCP server

type Runtime

type Runtime string

Runtime represents the runtime required by an MCP server

const (
	RuntimeNode   Runtime = "node"
	RuntimePython Runtime = "python"
	RuntimeGo     Runtime = "go"
	RuntimeDocker Runtime = "docker"
)

type Server

type Server struct {
	Name      string            `json:"name"`
	Source    Source            `json:"source"`
	Command   string            `json:"command,omitempty"` // For local servers (stdio)
	Args      []string          `json:"args,omitempty"`    // For local servers
	URL       string            `json:"url,omitempty"`     // For remote servers (http/sse)
	Headers   map[string]string `json:"headers,omitempty"` // For remote servers (http/sse)
	Env       map[string]string `json:"env,omitempty"`
	Transport Transport         `json:"transport,omitempty"`
	Namespace string            `json:"namespace,omitempty"` // For conflict resolution
	Build     *BuildConfig      `json:"build,omitempty"`
	Disabled  bool              `json:"disabled,omitempty"`

	// Runtime fields (not serialized to JSON)
	Scope string `json:"-"` // "local" or "global" - where this server came from
}

Server represents an MCP server configuration

func (*Server) InspectContent added in v0.3.0

func (s *Server) InspectContent() string

InspectContent returns the formatted content for the inspector viewport

func (*Server) InspectTitle added in v0.3.0

func (s *Server) InspectTitle() string

InspectTitle returns the display name for the inspector modal header

type ServerInfo

type ServerInfo struct {
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Source      Source   `json:"source"`
	Versions    []string `json:"versions,omitempty"`
	Runtime     Runtime  `json:"runtime,omitempty"`
	Deprecated  bool     `json:"deprecated,omitempty"`
}

ServerInfo contains metadata about an MCP server from a registry/alias

type Source

type Source struct {
	Type  string `json:"type"`            // "git", "alias", "local"
	URL   string `json:"url,omitempty"`   // Git URL or local path
	Ref   string `json:"ref,omitempty"`   // Tag, branch, or commit
	Alias string `json:"alias,omitempty"` // Short name alias
}

Source represents where an MCP server comes from

type Transport

type Transport string

Transport represents the MCP transport protocol

const (
	TransportStdio Transport = "stdio" // Local process communication
	TransportSSE   Transport = "sse"   // Server-Sent Events
	TransportHTTP  Transport = "http"  // Remote HTTP MCP server (like Sentry)
)

Jump to

Keyboard shortcuts

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