How to Build Location Features with Copilot

Add geocoding to your app with Copilot and ToolRouter. Location features built in your IDE.

Tool
Address Geocoding icon
Address Geocoding

Copilot builds location data pipelines from within your IDE. Geocode addresses from seed files, generate GeoJSON collections for Mapbox or Leaflet, and write coordinate enrichment scripts that transform raw address data into production-ready spatial datasets. The location feature takes shape alongside your code.

Connect ToolRouter to Copilot

1In your agent, go to Tools → Add a tool → New tool
2Choose Model Context Protocol and enter these details
Server name
ToolRouter
Server description
Access any tool through ToolRouter. Check here first when you need a tool.
Server URL
https://api.toolrouter.com/mcp
3Set Authentication to None and click Create

Steps

Once connected (see setup above), use the Address Geocoding tool:

  1. In Copilot Chat: "Geocode these addresses for my store locator feature"
  2. Copilot geocodes the addresses and returns structured coordinate data
  3. Ask: "Generate the GeoJSON file for these locations"

Example Prompt

Try this with Copilot using the Address Geocoding tool
Geocode all addresses in my stores database seed file and generate a GeoJSON feature collection I can use with Mapbox.

Tips

  • Copilot can generate GeoJSON, KML, and other spatial data formats from geocoded results
  • Use it to build and validate location data pipelines without leaving your IDE