Skip to content

Implement a stateless WFS-backed Feature Query API for MCP Carto handoff #160

Description

@esgn

Context

Issue #154 explored several ways to stabilize the contract between geocontext and mcp-carto.

The current contract is too fragile because MCP Carto may receive a long WFS URL reconstructed by the LLM from url, query, body.cql_filter, etc. This forces the LLM and/or MCP Carto to understand WFS details such as GET vs POST, cql_filter, URL length limits and request reconstruction.

We agreed that MCP Carto should not become a WFS client. It should receive a simple GeoJSON URL, fetch it, and display it.

After discussion, we are converging toward a stateless proxy approach rather than a stateful /layers/{id}.geojson resolver.

Goal

Implement a stateless WFS-backed Feature Query API that exposes high-level query parameters aligned with gpf_wfs_get_features, and returns a GeoJSON FeatureCollection.

The proxy should hide WFS complexity from MCP Carto and from the LLM.

Example target URL:

/api/v1/proxy-wfs?typename=BDTOPO_V3:batiment&intersects_feature_filter={"typename":"ADMINEXPRESS:departement","feature_id":"departement.25"}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions