Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrAlreadyRunning = errors.New("mcp server already running") ErrNotRunning = errors.New("mcp server not running") )
Functions ¶
func AuthConfigPath ¶ added in v1.7.4
func AuthConfigPath() string
AuthConfigPath returns the MCP auth config path in the client app directory.
func AuthHeaderName ¶ added in v1.7.4
func AuthHeaderName() string
AuthHeaderName returns the required header name for MCP HTTP/SSE requests.
func ServeStdio ¶
func ServeStdio(cfg Config, rpc rpcpb.SliverRPCClient) error
ServeStdio runs the MCP server over stdio using the provided configuration.
Types ¶
type AuthInfo ¶ added in v1.7.4
AuthInfo describes the persisted MCP HTTP/SSE authentication settings.
func LoadAuthInfo ¶ added in v1.7.4
LoadAuthInfo loads the persisted MCP auth configuration without creating it.
func ResolveAuthInfo ¶ added in v1.7.4
ResolveAuthInfo loads the persisted auth token or creates and saves one on first use.
type Config ¶
type Config struct {
Transport Transport
ListenAddress string
ServerName string
ServerVersion string
}
Config controls the local MCP server settings.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the baseline MCP configuration.
func (Config) EndpointURL ¶
EndpointURL returns the base URL for clients to connect.
func (Config) WithDefaults ¶
WithDefaults fills any empty fields with defaults.
type SliverMCPServer ¶
type SliverMCPServer struct {
Rpc rpcpb.SliverRPCClient
// contains filtered or unexported fields
}
SliverMCPServer wraps the MCP server with Sliver RPC access for handlers.