• LOGISTICS
  • COSTS
  • GEO
  • HUMAN

How to calculate delivery distances with your AI

Connect the Haversine Distance Engine once to give your agent the ability to run precise geographic math on any set of coordinates.

Ask AI about this page

Short answer

How can I use AI to find delivery distances?

Your agent uses the Haversine formula to calculate the great-circle distance between two points using latitude and longitude. This lets you automate distance checks for logistics and routing. You'll see how the math works below.

Where your data goes

The results of your calculations

The AI processes your coordinates and maps out these specific outcomes.

LOGISTICS

Route planning data

The AI calculates the distance between your warehouse and customer locations. You get the exact mileage needed for scheduling.

COSTS

Fuel and time estimates

By knowing the distance, your agent can estimate fuel consumption and transit times. This helps you set accurate delivery fees.

GEO

Coordinate validation

The agent checks the mathematical validity of the latitude and longitude pairs you provide. It ensures the math is sound before you commit to a route.

HUMAN

Manual route review

The AI provides the raw distance numbers, but you decide which routes are actually drivable. You handle the final decision based on real-world road conditions.

The workflow

What your AI does when coordinates arrive.

The AI handles the heavy math so you don't have to manually calculate spherical geometry.

  1. Parse locations

    Your agent extracts latitude and longitude pairs from your spreadsheets, chat messages, or database exports.

    calculate_distance
  2. Run Haversine math

    The agent applies the Haversine formula to the coordinates to find the shortest distance over the Earth's surface.

    calculate_distance
  3. Compare distances

    The AI compares the calculated distances against your delivery radius or warehouse limits.

    calculate_distance
  4. Report results

    The agent summarizes the distances in a format you can use for your logistics logs or planning sheets.

    calculate_distance

Try it

Copy these to start.

Use these prompts to trigger the distance calculations immediately.

Starting points

Swap out the bracketed info for your actual data, like your specific CSV file or address list.

Haversine Engine Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_9HY5DGRNuTnVYKh6pT2quv71WB3YfM9cSRfriCCA/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Haversine Engine capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "haversine-distance-engine-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_9HY5DGRNuTnVYKh6pT2quv71WB3YfM9cSRfriCCA/mcp"
    }
  }
}
Copy into chat04
  • Calculate the distance between the warehouse at 40.7128, -74.0060 and the customer at 34.0522, -118.2437.

  • Check the distance for every coordinate pair in my 'deliveries.csv' file.

  • Find the distance between my central hub and these five customer locations: [list coordinates].

  • Compare the distance from the Seattle warehouse to the Portland customer versus the Tacoma customer.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Haversine Distance Engine once, then ask.

Just link the MCP to your preferred client. Your credentials stay encrypted, and you can start running math immediately.

Connect Haversine Distance Engine to your AI

FAQ

How the distance engine behaves

  • 01

    Does the AI calculate driving distance or straight-line distance?

    It calculates the great-circle distance, which is the shortest straight-line distance between two points on a sphere. It does not account for roads, traffic, or terrain.

  • 02

    Can the AI update my delivery database automatically?

    No. The AI can calculate the distances and provide them to you, but you must be the one to write those values into your database or software.

  • 03

    What happens if I provide invalid coordinates?

    The tool will fail to perform the math if the latitude or longitude values are out of range or formatted incorrectly.

  • 04

    Can the AI suggest the best driver for a route?

    No. This tool only handles geographic math. It does not have access to driver schedules, vehicle types, or driver performance data.

  • 05

    Do I need to provide the coordinates in a specific format?

    Yes, the agent needs decimal degrees for latitude and longitude to run the calculation correctly.

  • More questions about Haversine Distance Engine? The Connector page answers them. See everything the Haversine Distance Engine Connector can do

Connect Haversine Engine to Claude, Cursor, ChatGPT & more