Add MCP server

This commit is contained in:
Arnaud Delcasse
2025-11-03 11:45:23 +01:00
parent d992a7984f
commit 52de8d363e
18 changed files with 997 additions and 210 deletions

View File

@@ -1,7 +1,6 @@
package api
import (
"encoding/json"
"net/http"
)
@@ -14,13 +13,13 @@ func (h *Handler) GeoAutocomplete(w http.ResponseWriter, r *http.Request) {
text := t[0]
result, err := h.geoService.Autocomplete(text)
featureCollection, err := h.geoService.Autocomplete(text)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
return
}
j, err := json.Marshal(result.Features)
j, err := featureCollection.MarshalJSON()
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
return