LABSCO SUMMARY
Two services, one connection — and the base URL decides everything.
The value is in the pairing: geocoding alone gives you coordinates, routing alone needs coordinates you do not have, and together they answer the question people actually ask. Both sit behind the ai.model.base.url property, so pointing it at your own pgGeocoder and pgrServer deployment is the supported path for anything beyond trying it out. Address coverage is Japanese, which is the geocoder's scope rather than a limitation of this server.
What it is
A Java MCP server that fronts two open-source geospatial services: pgGeocoder for Japanese address geocoding, and pgrServer for routing. That combination lets a model turn addresses into coordinates and then ask what the drive between them looks like, in one conversation.
What you get
- Geocoding a Japanese address into coordinates
- Reverse geocoding a latitude and longitude pair back into address information
- Driving distance between two coordinates, from a Dijkstra shortest-path search
- The path itself, not just the distance, so a route can be described rather than only measured
- Chained questions in a single prompt — look up two store addresses, geocode both, then get the driving distance between them
Requirements
JDK 17 or newer, and the downloaded mcpLocation.jar. The client launches it with java -jar and a set of system properties: -Dspring.ai.mcp.server.stdio=true, -Dspring.main.web-application-type=none, an empty console logging pattern so the stdio channel stays clean, and -Dai.model.base.url pointing at the geocoding and routing host. Building from source is mvn clean install.
Setup effort
Follow the published steps — mvn clean install
USE CASES
01
Turning two addresses into a drive time question
Geocode both, then ask for the driving distance between the resulting coordinates.
02
Finding out where a coordinate pair actually is
Reverse geocode it and read back the address information.
03
Describing a route, not just its length
Get the path between two points rather than a single distance number.
04
Pointing it at your own deployment
Set the base URL property to your pgGeocoder and pgrServer instance instead of the sample host.
INSTALLATION
Connect your client
Server setup
TERMINAL
git clone https://github.com/mbasa/McpLocationService
cd McpLocationService
mvn clean installMCP Clients
Claude Desktop
CLAUDE DESKTOP · JSON
{
"mcpServers": {
"LocationServices": {
"command": "<YOUR_FULL_PATH>/java",
"args": [
"-Dspring.ai.mcp.server.stdio=true",
"-Dspring.main.web-application-type=none",
"-Dlogging.pattern.console=",
"-Dai.model.base.url=http://mb.georepublic.info",
"-jar",
"<YOUR_FULL_PATH>/mcpLocation.jar"
]
}
}
}