Add MCP server for network discovery tools

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-02-04 11:30:23 -08:00
parent 93e5ff90c1
commit aee1487f22
5 changed files with 416 additions and 3 deletions

View File

@@ -50,6 +50,7 @@ func (t *Tendrils) startHTTPServer() {
mux.HandleFunc("/tendrils/api/status", t.handleAPIStatus)
mux.HandleFunc("/tendrils/api/errors/clear", t.handleClearError)
mux.HandleFunc("/tendrils/api/nodes/remove", t.handleRemoveNode)
mux.Handle("/tendrils/mcp/", t.newMCPServer())
mux.Handle("/", noCacheHandler(http.FileServer(http.Dir("static"))))
log.Printf("[https] listening on :443")
@@ -58,6 +59,13 @@ func (t *Tendrils) startHTTPServer() {
log.Printf("[ERROR] https server failed: %v", err)
}
}()
log.Printf("[http] listening on :80")
go func() {
if err := http.ListenAndServe(":80", mux); err != nil {
log.Printf("[ERROR] http server failed: %v", err)
}
}()
}
func ensureCert() error {