Skip to main content

MCP server for Grandline — empirical maritime distances + port lookups for LLM agents.

Project description

grandline-mcp

mcp-name: io.github.luzomi/grandline-mcp

PyPI Python

MCP server that gives Claude / Cursor / any MCP-capable LLM access to the Grandline maritime distance API — empirical sea distances derived from real AIS vessel tracks, four route variants (primary / via-Suez / via-Panama / via-Cape), 43M cached port-pair distances.

Install

pip install grandline-mcp

Use with Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "grandline": {
      "command": "grandline-mcp",
      "env": {
        "GRANDLINE_API_KEY": "gl_live_…"   // from grandline.luzomi.com/signup; omit for anonymous tier
      }
    }
  }
}

Restart Claude Desktop. Ask: "What's the empirical sea distance from Sabine Pass to Yokohama via Panama?" — Claude will call the right tools.

Tools exposed

Tool What it does
port_lookup Resolve a port name, UN-LOCODE, or lat/lon string into a canonical port record.
nearest_ports Return the N nearest cataloged ports to a lat/lon coordinate.
find_route Empirical sea distance between two ports for one of four route variants.
compare_routes All four variants side-by-side with canal transits and steaming days.
compare_route_matrix Bulk M×N grid — every origin × every destination in one call (fleet / rate-card scale).

Example: bulk matrix

"Build a distance matrix from our load ports [11910, 13557] to discharge ports [9511, 12434]."

Claude calls compare_route_matrix(origins=[11910, 13557], destinations=[9511, 12434]) and gets all four cells back at once — each with distance_nm, the variant used, and an availability flag (available / estimated / route_not_in_cache). A 12×30 matrix is one call instead of 360 round-trips.

Configuration

Env var Default Purpose
GRANDLINE_API_URL https://grandline.luzomi.com/api/v1 Override the base URL (e.g. for self-hosted).
GRANDLINE_API_KEY (unset) Bearer token from signup; without it you're on the anonymous tier (5 calls total per IP).
GRANDLINE_LOG_LEVEL WARNING Verbosity. Logs go to stderr so they don't corrupt the stdio protocol stream.

Status

Beta (v0.2.0). The HTTP backend is stable and five tools are exposed. Tool descriptions are tuned for LLM-friendliness; compare_route_matrix is the newest addition.

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grandline_mcp-0.2.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grandline_mcp-0.2.2-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file grandline_mcp-0.2.2.tar.gz.

File metadata

  • Download URL: grandline_mcp-0.2.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for grandline_mcp-0.2.2.tar.gz
Algorithm Hash digest
SHA256 9e2c0867173ce84c7d067a8b49c92f7aa265cadc2a87df1826eefc1a42dbb700
MD5 24fe5cf0fad0e08da9de50e0dd4fbee6
BLAKE2b-256 8842649a1135ae06141c427a40354a2efd4ca7480b36cce15fc2497804c45040

See more details on using hashes here.

File details

Details for the file grandline_mcp-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: grandline_mcp-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for grandline_mcp-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2de158797b903eb4c180cd262b9d3660868a3ff57ba5307d71a8a88357e21d1e
MD5 30b90b834cbcc115a9acb40fcadbc300
BLAKE2b-256 a2b1acad080cd8563dfe1da79e76cc37a7572f9d83dbeb943ba13c890a2f8064

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page