A Model Context Protocol (MCP) server providing geospatial tools for AI agents. Enables Claude, GPT, and other LLMs to perform geocoding, routing, spatial analysis, and file operations. - Geocoding: Convert addresses to coordinates and vice versa (via Nominatim/OSM or Pelias) - Batch Geocoding: Geocode multiple addresses in a single request (up to 10) - Elevation Data: Get altitude for points and
Add this skill
npx mdskills install matbel91765/gis-mcp-serverComprehensive geospatial toolkit with excellent tool coverage and clear documentation
1# LocuSync Server23[](https://badge.fury.io/py/locusync-server)4[](https://www.python.org/downloads/)5[](https://opensource.org/licenses/MIT)6[](https://github.com/matbel91765/locusync-server/actions/workflows/ci.yml)78A Model Context Protocol (MCP) server providing geospatial tools for AI agents. Enables Claude, GPT, and other LLMs to perform geocoding, routing, spatial analysis, and file operations.910## Features1112- **Geocoding**: Convert addresses to coordinates and vice versa (via Nominatim/OSM or Pelias)13- **Batch Geocoding**: Geocode multiple addresses in a single request (up to 10)14- **Elevation Data**: Get altitude for points and elevation profiles along paths15- **Routing**: Calculate routes between points with distance, duration, and geometry (via OSRM)16- **Spatial Analysis**: Buffer, intersection, union, distance calculations17- **File I/O**: Read/write Shapefiles, GeoJSON, GeoPackage18- **CRS Transformation**: Convert between coordinate reference systems1920## Installation2122```bash23# From PyPI (when published)24pip install locusync-server2526# From source27git clone https://github.com/matbel91765/locusync-server.git28cd locusync-server29pip install -e .30```3132## Quick Start3334### With Claude Desktop3536Add to your `claude_desktop_config.json`:3738```json39{40 "mcpServers": {41 "locusync": {42 "command": "uvx",43 "args": ["locusync-server"]44 }45 }46}47```4849### Direct Usage5051```bash52# Run the server53locusync-server54```5556## Available Tools5758### Geocoding5960#### `geocode`61Convert an address to coordinates.6263```64Input: "1600 Pennsylvania Avenue, Washington DC"65Output: {lat: 38.8977, lon: -77.0365, display_name: "White House..."}66```6768#### `reverse_geocode`69Convert coordinates to an address.7071```72Input: lat=48.8566, lon=2.352273Output: {display_name: "Paris, Île-de-France, France", ...}74```7576#### `batch_geocode`77Geocode multiple addresses at once (max 10).7879```80Input: addresses=["Paris, France", "London, UK", "Berlin, Germany"]81Output: {results: [...], summary: {total: 3, successful: 3, failed: 0}}82```8384### Elevation8586#### `get_elevation`87Get altitude for a point.8889```90Input: lat=48.8566, lon=2.352291Output: {elevation_m: 35, location: {lat: 48.8566, lon: 2.3522}}92```9394#### `get_elevation_profile`95Get elevations along a path.9697```98Input: coordinates=[[2.3522, 48.8566], [2.2945, 48.8584]]99Output: {profile: [...], stats: {min: 28, max: 42, gain: 14}}100```101102### Geometry103104#### `distance`105Calculate distance between two points.106107```108Input: lat1=48.8566, lon1=2.3522, lat2=51.5074, lon2=-0.1278109Output: {distance: {meters: 343556, kilometers: 343.56, miles: 213.47}}110```111112#### `buffer`113Create a buffer zone around a geometry.114115```116Input: geometry={type: "Point", coordinates: [2.3522, 48.8566]}, distance_meters=1000117Output: {geometry: {type: "Polygon", ...}, area_km2: 3.14}118```119120#### `spatial_query`121Perform spatial operations (intersection, union, contains, within, etc.).122123```124Input: geometry1={...}, geometry2={...}, operation="intersection"125Output: {geometry: {...}}126```127128#### `transform_crs`129Transform coordinates between CRS.130131```132Input: geometry={...}, source_crs="EPSG:4326", target_crs="EPSG:3857"133Output: {geometry: {...}}134```135136### Routing137138#### `route`139Calculate route between two points.140141```142Input: start_lat=48.8566, start_lon=2.3522, end_lat=48.8606, end_lon=2.3376143Output: {distance: {...}, duration: {...}, geometry: {...}, steps: [...]}144```145146#### `isochrone`147Calculate area reachable within a time limit.148149```150Input: lat=48.8566, lon=2.3522, time_minutes=15, profile="driving"151Output: {geometry: {type: "Polygon", ...}}152```153154### Files155156#### `read_file`157Read geospatial files (Shapefile, GeoJSON, GeoPackage).158159```160Input: file_path="data/cities.shp"161Output: {type: "FeatureCollection", features: [...]}162```163164#### `write_file`165Write features to geospatial files.166167```168Input: features={...}, file_path="output.geojson", driver="GeoJSON"169Output: {file_path: "...", feature_count: 10}170```171172## Configuration173174Environment variables:175176| Variable | Default | Description |177|----------|---------|-------------|178| `NOMINATIM_URL` | `https://nominatim.openstreetmap.org` | Nominatim API URL |179| `NOMINATIM_USER_AGENT` | `locusync-server/1.0.0` | User agent for Nominatim |180| `OSRM_URL` | `https://router.project-osrm.org` | OSRM API URL |181| `OSRM_PROFILE` | `driving` | Default routing profile |182| `PELIAS_URL` | (empty) | Pelias geocoding API URL |183| `PELIAS_API_KEY` | (empty) | Pelias API key (optional) |184| `OPEN_ELEVATION_URL` | `https://api.open-elevation.com` | Open-Elevation API URL |185| `GIS_DEFAULT_CRS` | `EPSG:4326` | Default CRS |186| `GIS_TEMP_DIR` | `/tmp/locusync` | Temporary directory |187188## Response Format189190All tools return a consistent JSON structure:191192```json193{194 "success": true,195 "data": { ... },196 "metadata": {197 "source": "nominatim",198 "confidence": 0.95199 },200 "error": null201}202```203204## Rate Limits205206- **Nominatim**: 1 request/second (enforced automatically)207- **OSRM Demo**: Best effort, consider self-hosting for production208209## Development210211```bash212# Install dev dependencies213pip install -e ".[dev]"214215# Run tests216pytest217218# Run with coverage219pytest --cov=src/locusync --cov-report=html220221# Type checking222mypy src/locusync223224# Linting225ruff check src/locusync226```227228## Architecture229230```231src/locusync/232├── server.py # MCP server entry point233├── config.py # Configuration management234├── utils.py # Common utilities235└── tools/236 ├── geocoding.py # geocode, reverse_geocode, batch_geocode237 ├── elevation.py # get_elevation, get_elevation_profile238 ├── routing.py # route, isochrone239 ├── geometry.py # buffer, distance, spatial_query, transform_crs240 └── files.py # read_file, write_file241```242243## License244245MIT License - see [LICENSE](LICENSE) for details.246247## Contributing248249Contributions welcome! Please read the contributing guidelines before submitting PRs.250251## Roadmap252253- [x] Pelias geocoding support (higher accuracy)254- [x] Elevation/terrain data255- [x] Batch geocoding256- [ ] Valhalla routing integration (native isochrones)257- [ ] PostGIS spatial queries258- [ ] Real-time traffic data259- [ ] ESRI FileGDB full support260
Full transparency — inspect the skill content before installing.