mcp

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 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

Overview

Package mcp installs ChannelTerm MCP endpoint configurations for supported client applications without coupling those client formats to the MCP host.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	ID() string
	Name() string
	Detect() (bool, error)
	HasChannelTerm() (bool, error)
	Example(Endpoint) (string, error)
	Install(Endpoint) (InstallResult, error)
}

Adapter owns discovery, rendering, and safe installation for one MCP client.

func NewAdapters

func NewAdapters(options Options) ([]Adapter, error)

NewAdapters constructs every first-version supported MCP client adapter.

type Endpoint

type Endpoint struct {
	// Transport selects stdio or Streamable HTTP rendering.
	Transport Transport
	// Command and Args describe a stdio server process.
	Command string
	Args    []string
	// URL and Headers describe a Streamable HTTP server.
	URL     string
	Headers map[string]string
}

Endpoint is the client-neutral description of a ChannelTerm MCP server. Exactly the fields for its selected Transport must be populated.

func DefaultEndpoint

func DefaultEndpoint() Endpoint

DefaultEndpoint returns the local stdio configuration installed by init.

func (Endpoint) Validate

func (e Endpoint) Validate() error

Validate reports whether Endpoint has the information required by its selected transport before a client-specific Adapter renders it.

type InstallResult

type InstallResult struct {
	Path           string
	AlreadyPresent bool
}

InstallResult describes the completed configuration operation.

type Options

type Options struct {
	Home      string
	ConfigDir string
	WorkDir   string
	LookPath  func(string) (string, error)
}

Options supplies locations and executable lookup to NewAdapters. Empty fields use the current user's standard locations.

type Transport

type Transport string

Transport identifies how an MCP client connects to the ChannelTerm server.

const (
	// TransportStdio starts ChannelTerm as a child process and exchanges MCP
	// messages over its standard input and output streams.
	TransportStdio Transport = "stdio"
	// TransportStreamableHTTP connects to a ChannelTerm Streamable HTTP endpoint.
	TransportStreamableHTTP Transport = "streamable-http"
)

Jump to

Keyboard shortcuts

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