[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [NGA World Port Index search](https://spiral.ai/integrations/opencode/nga-world-port-index-search)

# How to Use NGA World Port Index search in opencode

Returns matching World Port Index ports by name, country, or UN/LOCODE. Use it to identify a port before comparing its published characteristics or retrieving its record.

|  |  |
| --- | --- |
| Model | NGA World Port Index search |
| Available through | Alexandria |
| Category | Maps & Reviews |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with NGA World Port Index search in opencode

- Use NGA World Port Index search to find Rotterdam and Antwerp, then add their returned port identifiers and locations to this project's port directory.
- Use NGA World Port Index search to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from NGA World Port Index search and tell me what changed since last week.
- Check NGA World Port Index search and summarize what you find in three bullet points.
- Pull the newest data from NGA World Port Index search and give me the result as a table.

## How to set up NGA World Port Index search in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run NGA World Port Index search**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "msi-nga-mil/maritime-safety/search",
    "input": {
      "limit": 1
    }
  }'
```

Then paste one of the prompts above: opencode finds NGA World Port Index search on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## NGA World Port Index search tools and prices

- [NGA Maritime Safety Information · Search](https://spiral.ai/tools/alexandria/msi-nga-mil/maritime-safety/search) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| limit | 1 to 500 | — | limit |
| query |  | — | query |
| country |  | — | country |
| unlocode |  | — | unlocode |

## What can you do with NGA World Port Index search in opencode?

Build a port comparison table or a navigational warning review screen from NGA records. A coding agent can connect published port particulars, warning text, and publication checks to the project's existing data views.

### Add port reference data to a shipping directory

Find Rotterdam, Antwerp, and Hamburg, inspect their port records, and populate a directory with published locations and harbor characteristics. Check publication status before refreshing the underlying collection.

### Compare published vessel limits

Identify Mombasa and Dar es Salaam, retrieve their records, and compare the maximum vessel dimensions and depths reported in the World Port Index. Refresh the comparison when its source publication changes.

### Research alternative commercial ports

Compare Singapore and Port Klang using their published facilities, services, harbor characteristics, and vessel limits. Resolve the port names first, inspect the relevant records, and maintain the comparison against the published collection.

### Maintain port profiles for a logistics team

Match a port directory to World Port Index entries, collect the published records, and revisit selected entries after a publication change. Show the differences in port particulars for editorial review.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## NGA World Port Index search in other agents

- [Amp](https://spiral.ai/integrations/amp/nga-world-port-index-search)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/nga-world-port-index-search)
- [Claude](https://spiral.ai/integrations/claude-desktop/nga-world-port-index-search)
- [Claude Code](https://spiral.ai/integrations/claude-code/nga-world-port-index-search)
- [Cline](https://spiral.ai/integrations/cline/nga-world-port-index-search)
- [Codex](https://spiral.ai/integrations/codex/nga-world-port-index-search)
- [Cursor](https://spiral.ai/integrations/cursor/nga-world-port-index-search)
- [Devin](https://spiral.ai/integrations/devin/nga-world-port-index-search)
- [dots](https://spiral.ai/integrations/dots/nga-world-port-index-search)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/nga-world-port-index-search)
- [Gemini](https://spiral.ai/integrations/gemini/nga-world-port-index-search)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/nga-world-port-index-search)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/nga-world-port-index-search)
- [goose](https://spiral.ai/integrations/goose/nga-world-port-index-search)
- [Grok](https://spiral.ai/integrations/grok/nga-world-port-index-search)
- [Grok Build](https://spiral.ai/integrations/grok-build/nga-world-port-index-search)
- [Hermes](https://spiral.ai/integrations/hermes/nga-world-port-index-search)
- [Instinct](https://spiral.ai/integrations/instinct/nga-world-port-index-search)
- [Manus](https://spiral.ai/integrations/manus/nga-world-port-index-search)
- [Muse](https://spiral.ai/integrations/muse/nga-world-port-index-search)
- [Muse Code](https://spiral.ai/integrations/muse-code/nga-world-port-index-search)
- [n8n](https://spiral.ai/integrations/n8n/nga-world-port-index-search)
- [Notion](https://spiral.ai/integrations/notion/nga-world-port-index-search)
- [OpenClaw](https://spiral.ai/integrations/openclaw/nga-world-port-index-search)
- [Perplexity](https://spiral.ai/integrations/perplexity/nga-world-port-index-search)
- [Raycast](https://spiral.ai/integrations/raycast/nga-world-port-index-search)
- [VS Code](https://spiral.ai/integrations/vscode/nga-world-port-index-search)
- [Windsurf](https://spiral.ai/integrations/windsurf/nga-world-port-index-search)
- [Zapier](https://spiral.ai/integrations/zapier/nga-world-port-index-search)

## More opencode guides

- [Mobility Database transit records](https://spiral.ai/integrations/opencode/mobility-database-transit-records)
- [NGA maritime publication status](https://spiral.ai/integrations/opencode/nga-maritime-publication-status)
- [Mobility Database transit record](https://spiral.ai/integrations/opencode/mobility-database-transit-record)
- [NGA maritime record details](https://spiral.ai/integrations/opencode/nga-maritime-record-details)
- [Mobility Database transit feed search](https://spiral.ai/integrations/opencode/mobility-database-transit-feed-search)
- [NGA maritime records](https://spiral.ai/integrations/opencode/nga-maritime-records)

## Questions about NGA World Port Index search in opencode

**Can opencode use NGA World Port Index search?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run NGA World Port Index search like any built-in tool.

**How much does NGA World Port Index search cost in opencode?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an Alexandria account to use NGA World Port Index search in opencode?**

No. Spiral runs NGA World Port Index search on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up NGA World Port Index search in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while NGA World Port Index search runs?**

NGA World Port Index search runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**Does the World Port Index cover ports outside the United States?**

Yes. It describes major ports and terminals worldwide, including locations, physical characteristics, facilities, and services. Its stated coverage is major ports and terminals, so it should not be read as a directory of every landing place.

**How often does the World Port Index change?**

NGA distinguishes monthly publication of the official CSV from weekly updates to its ArcGIS web application. The collector uses the CSV, so a weekly web edit does not establish that the downloadable publication has changed.

**Which navigational warning series are included?**

The collector includes five series: NAVAREA IV, NAVAREA XII, HYDROLANT, HYDROPAC, and HYDROARC. It does not list every national or coastal warning service as a separate source.

**How often are NGA's in-force warning lists published?**

NGA's published self-assessment describes daily in-force warning links for NAVAREA IV and XII, including weekends and holidays. That schedule describes publication of those lists, rather than a guaranteed delivery time for an individual API result.

**Can ASAM show recent piracy incidents?**

ASAM stopped updating after June 30, 2024. Use it for historical research; NGA also states that it is not a complete listing of hostile actions worldwide.

