Documentation
¶
Index ¶
Constants ¶
View Source
const LatestProtocolVersion = "2025-06-18"
LatestProtocolVersion is the MCP revision this server prefers when a client asks for one it does not know.
Variables ¶
This section is empty.
Functions ¶
func Instructions ¶ added in v1.9.0
func Instructions() string
Instructions returns the server instructions sent during initialize.
Types ¶
type JSONRPCError ¶
type JSONRPCResponse ¶
type JSONRPCResponse struct {
JSONRPC string `json:"jsonrpc"`
ID interface{} `json:"id,omitempty"`
Result interface{} `json:"result,omitempty"`
Error *JSONRPCError `json:"error,omitempty"`
}
type MCPServer ¶
type MCPServer struct {
// contains filtered or unexported fields
}
MCP Server
func NewMCPServer ¶
func NewMCPServer(config MCPServerConfig, client client.Client) *MCPServer
Create new MCP server
func (*MCPServer) Done ¶ added in v1.9.0
func (s *MCPServer) Done() <-chan struct{}
Done is closed once the server stops handling messages, which happens when the client closes the input stream. Callers wait on it so that a disconnected client ends the process instead of leaving it running with nothing to read.
type MCPServerConfig ¶
type MCPServerConfig struct {
Transport string `yaml:"transport" mapstructure:"transport"`
Port int `yaml:"port" mapstructure:"port"`
AuditLogging bool `yaml:"audit_logging" mapstructure:"audit_logging"`
// AllowExec lets exec_service run commands inside a customer's containers.
// Off by default: it is the one tool here that executes arbitrary code in a
// running environment, so it is the operator's call, not the assistant's.
AllowExec bool `yaml:"allow_exec" mapstructure:"allow_exec"`
}
MCP Server configuration
Click to show internal directories.
Click to hide internal directories.