This project is a simple MCP (Model Context Protocol) server that integrates with the Google Maps Geocoding API and Routes API to compute directions between two addresses.
You can find all the details and the story behind it in my blog post: Building My First MCP Server: A Practical Guide with Google Routes API
- MCP server with Model Context Protocol
- Accepts origin and destination addresses
- Uses Google Geocoding API to get coordinates
- Computes routes with Google Routes API
- Supports travel mode, routing preference, units, and alternative routes
{
"mcpServers": {
"google-routes-api": {
"command": "npx",
"args": [
"ts-node",
"[path to the local repo]/src/server.ts"
],
"env": {
"GOOGLE_MAPS_API_KEY": "[your api key]"
}
}
}
}