bridge

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Types

type Options

type Options struct {
	URL             string `short:"u" long:"url" description:"mcp url" required:"true"`
	OAuth2ConfigURL string `short:"c" long:"config" description:"oauth2 config file"`
}

type Service

type Service struct {
	client.Interface
}

func New

func New(ctx context.Context, cfg *Options) (*Service, error)

New constructs a bridge Service. Provide either Config.Endpoint or Config.URL.

func (*Service) HTTP

func (s *Service) HTTP(ctx context.Context, addr string) (*http.Server, error)

HTTP starts an HTTP/SSE server on the given address that proxies MCP JSON-RPC calls to the client endpoint.

func (*Service) Stdio

func (s *Service) Stdio(ctx context.Context) (*stdiosrv.Server, error)

Stdio starts a JSON-RPC server over standard input/output that proxies MCP calls to the client endpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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