---
title: ToolRouter — Agent Use Case Guide
description: Step-by-step guide for completing a task with a specific AI agent using ToolRouter.
url: https://toolrouter.com/tools/address-geocoding/use-cases/geocode-addresses-to-coordinates/copilot
---
# How to Geocode Addresses with Copilot

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.

## Setup

{"mcpServers":{"toolrouter":{"command":"npx","args":["-y","toolrouter-mcp"]}}}

## Steps

1. Add ToolRouter to Copilot MCP config
2. In Copilot Chat: "Geocode this address to get coordinates" and provide the address
3. Copilot returns the lat/lng pair and parsed address fields
4. Ask: "Add these coordinates as constants in my config file"

## Example Prompt

```
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
