This example uses your preferred MCP client to interact with MCP for ArcGIS Location Services through natural language prompts. You will geocode addresses, generate point to point routes, retrieve elevation information, and create a static map showing the route.

Prerequisites

Your MCP client must be properly configured to access MCP for ArcGIS Location Services. For setup instructions, go to Get started.

Examples

Geocode addresses and find the elevation of addresses

Ask the agent:

Find the coordinates and elevation for these locations in Switzerland:
- Bahnhofstrasse, Zürich
- Interlaken Ost railway station
- Lauterbrunnen railway station
- Grindelwald railway station
- Jungfraujoch (Top of Europe railway station)
- Zermatt railway station

The agent should:

  • Geocode each location into latitude and longitude
  • Resolve place names to the correct Swiss landmark or transit station when ambiguous
  • Retrieve elevation for each geocoded coordinate (in meters above sea level)

Geocode addresses and get walking directions

Ask the agent:

I want to walk from Bahnhofstrasse, Zürich to Zürichhorn Park.

The agent should:

  • Geocode both place names first and return their coordinates
  • Generate a walking route between the two coordinates
  • Provide step-by-step walking directions

Generate a static map with a route and find the elevation values

Ask the agent:

Starting in Interlaken, plan the most scenic route through Lauterbrunnen, Grindelwald, and Jungfraujoch. Include the elevation for each stop and generate a static map of the full route.

The agent should:

  • Geocode the coordinates of each stop
  • Generate a route between the stops and return directions, distance, and drive time
  • Simplify points as needed to meet tool input requirements
  • Generate a static map PNG with the route visualized as a polyline and labeled start and end points
  • Include elevation values for each stop along the route