The location does not come from an IP database you have to trust — it comes from the edge node that served the request, which is the same signal EdgeOne uses to route it.
Two pieces that ship together: an EdgeOne Pages Function that pulls geolocation out of the EdgeOne request context and returns it as JSON, and an MCP server that calls that function so a model can ask for the same data.
- `get_geolocation` — returns the location information the EdgeOne Pages Function reads from the request context
- The function itself, in `functions/get_geo.ts`, deployable to EdgeOne Pages from the template button in the README
An EdgeOne Pages deployment, since the location data comes from EdgeOne's own request context rather than from a lookup service. The MCP side is `mcp-server/index.ts`, launched with `tsx` in your client config.
Build from source — clone the repository and build it, then point your client at the binary
