feat(mcp): add SSE transport support and related configuration options
Some checks failed
CI / build-and-test (push) Failing after -30m37s

This commit is contained in:
2026-04-05 15:57:34 +02:00
parent 1958eaca01
commit 5f48a197e8
10 changed files with 276 additions and 6 deletions

View File

@@ -33,6 +33,14 @@ func (c Config) Validate() error {
if strings.TrimSpace(c.MCP.Path) == "" {
return fmt.Errorf("invalid config: mcp.path is required")
}
if c.MCP.SSEPath != "" {
if strings.TrimSpace(c.MCP.SSEPath) == "" {
return fmt.Errorf("invalid config: mcp.sse_path must not be blank whitespace")
}
if c.MCP.SSEPath == c.MCP.Path {
return fmt.Errorf("invalid config: mcp.sse_path %q must differ from mcp.path", c.MCP.SSEPath)
}
}
if c.MCP.SessionTimeout <= 0 {
return fmt.Errorf("invalid config: mcp.session_timeout must be greater than zero")
}