This guide explains how to integrate the Geocoding MCP Server with Cursor.
The easiest way is to use the published package:
uvx geocode-mcpAdd this configuration to your Cursor MCP settings:
{
"mcpServers": {
"geocoding": {
"command": "uvx",
"args": ["geocode-mcp"]
}
}
}You can copy this exact configuration from config/cursor-mcp.json.
If you're developing or testing locally:
# Clone and install
git clone https://github.com/X-McKay/geocode-mcp.git
cd geocode-mcp
pip install -e ".[dev]"pytest tests/test_mcp_server.py -vUse this configuration for local development:
{
"mcpServers": {
"geocoding": {
"command": "python",
"args": ["-m", "geocode_mcp.server"],
"cwd": "/path/to/geocode-mcp",
"env": {
"PYTHONPATH": "/path/to/geocode-mcp/src"
}
}
}
}Once integrated, you can use this tool in Cursor:
Get latitude and longitude coordinates for a city or location.
Parameters:
location(required): City name, address, or location (e.g., 'New York', 'Paris, France', '123 Main St, Seattle')limit(optional): Maximum number of results to return (default: 1, max: 10)
Example Usage:
Get coordinates for Tokyo, Japan
Find the latitude and longitude of London, UK
What are the coordinates for New York City?
Get coordinates for "1600 Pennsylvania Avenue, Washington DC" with limit 3
Response includes:
- Latitude and longitude
- Display name of the location
- Place ID from OpenStreetMap
- Location type and classification
- Importance ranking
- Bounding box coordinates
- Open Cursor Settings (
Ctrl+,orCmd+,) - Search for "MCP"
- Add the geocoding server configuration
- Open Command Palette (
Ctrl+Shift+PorCmd+Shift+P) - Type "Preferences: Open Settings (JSON)"
- Add the MCP server configuration to your settings
Add the configuration to your workspace's .cursor/settings.json file.
- Restart Cursor after adding the MCP server configuration
- Open a chat in Cursor
- Try these example prompts:
- "What are the coordinates for Paris, France?"
- "Get the latitude and longitude of Tokyo"
- "Find coordinates for Seattle, Washington"
- "Get coordinates for multiple results: London with limit 3"
- Check uvx installation:
uvx --version - Verify package availability:
uvx geocode-mcp --help - Check package installation:
pip show geocode-mcp
- Restart Cursor completely after configuration changes
- Check MCP server status in Cursor's developer tools/logs
- Verify configuration syntax - JSON must be valid
- Test locally:
python -m geocode_mcp.server(for development setup)
- On some systems, you may need to adjust file permissions
- Try running:
chmod +x $(which geocode-mcp)if using pip installation
- Install in development mode:
pip install -e ".[dev]" - Run tests:
pytest tests/ -v - Check Python path: Ensure
src/is in PYTHONPATH for local development
- Check the main README for general usage
- Review configuration examples for other tools
- Open an issue on GitHub if you encounter problems