Documentation
¶
Overview ¶
Package server implements the MCP server functionality.
It handles loading tool configurations, starting the server, and processing requests from AI clients using the MCP protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ConfigFile string // Path to the YAML configuration file
Shell string // Shell to use for executing commands
Logger *common.Logger // Logger for server operations
Version string // Version string for the server
Description string // Description shown to AI clients
}
Config contains the configuration options for creating a new Server
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the MCPShell server that handles tool registration and request processing.
func New ¶
New creates a new Server instance with the provided configuration
Parameters:
- cfg: The server configuration
Returns:
- A new Server instance
func (*Server) Start ¶
Start initializes the MCP server, loads tools from the configuration file, and starts listening for client connections.
Returns:
- An error if server initialization or startup fails
Click to show internal directories.
Click to hide internal directories.