Geo Location Demo
Retrieves user geolocation information using EdgeOne Pages Functions and exposes it via the Model Context Protocol (MCP).
MCP with Pages Functions :Geo Location Demo
This project demonstrates how to use EdgeOne Pages Functions to retrieve user geolocation information and integrate it with large language models through MCP (Model Context Protocol).
Demo
Deploy
More Templates: EdgeOne Pages
Components
1. EdgeOne Pages Functions: Geolocation
The project includes an EdgeOne Pages Function that retrieves user geolocation information:
- Uses the EdgeOne request context to access geolocation data
- Returns location information in a JSON format
- Located in
functions/get_geo.ts
2. MCP Server Integration
The MCP server component provides an interface for large language models to access geolocation data:
- Implements the Model Context Protocol (MCP)
- Exposes a
get_geolocation
tool that can be used by AI models - Uses the EdgeOne Pages Function to fetch geolocation data
- Located in
mcp-server/index.ts
MCP Configuration
To use the MCP server with large language models, add the following configuration:
{
"mcpServers": {
"edgeone-geo-mcp-server": {
"command": "tsx",
"args": ["path/to/mcp-server/index.ts"]
}
}
}
Learn More
- EdgeOne Pages
- EdgeOne Pages Functions documentation
- Model Context Protocol (MCP) - Learn about integrating AI models with external tools and services
Related Servers
Ghibli Video
Generates AI images and videos using the GPT4O Image Generator API.
Model Context Protocol servers
A collection of reference server implementations for the Model Context Protocol (MCP) using Typescript and Python SDKs.
Swift MCP Server - JavaScript Version
Answers Swift and SwiftUI questions based on the '100 Days of SwiftUI' course using a local SQLite database.
Tatara MCP Server
An MCP server for interacting with the Tatara blockchain ecosystem. Requires configuration for the Tatara RPC endpoint and a wallet private key.
Tabby-MCP-Server
A Tabby plugin implementing an MCP server for AI-powered terminal control and automation.
Python REPL
A Python REPL with persistent sessions and automatic dependency management using uv.
OpenRouter MCP Client for Cursor
An MCP client for Cursor that uses OpenRouter.ai to access multiple AI models. Requires an OpenRouter API key.
Root Signals
Equip AI agents with evaluation and self-improvement capabilities with Root Signals.
Remote MCP Server on Cloudflare
A template for deploying a remote MCP server on Cloudflare Workers, customizable by defining tools in the source code.
MCP Image Generator
An MCP server for generating images using Together AI or Replicate models.