# TomTom Alternative MCP

> TomTom Alternative connects global mapping, geocoding, and advanced routing data directly to your AI agent. Find addresses using fuzzy search, convert physical locations into precise coordinates, calculate optimal multi-stop routes factoring in real-time traffic, and retrieve map tiles for visualization—all via simple tool calls.

## Overview
- **Category:** geocoding-maps
- **Price:** Free
- **Tags:** maps, routing, geocoding, navigation, location-services

## Description

Look, this server is your go-to for anything location-based. It connects global mapping data and advanced routing directly to your AI agent so you don't gotta mess with external API keys or write complex code blocks just to figure out where something is. When your agent needs to know about geography—whether it’s finding a spot, calculating a trip, or drawing a map—it uses the tools we built in here.

When you need to find an address or a Point of Interest (POI), you don't gotta be perfect with spelling. Your agent just calls `fuzzy_search`, and it figures out addresses even if they're misspelled or incomplete. That's real useful. If you already have a physical street address, like '123 Main St,' your agent uses the `geocode` tool to convert that text into precise latitude/longitude coordinates. This gives you actionable numbers ready for mapping or database storage.

For basic travel paths, calling `calculate_route` is quick and dirty: it figures out the fastest route between just two points—a start and an end. But if your trip's more complicated? Say, a multi-stop delivery run? You gotta use `calculate_advanced_route`. This handles complex logistics plans that involve multiple waypoints or require avoiding specific restricted zones. It models those big, messy transit plans for you.

Before it even plots the route, though, your agent checks what's happening on the actual roads. It calls `get_traffic_incidents` to pull in real-time data on traffic slowdowns, accidents, and current flow rates across an area. This feed tells the routing tools how accurate their time estimates are, making sure you don't plan a trip through gridlock. When it’s time to visualize all this stuff—the route, the stops, the traffic—your agent uses `get_map_tile`. You give it specific zoom levels and grid coordinates, and it returns the URL needed to display that exact map image (basic or hybrid style) right where you need it.

Here's how they work together. If your task is planning a major logistics run, your agent first uses `fuzzy_search` to confirm all those stop addresses. Next, it runs `geocode` on every single one of them to get precise coordinates. Then, it calls `get_traffic_incidents` for the whole area. Finally, it feeds that data into `calculate_advanced_route`, which spits out the optimal path, and then `get_map_tile` draws the final picture for you. It’s a full loop of location intelligence that runs clean through simple tool calls.

You'll use this server to resolve addresses, convert coordinates, calculate basic travel paths, plan multi-stop logistics routes, check real-time traffic conditions, and generate map images—all without leaving your AI agent's environment. It’s tight. You just let your agent talk naturally, and it handles the dirty work of mapping and routing.

## Tools

### calculate_advanced_route
Figures out optimal paths for complex trips, supporting multiple stops or avoiding specific restricted areas.

### calculate_route
Calculates a basic, fast route between two specified starting and ending points.

### geocode
Converts a textual address into precise, actionable geographic coordinates (lat/lon).

### get_map_tile
Returns the URL needed to display a map image for specific zoom levels and grid coordinates.

### fuzzy_search
Performs quick searches for addresses or Points of Interest (POIs) even if the input text is misspelled or incomplete.

### get_traffic_incidents
Retrieves current data on traffic slowdowns, accidents, and flow rates in an area.

## Prompt Examples

**Prompt:** 
```
Search for 'Eiffel Tower' in Paris using fuzzy search.
```

**Response:** 
```
I found the Eiffel Tower at Champ de Mars, 5 Av. Anatole France, 75007 Paris, France. Coordinates: 48.8584, 2.2945.
```

**Prompt:** 
```
Calculate a car route from 52.509,13.429 to 52.502,13.438.
```

**Response:** 
```
The fastest route by car is approximately 1.2km and will take about 4 minutes with current traffic conditions.
```

**Prompt:** 
```
Get a basic map tile URL for zoom level 15 at x=17600, y=10700.
```

**Response:** 
```
Here is the URL for the requested map tile: https://api.tomtom.com/map/1/tile/basic/main/15/17600/10700.png?key=YOUR_API_KEY
```

## Capabilities

### Resolve addresses
Search for street names and points of interest using flexible, partial text matches.

### Convert addresses to coordinates
Turn a physical address into precise latitude and longitude pairs (geocoding).

### Calculate basic travel paths
Determine the fastest route between two specific points.

### Plan multi-stop logistics routes
Model complex delivery or transit plans that involve multiple waypoints and advanced constraints.

### Integrate real-time traffic data
Check current road conditions, including incidents and flow metrics, to adjust route timing.

### Generate map images
Fetch the URL for a specific map tile image (basic or hybrid style) at given coordinates.

## Use Cases

### The Dispatcher Needs Multi-Stop Planning
A fleet manager needs to plan 15 stops across three counties. Instead of running 14 separate A-to-B calculations, the agent uses `calculate_advanced_route`. It handles the entire sequence, optimizes for minimum travel time, and builds a single itinerary, saving hours of manual computation.

### Validating New Store Locations
A developer needs to check if 50 potential addresses are valid and get their coordinates. They pipe the list into `geocode`. The agent returns structured latitude/longitude pairs, which can immediately feed into a database or map rendering tool without manual cleanup.

### Real-Time Navigation Support
A user asks for directions during rush hour. The agent first calls `get_traffic_incidents` to check current flow and then runs `calculate_route`. The result isn't just the distance; it's a time estimate adjusted by the real-time congestion data.

### Generating an Interactive Map Report
A client needs a map showing three locations (origins/destinations). The agent runs `geocode` for all points, and then uses `get_map_tile` with the resulting coordinates to generate a single, embeddable map image URL for their report.

## Benefits

- **Accurate Address Resolution:** Use `fuzzy_search` to find locations when users only remember part of an address or misspells a street name. This prevents dead ends in your workflow, ensuring the agent always gets a usable starting point.
- **Dynamic Route Optimization:** Don't just calculate A-to-B travel time. Combine `calculate_route` with `get_traffic_incidents` to give users an estimate that reflects current road conditions—it’s not guesswork.
- **Complex Logistics Handling:** For deliveries involving 10+ stops, use `calculate_advanced_route`. This tool handles the multi-stop logic and specific constraints (like avoiding country vignettes) far better than simple A-to-B tools.
- **Visualization on Demand:** Instead of just getting coordinates, use `get_map_tile` to pull a map image URL. Your agent can then present not only the route data but also a visual representation in one step.
- **Precise Data Foundation:** The `geocode` tool ensures that whatever input—from an address string or a user's rough coordinates—gets converted into verifiable, clean geographic points for any backend process.

## How It Works

The bottom line is that it lets your agent access complex mapping logic without you having to write any underlying API calls.

1. First, subscribe to the TomTom Alternative MCP Server and provide your API Key in the client configuration.
2. Next, prompt your AI agent with a request (e.g., 'What's the best route from X to Y?'). The agent selects the necessary tools (`geocode`, `get_traffic_incidents`, etc.).
3. Finally, the server executes the tool sequence and returns structured data—coordinates, routes, or map URLs—to your AI client for final display.

## Frequently Asked Questions

**How do I use the fuzzy_search tool with TomTom Alternative?**
Use `fuzzy_search` when you don't have an exact address or POI name. Just input a partial description, and the tool finds the best match for addresses or points of interest.

**Does calculate_advanced_route handle traffic?**
Yes. `calculate_advanced_route` supports integrating real-time data. It combines inputs from tools like `get_traffic_incidents` to provide optimized paths based on current road conditions.

**What is the difference between calculate_route and calculate_advanced_route?**
`calculate_route` handles simple A-to-B journeys. Use `calculate_advanced_route` when you need more control—like specifying multiple required stops or telling the route to avoid certain areas.

**Can I use get_map_tile without coordinates?**
No. The `get_map_tile` tool requires specific zoom levels and X/Y tile coordinates (the XYZ grid system) to generate the map image URL. You must provide those parameters.

**How do I handle authentication for the `geocode` tool?**
You must provide a valid TomTom API Key when making calls. Your AI client handles passing this key securely, so you don't need to manage it directly in your prompts.

**What happens if I get too many requests using `get_traffic_incidents`?**
If you exceed the API rate limit, you will receive a 429 error. Implement exponential backoff in your agent workflow to automatically retry the request later.

**Does `calculate_route` support specifying vehicle types?**
No, the standard `calculate_route` function only calculates basic travel times between two points. For specialized profiles like trucks or bicycles, use the `calculate_advanced_route` tool instead.

**Can I get map tiles for a specific region using `get_map_tile`?**
Yes, you specify the desired geographical area by providing the X and Y coordinates along with your target zoom level. The tile URL format requires these three parameters.

**Can I search for a place using just a name like 'Coffee Shop'?**
Yes! Use the `fuzzy_search` tool. It allows you to search for points of interest, streets, and addresses using free-text queries.

**Does the routing tool take real-time traffic into account?**
Yes, by default the `calculate_route` tool uses real-time traffic data to provide the most accurate travel times and paths.

**How can I get the latitude and longitude for a specific address?**
You can use the `geocode` tool. Simply provide the address string, and it will return the geographic coordinates.