How to Geocode Addresses with Copilot

Geocode addresses in your IDE with Copilot and ToolRouter. Get coordinates without leaving your editor.

Tool
Address Geocoding icon
Address Geocoding

Copilot geocodes addresses and writes the coordinates directly into your source code or configuration files. Populate seed data for development environments, add office location constants to your app config, and generate coordinate fixtures for testing without copying values from external tools.

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 this address to get coordinates" and provide the address
  2. Copilot returns the lat/lng pair and parsed address fields
  3. Ask: "Add these coordinates as constants in my config file"

Example Prompt

Try this with Copilot using the Address Geocoding tool
Geocode our office address "350 Fifth Avenue, New York, NY 10118" so I can add the coordinates to the app config.

Tips

  • Copilot can write the geocoded coordinates directly into your source code or config files
  • Use it to populate seed data for development and testing environments