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.
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"
]
}
The mcp_geo_convert
tool supports various conversion methods between coordinate systems.
BD09toGCJ02
: Convert Baidu coordinates to GCJ02GCJ02toBD09
: Convert GCJ02 to Baidu coordinatesWGS84toGCJ02
: Convert WGS84 to GCJ02GCJ02toWGS84
: Convert GCJ02 to WGS84BD09toWGS84
: Convert Baidu coordinates to WGS84WGS84toBD09
: Convert WGS84 to Baidu coordinatesWebMercatortoLngLat
: Convert Web Mercator to longitude/latitudeLngLattoWebMercator
: Convert longitude/latitude to Web MercatorThe mcp_geo_calculate_distance
tool calculates the distance of a polyline using planar calculations based on Web Mercator projection.
[[lon1,lat1], [lon2,lat2],...]
meters
[default], kilometers
)WGS84
[default], GCJ02
, BD09
)The mcp_geo_calculate_area
tool calculates polygon area using planar calculations based on Web Mercator projection.
[[lon1,lat1], [lon2,lat2],...]
square_meters
[default], square_kilometers
, hectares
)WGS84
[default], GCJ02
, BD09
)Baidu Maps coordinate system, which is an encrypted version of GCJ02.
Coordinate system established by China's National Bureau of Surveying and Mapping, which is an encrypted version of WGS84.
Original GPS coordinate system widely used by global satellite positioning systems.
Projection coordinate system used by web maps, converting spherical coordinates to planar coordinates for more accurate distance and area calculations.
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.