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.
The fastest way to deploy is using the EdgeOne Pages deployment button:
If you prefer to set up the project manually:
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.
The MCP server exposes a get_geolocation
tool that can be used by AI models to retrieve user location information.
The geolocation functionality is provided by a function located at functions/get_geo.ts
. This function:
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.
Here's a simplified example of how the system works:
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.
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"
]
}
}
}
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.
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.