# NavAPI MCP

> NavAPI MCP Server manages global maritime navigation data. Your AI agent uses this server to audit ports, calculate nautical distances between any two locations, and pull real-time vessel traffic statistics for specific harbors. It's built for logistics professionals who need precise, up-to-date shipping intelligence without opening a single technical portal.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** maritime-data, port-data, navigation-routes, vessel-tracking, logistics-intelligence

## Description

You connect this server to your agent when you need serious maritime logistics data. Forget opening a dozen different external portals; your AI client handles all the heavy lifting right here. This is built for people who actually run shipping and port operations, needing fast, precise intelligence without having to talk API JSON to your tech team.

The core tools let your agent function like a global nautical consultant. You'll use these capabilities:

**Validating the Connection**
*   You can check service status instantly using `check_api_status`. This confirms if the entire NavAPI server is online and ready to process any requests, so you never waste time trying to run queries against a downed endpoint.

**Locating Ports Worldwide**
*   To find global ports, your agent runs `get_nautical_ports`, which pulls detailed metadata for every maritime port in the world. You can refine this search by specifying a country code, limiting your results right away so you only see relevant locations.

**Calculating Sea Distance Between Ports**
*   If you need to know how far apart two ports are, `get_port_distance` calculates that nautical distance for you. It accepts either the specific Port IDs or the precise coordinates of both starting and ending points, giving you the exact sea mileage between them.

**Tracking Real-Time Harbor Activity**
*   To get a current snapshot of what's happening at a single harbor, your agent uses `get_port_vessel_traffic`. This tool retrieves real-time statistics on vessels currently docked or passing through that named port. It tracks vessel types and provides counts so you know the current industry distribution immediately.

**Planning Complex Shipping Routes**
*   When you need a full itinerary, your agent executes `search_maritime_routes`. This function searches for potential shipping paths, outlining connections between two or more defined ports into one cohesive set of routes. It's what you use when planning multi-stop transoceanic hauls.

**Listing Required Navigation Charts**
*   Before any route is finalized, you need to check the local rules and maps. `list_nautical_charts` helps with that; it lists every required nautical chart available for a specific geographic area. This function is key for compliance checks, ensuring your crew has access to all the necessary navigational diagrams.

Your agent handles calling these functions using natural language commands—you don't have to write code. Whether you need port metadata, distance measurements, real-time traffic counts, or a full multi-port route outline, it processes everything in one conversation thread.

## Tools

### check_api_status
Verifies if the entire NavAPI service is currently operational and responding to requests.

### get_port_distance
Calculates the nautical distance between two defined ports using their IDs or coordinates.

### get_nautical_ports
Lists global maritime ports, optionally filtering the results by a specific country.

### get_port_vessel_traffic
Retrieves current vessel traffic statistics and counts for a specific, named port.

### list_nautical_charts
Lists the required nautical charts available for planning navigation within a specified geographic area.

### search_maritime_routes
Searches and outlines potential shipping routes connecting two or more defined ports.

## Prompt Examples

**Prompt:** 
```
Search for ports in 'Singapore' using NavAPI.
```

**Response:** 
```
I've retrieved the ports for Singapore! The primary entry is the Port of Singapore (ID: SGSIN). Would you like to see the current vessel traffic or the available nautical charts for this region?
```

**Prompt:** 
```
Calculate the nautical distance between 'SGSIN' (Singapore) and 'NLRTM' (Rotterdam).
```

**Response:** 
```
The nautical distance between Singapore and Rotterdam is approximately 8,300 NM via the Suez Canal. I can assist you with more route auditing if needed.
```

**Prompt:** 
```
What is the current traffic at the Port of Shanghai (CNSHA)?
```

**Response:** 
```
I've retrieved the real-time traffic for Shanghai! There are currently over 200 vessels identified in the port area. Notable categories include container ships and bulk carriers. I can provide the breakdown by vessel type if you'd like.
```

## Capabilities

### Locate global ports
Retrieves detailed metadata for maritime ports worldwide, allowing filtering by country.

### Calculate nautical distance
Determines the sea distance between any two specified port coordinates or IDs.

### Track real-time vessel traffic
Pulls current statistics on vessels at a specific harbor, noting vessel types and counts.

### Plan shipping routes
Searches for defined maritime paths and connections between two or more ports.

### Check chart availability
Lists all nautical charts available for a specific geographic region, aiding compliance checks.

### Validate service status
Confirms that the entire NavAPI server is operational and ready to accept requests.

## Use Cases

### Planning a new cross-ocean route
A trade researcher needs to plan a path from Singapore to Rotterdam. They ask the agent, and it first uses `get_nautical_ports` to confirm port IDs, then calls `search_maritime_routes`, finally using `get_port_distance` to give them the total route length.

### Investigating unexpected congestion
A ship operator hears about delays in Shanghai. They ask their agent for traffic data, and the agent immediately runs `get_port_vessel_traffic`. The result shows 250+ vessels, confirming severe backlogs.

### Auditing a regional port cluster
A logistics analyst needs to check several ports in Vietnam. They use `get_nautical_ports` with the country filter, then loop through the results using `get_port_distance` for each pair to map out all local connections.

### Verifying operational readiness
Before a major deployment, an ops lead needs confirmation that the data sources are current. They start by running `check_api_status`, and if successful, they move on to checking chart availability using `list_nautical_charts`.

## Benefits

- Pinpoint exact distances instantly. Stop relying on estimates; `get_port_distance` calculates the true nautical miles between any two ports for precise planning.
- Get real-time traffic visibility using `get_port_vessel_traffic`. You immediately see if a port is congested or clear, which changes your entire operational timeline.
- Streamline data gathering with one chat. Instead of jumping between portals to check locations and routes, let the agent handle everything by chaining calls like `get_nautical_ports` then `search_maritime_routes`.
- Ensure compliance upfront. Use `list_nautical_charts` to verify that the necessary navigational charts exist for a given area before you plan any movement.
- Build robust workflows around status checks. Always run `check_api_status` first. This prevents your agent from wasting time on tools that are down or failing.

## How It Works

The bottom line is that your AI client executes complex, multi-step maritime queries in a single chat session.

1. Subscribe to this server on Vinkius and provide your API key.
2. Tell your AI client what you need (e.g., 'What's the distance between Shanghai and Rotterdam?').
3. The agent runs `get_port_distance` using NavAPI, returning the precise nautical measurement.

## Frequently Asked Questions

**How do I use get_port_distance with NavAPI?**
You must provide the IDs or coordinates for two specific ports. The tool calculates the precise nautical distance between them, eliminating guesswork.

**What is the best way to check vessel traffic using get_port_vessel_traffic?**
Simply ask your agent about a port's current activity. It runs `get_port_vessel_traffic` and gives you statistics, including the count of container ships or bulk carriers present.

**Can I use get_nautical_ports to find all ports in Europe?**
Yes. You tell your agent to run `get_nautical_ports` and specify 'Europe' as the country filter, giving you a list of available port metadata.

**What should I do before searching for routes with search_maritime_routes?**
Always check the status first. Run `check_api_status` to confirm the server is running. Then, use the ports found via `get_nautical_ports` as inputs for your route search.

**Does NavAPI help with finding charts using list_nautical_charts?**
Yes. This tool lists which specific nautical charts are available for a given area, helping you verify compliance before planning navigation in that region.

**When using `get_nautical_ports`, how should I handle my API key?**
You pass your unique API key as an environment variable in your AI client configuration. Vinkius manages the connection securely, so you never have to hardcode the key into your workflow. This keeps your credentials safe while letting your agent access all port data.

**If I get unexpected results, how do I use `check_api_status`?**
Run the `check_api_status` tool first to confirm the server is fully operational before calling any other function. This step immediately tells you if the issue lies with NavAPI's service status or if it’s an error in your agent setup.

**What structured data does `get_port_distance` provide?**
It returns a standardized JSON object that specifies the calculated distance in nautical miles (NM) and often includes the associated primary route identifier. Your agent can parse this structure directly for immediate calculations.

**How do I find my NavAPI Key?**
Log in to your [**NavAPI dashboard**](https://navapi.com/), and you will find your API Key under the 'API Settings' or 'My Keys' section. Copy and paste it below.

**Does it calculate real-world nautical distances?**
Yes. The `get_port_distance` tool calculates the distance in nautical miles (NM) between two ports using established maritime routes.

**Can the agent show vessel counts at ports?**
Yes. The `get_port_vessel_traffic` tool provides real-time statistics on the number of vessels currently identified at a specific port.