eKerney/esri-mcp
If you are the rightful owner of esri-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
An MCP server for querying and visualizing data from the Esri Living Atlas, focusing on water resources and mapping.
Esri MCP Server
An MCP (Model Context Protocol) server for querying and visualizing data from the Esri Living Atlas, with a focus on water resources and mapping.
Features
- Query various Esri Living Atlas layers including:
- Administrative: states, counties
- Water resources: USGS gages, rivers, dams, watersheds, impaired waters, water quality stations
- Environmental monitoring: weather stations, RAWS stations, seismic stations, CORS stations, storm reports
- Generate interactive ArcGIS JS Maps SDK applications
- Create comprehensive water context maps with multiple layers
- Support for spatial filters and geometry queries
- Web-based frontend with AI-powered query interface
Tools
query_layer
: Query feature layers with custom filtersquery_point_layer
: Query point data layers (USGS gages, water quality, weather stations, etc.)get_layer_fields
: Get field information for layersget_state_geometry
: Retrieve state boundariesquery_geojson
: Query layers and return GeoJSONsave_geojson
: Save GeoJSON to filedisplay_geojson
: Visualize GeoJSON in browsercreate_arcgis_app
: Generate simple ArcGIS mapscreate_arcgis_app_with_rivers
: Maps with rivers overlaycreate_water_map_context
: Full water resource mapscreate_embeddable_water_map
: Embeddable water maps for states
Installation
- Clone the repo
- Install Python dependencies:
pip install fastmcp requests
- Install Node.js dependencies for frontend:
cd frontend && npm install
- Run the MCP server:
python main.py --http
- In another terminal, run the frontend:
cd frontend && npm run dev
Usage
MCP Server
Start the server: python main.py --http
Connect via MCP clients or use the provided scripts in scripts/
.
Frontend
Start the frontend: cd frontend && npm run dev
Open http://localhost:5174 to access the web interface with AI-powered queries.
Command-line Client
Use clients.py
for command-line interaction:
# List available tools
python clients.py list-tools
# Call a tool
python clients.py call-tool query_layer layer_name usgs-gauges where "state = 'MI'"
See scripts/
for additional example usage.
Repository Structure
main.py
: Main MCP server with Esri Living Atlas toolsfrontend/
: React frontend with MCP client and AI interfacescripts/
: Test and helper scripts for various queriesclients.py
: Command-line MCP client.gitignore
: Ignores generated files
License
MIT