GeoCalculator MCP server

Provides geospatial calculation capabilities for coordinate conversion and spatial analysis, enabling GIS applications and geometry processing without complex algorithm implementation.
Back to servers
Provider
ZealGeo
Release date
Apr 18, 2025
Language
TypeScript
Package
Stats
1.5K downloads
1 star

The Model Context Protocol (MCP) Geo Server provides geographic processing capabilities including coordinate system conversions, distance calculations, and area measurements. It serves as a specialized spatial analysis tool that can be integrated into various applications requiring geographic data processing.

Installation

To install the MCP Geo Server, add the following configuration to your application:

"geo-mcp-server": {
  "type": "stdio",
  "command": "npx",
  "args": [
    "-y",
    "@zealgeo/mcp-geo-server"
  ]
}

Features and Capabilities

Supported Coordinate Systems

  • BD09 (Baidu coordinate system)
  • GCJ02 (Mars coordinate system)
  • WGS84 (GPS coordinate system)
  • Web Mercator projection

Available Tools

Coordinate Conversion

The mcp_geo_convert tool supports various conversion methods between coordinate systems.

Parameters:

  • method: Conversion method to use
    • BD09toGCJ02: Convert Baidu coordinates to GCJ02
    • GCJ02toBD09: Convert GCJ02 to Baidu coordinates
    • WGS84toGCJ02: Convert WGS84 to GCJ02
    • GCJ02toWGS84: Convert GCJ02 to WGS84
    • BD09toWGS84: Convert Baidu coordinates to WGS84
    • WGS84toBD09: Convert WGS84 to Baidu coordinates
    • WebMercatortoLngLat: Convert Web Mercator to longitude/latitude
    • LngLattoWebMercator: Convert longitude/latitude to Web Mercator
  • longitude: Longitude value
  • latitude: Latitude value

Distance Calculation

The mcp_geo_calculate_distance tool calculates the distance of a polyline using planar calculations based on Web Mercator projection.

Parameters:

  • coordinates: Array of polyline coordinates in format [[lon1,lat1], [lon2,lat2],...]
  • unit: Length unit (options: meters [default], kilometers)
  • coordType: Input coordinate type (options: WGS84 [default], GCJ02, BD09)

Area Calculation

The mcp_geo_calculate_area tool calculates polygon area using planar calculations based on Web Mercator projection.

Parameters:

  • coordinates: Array of polygon coordinates in format [[lon1,lat1], [lon2,lat2],...]
  • unit: Area unit (options: square_meters [default], square_kilometers, hectares)
  • coordType: Input coordinate type (options: WGS84 [default], GCJ02, BD09)

Important Notes

  • Coordinate conversion accuracy depends on the quality of original data
  • For coordinates outside mainland China, WGS84 to GCJ02 conversions will return the original coordinates
  • Web Mercator coordinates are typically in meters
  • Distance and area calculations use planar methods after Web Mercator projection, suitable for small to medium scale calculations
  • For ultra-long distances or large areas spanning continents, spherical calculation methods are recommended
  • Polygon area calculations automatically handle closure; you don't need to manually close polygons

Coordinate System Details

BD09 (Baidu)

Baidu Maps coordinate system, which is an encrypted version of GCJ02.

GCJ02 (Mars)

Coordinate system established by China's National Bureau of Surveying and Mapping, which is an encrypted version of WGS84.

WGS84

Original GPS coordinate system widely used by global satellite positioning systems.

Web Mercator

Projection coordinate system used by web maps, converting spherical coordinates to planar coordinates for more accurate distance and area calculations.

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