New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@searoute-ts/mcp

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@searoute-ts/mcp

Model Context Protocol server exposing searoute-ts sea-route tools (sea_route, sea_route_alternatives) to AI agents.

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
181
376.32%
Maintainers
1
Weekly downloads
 
Created
Source

@searoute-ts/mcp

npm version license

A Model Context Protocol server that exposes searoute-ts to AI agents, so they can compute real shortest sea routes ("how far is Shanghai to Rotterdam by sea, avoiding Suez?") instead of guessing.

It's a thin wrapper over the searoute-ts public API — no new routing logic — and accepts UN/LOCODE port codes (e.g. CNSHA) as well as [lon, lat] coordinates.

Tools

sea_route

Shortest maritime route between two points. Returns distance, optional duration, the canals/straits traversed, detour ratio, and the route GeoJSON.

ArgumentTypeNotes
origin, destinationport code string or [lon, lat]required
units"nauticalmiles" | "kilometers" | "miles"default nauticalmiles
restrictionspassage name arraye.g. ["suez","babelmandeb"] to force Cape of Good Hope
allowArcticbooleanallow the (default-blocked) Northwest/Northeast Passages
speedKnotsnumberfills an estimated duration in hours
vesselDraftMetersnumberauto-avoids canals too shallow for the vessel
maxSnapDistanceKmnumberreject inputs too far from the sea network
includeGeometrybooleaninclude the route GeoJSON (default true)

sea_route_alternatives

Up to k distinct alternatives, each blocking a different combination of major canals/straits (baseline vs. no-Suez vs. no-Panama …), sorted by distance — useful for comparing "via Suez" against "via Cape of Good Hope".

Install & run

npm install -g @searoute-ts/mcp   # or use npx, below

The server speaks MCP over stdio.

Claude Code / claude CLI

claude mcp add searoute -- npx -y @searoute-ts/mcp

Claude Desktop / generic MCP client config

{
  "mcpServers": {
    "searoute": {
      "command": "npx",
      "args": ["-y", "@searoute-ts/mcp"]
    }
  }
}

Example

"What's the sea distance from Shanghai to Rotterdam, and how much longer is it if we avoid the Suez Canal?"

The agent calls sea_route('CNSHA', 'NLRTM') (≈ 19,753 km via Suez) and sea_route('CNSHA', 'NLRTM', { restrictions: ['suez', 'babelmandeb'] }) (≈ 25,315 km via the Cape of Good Hope).

Develop

npm install
npm run build     # tsc -> dist/
npm test          # vitest — exercises the tool handlers
npm run dev       # run from source with tsx

License

MIT — see the root repository.

Keywords

mcp

FAQs

Package last updated on 16 Sep 2026

Related posts