[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [USCG PSIX vessel search](https://spiral.ai/integrations/opencode/uscg-psix-vessel-search)

# How to Use USCG PSIX vessel search in opencode

Returns matching vessel identities from the Coast Guard's PSIX records. Use it to resolve a ship's name, call sign or identification number before requesting its certificates or inspection history.

|  |  |
| --- | --- |
| Model | USCG PSIX vessel 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 USCG PSIX vessel search in opencode

- Use USCG PSIX vessel search to find MAERSK KENSINGTON, then add its returned vessel identity to this project's ship-matching fixtures.
- Use USCG PSIX vessel search to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from USCG PSIX vessel search and tell me what changed since last week.
- Check USCG PSIX vessel search and summarize what you find in three bullet points.
- Pull the newest data from USCG PSIX vessel search and give me the result as a table.

## How to set up USCG PSIX vessel 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 USCG PSIX vessel 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": "cgmix-uscg-mil/maritime-safety/search",
    "input": {
      "hin": "<hin>"
    }
  }'
```

Then paste one of the prompts above: opencode finds USCG PSIX vessel search on Spiral, shows the price and runs it.

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

## USCG PSIX vessel search tools and prices

- [USCG CGMIX Port State Information Exchange (PSIX) · Search](https://spiral.ai/tools/alexandria/cgmix-uscg-mil/maritime-safety/search) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| hin |  | — | Hull identification number. |
| flag |  | — | Flag state as PSIX spells CountryLookupName (case-insensitive), e.g. UNITED STATES, PANAMA, MARSHALL ISLANDS. |
| name |  | — | Vessel name or part of it. |
| limit | 1 to 500 | — | Results to return (default 50). |
| service |  | — | Service type, exact PSIX spelling (case-insensitive), e.g. Freight Ship, Tank Ship, Towing Vessel, Passenger (Inspected), Commercial Fishing Vessel. |
| call_sign |  | — | call_sign |

## What can you do with USCG PSIX vessel search in opencode?

Build a commercial fleet register that connects vessel identities with public Coast Guard records. Use PSIX's weekly publication cycle and case activity IDs to structure refreshes and detailed history views.

### Reconcile a fleet register

Check a fleet segment for changes, collect its vessel records, resolve uncertain ship matches and compare selected vessel details with an existing commercial fleet register.

### Prepare a tanker shortlist

Collect a flag's tank ships, match named candidates and examine their public Coast Guard histories. Check the segment again during subsequent shortlist reviews.

### Compare inspection histories

Maintain a defined vessel cohort, resolve the ships being compared and retrieve their published cases and deficiencies. Use segment status checks to guide later cohort refreshes.

### Resolve similar ship names

Find ships sharing a name, compare identification numbers and inspect the selected vessel's particulars before attaching its public records to a report.

### Build a public maritime research dataset

Maintain a repeatable vessel cohort, resolve named ships and add selected certificate and case records. Describe the dataset as PSIX coverage of U.S.-flag vessels and foreign vessels operating in U.S. waters.

### Prepare a vessel case brief

Identify a named commercial ship and summarize its published Coast Guard cases, with the controls and deficiencies attached to each selected activity.

## Overview

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

## USCG PSIX vessel search in other agents

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

## More opencode guides

- [USCG PSIX vessel register](https://spiral.ai/integrations/opencode/uscg-psix-vessel-register)
- [USDA food categories](https://spiral.ai/integrations/opencode/usda-food-categories)
- [USCG PSIX vessel details](https://spiral.ai/integrations/opencode/uscg-psix-vessel-details)
- [USDA food nutrition details](https://spiral.ai/integrations/opencode/usda-food-nutrition-details)
- [USCG PSIX register status](https://spiral.ai/integrations/opencode/uscg-psix-register-status)
- [USDA food search](https://spiral.ai/integrations/opencode/usda-food-search)

## Questions about USCG PSIX vessel search in opencode

**Can opencode use USCG PSIX vessel search?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run USCG PSIX vessel search like any built-in tool.

**How much does USCG PSIX vessel 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 USCG PSIX vessel search in opencode?**

No. Spiral runs USCG PSIX vessel 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 USCG PSIX vessel search in opencode?**

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

**Does opencode wait while USCG PSIX vessel search runs?**

USCG PSIX vessel search runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**Does PSIX cover ships worldwide?**

Its stated coverage is U.S.-flag vessels, foreign vessels operating in U.S. waters, and Coast Guard contacts with those vessels. It should not be used as a complete world fleet register.

**How fresh is PSIX data?**

PSIX is a weekly snapshot of MISLE data. Inspection results also depend on the responsible Coast Guard unit reviewing and closing the activity before publication.

**How far back does PSIX history go?**

The Coast Guard describes PSIX vessel information as dating from December 21, 2001, when MISLE came online. That starting point does not promise a record for every vessel on every date.

**Are pending inspections and investigations public?**

PSIX excludes unclosed cases and cases pending further action. A vessel's public history therefore cannot establish whether a pending case exists.

**Can a broad vessel search miss results?**

The official PSIX vessel search interface returns a maximum of 500 records. The Coast Guard recommends narrowing searches that exceed that limit.

