Integration

GraphHopper Directions API integration

GraphHopper is a hosted routing and logistics API built on OpenStreetMap data. Calculate A-to-B routes with turn-by-turn instructions for car, truck, scooter, bike, foot and other vehicle profiles, compute travel time and distance matrices between many origins and destinations, draw isochrones (the area reachable within a time or distance), geocode and reverse geocode addresses, solve vehicle routing and traveling salesman problems with time windows and capacities, cluster customers into balanced groups, and manage custom routing profiles. Large matrix, route optimization, clustering and profile jobs can also be submitted as background jobs whose result is fetched later by job id. Map matching of GPX tracks is not included, because it requires an XML file body. Authentication is an API key sent as the key query parameter.

Ask it in chat

Say what should happen.
The workflow builds itself.

When this happens, do that in GraphHopper Directions API.Built from the 19 GraphHopper Directions API tools below, on the connection you add once.

What you can do with GraphHopper Directions API

Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.

Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.

Profile, 3 operations

  • create_profileCreate profilePOSTCreates a custom routing profile: a built-in profile (such as car) modified by a custom_model (for example avoiding motorways or certain areas) and limited to bounds (a bbox rectangle or GeoJSON polygons).
  • delete_profileDelete profileDELETEDeletes one of your custom routing profiles by its id.
  • list_profilesList profilesGETLists the custom routing profiles of your account, each with its id (starts with cp_, usable as the profile of routing, matrix and route optimization calls), the built-in profile it is based on, its bounds and its custom_model.

Clustering job, 2 operations

  • get_clustering_solutionGet clustering solutionGETReturns the state of a clustering job submitted with submit_clustering_job: its status, and once finished the clusters with their quantity and the ids of their customers. While the job is still waiting or processing, call again later.
  • submit_clustering_jobSubmit clustering jobPOSTSubmits a clustering problem as a background job, for problems that take longer than about 10 seconds with solve_clustering. Takes the same body and returns only a job_id; read the solution with get_clustering_solution until its status is finished.

Matrix, 2 operations

  • calculate_matrixCalculate matrixPOSTComputes a matrix of travel times (seconds), distances (meters) or weights from a JSON body: either points (every point is both origin and destination) or from_points plus to_points. Coordinates are [longitude, latitude] pairs.
  • get_matrixGet matrixGETComputes a matrix of travel times (seconds), distances (meters) or weights between origins and destinations given as latitude,longitude strings: either one point list where every point is both origin and destination.

Matrix job, 2 operations

  • get_matrix_solutionGet matrix solutionGETReturns the state of a matrix job submitted with submit_matrix_job. While status is not finished, call again later; once finished, solution carries the requested times, distances or weights matrices.
  • submit_matrix_jobSubmit matrix jobPOSTSubmits a large matrix computation as a background job, for requests that would time out on calculate_matrix. Takes the same body and returns only a job_id; read the result with get_matrix_solution until its status is finished.

Profile job, 2 operations

  • get_profile_solutionGet profile solutionGETReturns the state of a profile creation job submitted with submit_profile_job. Once status is finished, solution carries the created profile and its id (starts with cp_); while it is still processing, call again later.
  • submit_profile_jobSubmit profile jobPOSTSubmits the creation of a custom routing profile as a background job, for a large area that would time out with create_profile. Takes the same body and returns only a job_id; read the result with get_profile_solution until its status is finished.

Route, 2 operations

  • calculate_routeCalculate routePOSTCalculates a route from a JSON body, the recommended form for many points and the only one that accepts a custom_model (vehicle constraints such as height or weight, avoiding or excluding areas or road classes).
  • get_routeGet routeGETCalculates a route between two or more points given as latitude,longitude pairs, with total distance (meters), travel time (milliseconds), the route geometry and turn-by-turn instructions.

Route optimization job, 2 operations

  • get_route_optimization_solutionGet route optimization solutionGETReturns the state of a route optimization job submitted with submit_route_optimization_job.
  • submit_route_optimization_jobSubmit route optimization jobPOSTSubmits a vehicle routing problem as a background job, for problems too large to solve within about 10 seconds with solve_route_optimization.

Address, 1 operation

  • geocodeGeocodeGETConverts an address or place name into coordinates (forward geocoding, set q), or coordinates into nearby addresses and places (reverse geocoding, set reverse to true and point, without q).

Clustering, 1 operation

  • solve_clusteringSolve clusteringPOSTGroups customers into clusters, for example to split a delivery area into balanced territories.

Isochrone, 1 operation

  • calculate_isochroneCalculate isochroneGETComputes an isochrone: the polygon of everything reachable from a point within a travel time (time_limit, seconds, default 600) or a distance (distance_limit, meters) for a given profile.

Route optimization, 1 operation

  • solve_route_optimizationSolve route optimizationPOSTSolves a vehicle routing problem (also traveling salesman, pickup and delivery) and returns the optimized routes directly: which vehicle visits which services or shipments, in what order, with arrival and departure times, distances.

Use GraphHopper Directions API from Claude Code, Cursor or Codex

Connect GraphHopper Directions API in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its GraphHopper Directions API operations become tools the client can call, next to every other integration you connected.

Claude Code
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"
Codex (~/.codex/config.toml)
[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"

[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"
Cursor, Claude Desktop and other JSON configs
{
  "mcpServers": {
    "livecontext": {
      "type": "http",
      "url": "https://livecontext.ai/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Set up the MCP server step by step

How to connect GraphHopper Directions API

  1. Create your workspace

    Sign up free. Nothing to install.

  2. Connect GraphHopper Directions API once

    Add your GraphHopper Directions API connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.

  3. Describe the job in chat

    The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.

GraphHopper Directions API integration FAQ

What can you do with the GraphHopper Directions API integration?

LiveContext exposes 19 operations on GraphHopper Directions API, covering profile, clustering job, matrix and matrix job.

Popular integrations

Browse the whole catalog