api

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(path string) (*config.Config, string, error)

LoadConfig reads and parses the config file at a path and returns the parsed config along with the resolved project root (the dir containing the file)

func LoadCredentials

func LoadCredentials(ctx context.Context, path string) (*auth.Store, error)

LoadCredentials reads the credentials file at path and returns a store for authenticating outbound HTTP requests. An empty path uses auth.DefaultCredentialsPath.

A missing file is not an error; hosts without an entry fall back to ~/.netrc. When no credentials file is present but a netrc is, this logs a warning once, since netrc is deprecated and cannot express vendor auth schemes.

func Serve

func Serve(ctx context.Context, cfg *config.Config, opts ServeOptions) error

Serve builds the tool engine from cfg and opts.Root and runs the MCP server on the requested transport. It blocks until ctx is cancelled.

Types

type ServeOptions

type ServeOptions struct {
	// Root is the directory the server is rooted in.
	Root string
	// Transport enum(stdio|http) controlls the server transport mode, defaults to stdio.
	Transport string
	// Addr is the listening address for the HTTP transport.
	Addr string
}

ServeOptions controls server behaviour.

Jump to

Keyboard shortcuts

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