RegisterRoutes registers the MCP server routes with Echo.
(e *echo.Echo)
| 174 | |
| 175 | // RegisterRoutes registers the MCP server routes with Echo. |
| 176 | func (s *Server) RegisterRoutes(e *echo.Echo) { |
| 177 | // MCP Streamable HTTP endpoint with authentication |
| 178 | e.Any("/mcp", echo.WrapHandler(s.httpHandler), s.authMiddleware) |
| 179 | } |
| 180 | |
| 181 | // unauthorized writes a 401 with an RFC 9728 / MCP-authorization-spec |
| 182 | // WWW-Authenticate header so compliant MCP clients can auto-discover the |
no outgoing calls