It does one thing, and its real use is as the shortest example of wiring an edge function to an MCP tool — deploy it, see the shape, then swap in whatever your own function returns. The location comes from EdgeOne's request context, so it only means anything when it runs on EdgeOne.
A small demonstration project that pairs an EdgeOne Pages Function with an MCP server. The function pulls geolocation out of the EdgeOne request context and returns it as JSON; the MCP server wraps that as a tool a model can call.
- `get_geolocation` — the single tool the MCP server exposes to a model
- The Pages Function that produces the data, in functions/get_geo.ts
- The MCP server that calls it, in mcp-server/index.ts
- A one-click deploy button for the EdgeOne Pages template
- A short, complete example of the pattern: edge function as the data source, MCP server as the interface
An EdgeOne Pages deployment of the template, since the location data comes from EdgeOne's own request context rather than a geo-IP library. The MCP server itself is a TypeScript file launched with `tsx` — that command and the path to mcp-server/index.ts is what goes into your client config.
Build from source — clone the repository and build it, then point your client at the binary
