EdgeOne Geo MCP server

Provides lightweight geolocation retrieval by exposing an HTTP endpoint that fetches precise user location data for contextual awareness with minimal configuration overhead.
Back to servers
Provider
Tencent EdgeOne
Release date
Mar 26, 2025
Language
TypeScript
Stats
14 stars

This MCP server provides geolocation services for AI models through EdgeOne Pages Functions, allowing large language models to access user location data via the Model Context Protocol.

Installation

Prerequisites

  • EdgeOne Pages account
  • Access to EdgeOne Pages Functions
  • Basic knowledge of TypeScript

Quick Deployment

The fastest way to deploy is using the EdgeOne Pages deployment button:

Deploy with EdgeOne Pages

Manual Setup

If you prefer to set up the project manually:

  1. Clone the repository to your local machine
  2. Set up the EdgeOne Pages Functions environment
  3. Deploy the geolocation function and MCP server

Usage

Setting Up the MCP Server

To configure the MCP server for use with large language models, add the following configuration to your project:

{
  "mcpServers": {
    "edgeone-geo-mcp-server": {
      "command": "tsx",
      "args": ["path/to/mcp-server/index.ts"]
    }
  }
}

Replace path/to/mcp-server/index.ts with the actual path to the MCP server file in your project.

Accessing Geolocation Data

The MCP server exposes a get_geolocation tool that can be used by AI models to retrieve user location information.

Geolocation Function

The geolocation functionality is provided by a function located at functions/get_geo.ts. This function:

  • Automatically extracts geolocation data from user requests
  • Returns the data in a standardized JSON format
  • Works seamlessly with the MCP server

Integrating with AI Models

When properly configured, AI models can access geolocation data through the MCP server using the Model Context Protocol. The model can use the get_geolocation tool to retrieve information about the user's location and incorporate this data into its responses.

Example Implementation

Here's a simplified example of how the system works:

  1. A user makes a request to your application
  2. The EdgeOne Pages Function retrieves geolocation data from the request
  3. The MCP server provides this data to the AI model when requested
  4. The AI model uses the location information to provide contextually relevant responses

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later