EdgeOne Geolocation

Provides an MCP server that exposes geolocation data retrieved via EdgeOne Pages Functions for use by large language models.
  • typescript

0

GitHub Stars

typescript

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

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

You can run an MCP server that exposes geolocation data to large language models through the MCP protocol. This server integrates an EdgeOne Pages Function to fetch user location and makes it available to AI models via a dedicated get_geolocation tool, enabling location-aware reasoning and actions.

How to use

To enable geolocation data for your AI workloads, deploy the MCP server and connect it to your MCP client. You’ll access a get_geolocation tool that fetches location details from the EdgeOne Pages Function and returns structured data your model can consume during reasoning or response generation.

Usage pattern highlights:

  • Discover the current user location data via the get_geolocation tool
  • Pass the retrieved location context to your model’s prompt or planning steps
  • Maintain data freshness by invoking the tool as part of your tool-augmented reasoning flow
  • Handle location data securely and respect privacy settings as you integrate with your models

The MCP server is configured to expose the geolocation data retrieval tool, which your MCP client can call as part of its toolset. The tool name you’ll reference in your prompts is get_geolocation.

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

How to install

Prerequisites you need before installing:
- Node.js installed (version 14+ recommended)
- npm (comes with Node.js) or an equivalent package manager
- A code editor or terminal access to run commands
Step-by-step setup you can follow in your environment:
1) Ensure Node.js and npm are installed
2) Prepare a project folder for the MCP server files
3) Install runtime dependencies if your project includes package.json
4) Run the MCP server using the provided command

Run these commands in your terminal, in the folder where your MCP server configuration resides:

# Verify Node.js and npm versions
node -v
npm -v

# Install dependencies if your project includes a package.json
npm install

# Start the MCP server using the standard runtime for TSX
npx tsx path/to/mcp-server/index.ts

Configuration and notes

This MCP server exposes the get_geolocation tool that your MCP client can invoke to obtain geolocation data. The server is wired to fetch location data via an EdgeOne Pages Function and return a JSON payload suitable for model consumption.

Key points:

  • The MCP server configuration uses a stdio runtime with the command tsx and a path to the index file
  • No external HTTP URL is required for this local MCP setup; the server runs locally and serves the tool interface to the MCP client
  • Ensure you maintain appropriate privacy controls when handling geolocation data and comply with relevant policies

Troubleshooting and tips

  • If the server fails to start, check that tsx is installed or available in your PATH.
  • Verify the path to your mcp-server/index.ts is correct and accessible.
  • Ensure you have the proper permissions to read and execute the server files.
  • Review any error messages for missing dependencies and install them with npm install if needed.

Available tools

get_geolocation

Tool within the MCP server that fetches user geolocation data by leveraging the EdgeOne Pages Function and exposes it to AI models through the MCP interface.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational