@globalfishingwatch/mcp 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # gfw-mcp-js
1
+ # @globalfishingwatch/mcp
2
2
 
3
3
  Access [Global Fishing Watch](https://globalfishingwatch.org) data from any MCP-compatible AI assistant or directly from the terminal. Search vessels, retrieve fishing and port-visit events, look up Marine Protected Areas, Exclusive Economic Zones and RFMOs, calculate fishing activity hours within any region, and compute aggregate event statistics.
4
4
 
@@ -19,7 +19,7 @@ This package can be used in two modes:
19
19
  ### Quick start (no install)
20
20
 
21
21
  ```bash
22
- npx gfw-mcp-js mcp
22
+ npx @globalfishingwatch/mcp mcp
23
23
  ```
24
24
 
25
25
  Set your API key via the `GFW_TOKEN` environment variable (or `API_KEY` for compatibility).
@@ -36,7 +36,7 @@ Set your API key via the `GFW_TOKEN` environment variable (or `API_KEY` for comp
36
36
  "mcpServers": {
37
37
  "gfw": {
38
38
  "command": "npx",
39
- "args": ["-y", "gfw-mcp-js", "mcp"],
39
+ "args": ["-y", "@globalfishingwatch/mcp", "mcp"],
40
40
  "env": {
41
41
  "GFW_TOKEN": "your_gfw_api_key_here"
42
42
  }
@@ -48,7 +48,7 @@ Set your API key via the `GFW_TOKEN` environment variable (or `API_KEY` for comp
48
48
  #### Claude Code
49
49
 
50
50
  ```bash
51
- claude mcp add gfw -- npx -y gfw-mcp-js mcp
51
+ claude mcp add gfw -- npx -y @globalfishingwatch/mcp mcp
52
52
  export GFW_TOKEN=your_gfw_api_key_here
53
53
  ```
54
54
 
@@ -61,7 +61,7 @@ export GFW_TOKEN=your_gfw_api_key_here
61
61
  "mcpServers": {
62
62
  "gfw": {
63
63
  "command": "npx",
64
- "args": ["-y", "gfw-mcp-js", "mcp"],
64
+ "args": ["-y", "@globalfishingwatch/mcp", "mcp"],
65
65
  "env": { "GFW_TOKEN": "your_gfw_api_key_here" }
66
66
  }
67
67
  }
@@ -77,7 +77,7 @@ export GFW_TOKEN=your_gfw_api_key_here
77
77
  "mcpServers": {
78
78
  "gfw": {
79
79
  "command": "npx",
80
- "args": ["-y", "gfw-mcp-js", "mcp"],
80
+ "args": ["-y", "@globalfishingwatch/mcp", "mcp"],
81
81
  "env": { "GFW_TOKEN": "your_gfw_api_key_here" }
82
82
  }
83
83
  }
@@ -94,7 +94,7 @@ export GFW_TOKEN=your_gfw_api_key_here
94
94
  "gfw": {
95
95
  "type": "stdio",
96
96
  "command": "npx",
97
- "args": ["-y", "gfw-mcp-js", "mcp"],
97
+ "args": ["-y", "@globalfishingwatch/mcp", "mcp"],
98
98
  "env": { "GFW_TOKEN": "your_gfw_api_key_here" }
99
99
  }
100
100
  }
@@ -112,7 +112,7 @@ export GFW_TOKEN=your_gfw_api_key_here
112
112
  "servers": {
113
113
  "gfw": {
114
114
  "command": "npx",
115
- "args": ["-y", "gfw-mcp-js", "mcp"],
115
+ "args": ["-y", "@globalfishingwatch/mcp", "mcp"],
116
116
  "env": { "GFW_TOKEN": "your_gfw_api_key_here" }
117
117
  }
118
118
  }
@@ -130,7 +130,7 @@ export GFW_TOKEN=your_gfw_api_key_here
130
130
  "mcpServers": {
131
131
  "gfw": {
132
132
  "command": "npx",
133
- "args": ["-y", "gfw-mcp-js", "mcp"],
133
+ "args": ["-y", "@globalfishingwatch/mcp", "mcp"],
134
134
  "env": { "GFW_TOKEN": "your_gfw_api_key_here" }
135
135
  }
136
136
  }
@@ -145,7 +145,7 @@ cd gfw-mcp
145
145
  npm install && npm run build
146
146
  ```
147
147
 
148
- Then replace `npx -y gfw-mcp-js` with `node /absolute/path/to/gfw-mcp/dist/bin.js` in any config above.
148
+ Then replace `npx -y @globalfishingwatch/mcp` with `node /absolute/path/to/gfw-mcp/dist/bin.js` in any config above.
149
149
 
150
150
  ### Available MCP tools
151
151
 
@@ -167,11 +167,11 @@ Then replace `npx -y gfw-mcp-js` with `node /absolute/path/to/gfw-mcp/dist/bin.j
167
167
 
168
168
  ```bash
169
169
  # Run without installing
170
- npx gfw-mcp-js --help
170
+ npx @globalfishingwatch/mcp --help
171
171
 
172
172
  # Or install globally
173
- npm install -g gfw-mcp-js
174
- gfw-mcp-js --help
173
+ npm install -g @globalfishingwatch/mcp
174
+ gfw-mcp --help
175
175
  ```
176
176
 
177
177
  ### Authentication
@@ -184,19 +184,19 @@ Token resolution order:
184
184
 
185
185
  ```bash
186
186
  # Save token interactively (stored in ~/.gfw/config.json)
187
- npx gfw-mcp-js auth login
187
+ npx @globalfishingwatch/mcp auth login
188
188
 
189
189
  # Check which token source is active
190
- npx gfw-mcp-js auth status
190
+ npx @globalfishingwatch/mcp auth status
191
191
 
192
192
  # Remove stored token
193
- npx gfw-mcp-js auth logout
193
+ npx @globalfishingwatch/mcp auth logout
194
194
  ```
195
195
 
196
196
  Or pass the token inline for a single command:
197
197
 
198
198
  ```bash
199
- GFW_TOKEN=your_key npx gfw-mcp-js vessel-search --name "Maria"
199
+ GFW_TOKEN=your_key npx @globalfishingwatch/mcp vessel-search --name "Maria"
200
200
  ```
201
201
 
202
202
  ### Commands
@@ -206,7 +206,7 @@ GFW_TOKEN=your_key npx gfw-mcp-js vessel-search --name "Maria"
206
206
  Search vessels by name, MMSI, IMO, callsign, flag, or activity date range.
207
207
 
208
208
  ```bash
209
- npx gfw-mcp-js vessel-search [--name <name>] [--mmsi <mmsi>] [--imo <imo>]
209
+ npx @globalfishingwatch/mcp vessel-search [--name <name>] [--mmsi <mmsi>] [--imo <imo>]
210
210
  [--callsign <cs>] [--flag <ISO3>] [--active-from <YYYY-MM-DD>]
211
211
  [--active-to <YYYY-MM-DD>] [--limit <n>]
212
212
  ```
@@ -222,9 +222,9 @@ At least one filter must be provided.
222
222
  | `--limit` | 1–50 (default 10) |
223
223
 
224
224
  ```bash
225
- npx gfw-mcp-js vessel-search --name "Maria" --flag CHN
226
- npx gfw-mcp-js vessel-search --mmsi 123456789
227
- npx gfw-mcp-js vessel-search --flag ESP --active-from 2024-01-01 --active-to 2024-12-31 --limit 20
225
+ npx @globalfishingwatch/mcp vessel-search --name "Maria" --flag CHN
226
+ npx @globalfishingwatch/mcp vessel-search --mmsi 123456789
227
+ npx @globalfishingwatch/mcp vessel-search --flag ESP --active-from 2024-01-01 --active-to 2024-12-31 --limit 20
228
228
  ```
229
229
 
230
230
  #### `vessel-by-id`
@@ -232,12 +232,12 @@ npx gfw-mcp-js vessel-search --flag ESP --active-from 2024-01-01 --active-to 202
232
232
  Fetch full vessel profile(s) by GFW vessel ID.
233
233
 
234
234
  ```bash
235
- npx gfw-mcp-js vessel-by-id --ids <id> [<id2> ...]
235
+ npx @globalfishingwatch/mcp vessel-by-id --ids <id> [<id2> ...]
236
236
  ```
237
237
 
238
238
  ```bash
239
- npx gfw-mcp-js vessel-by-id --ids abc123
240
- npx gfw-mcp-js vessel-by-id --ids abc123 def456 ghi789
239
+ npx @globalfishingwatch/mcp vessel-by-id --ids abc123
240
+ npx @globalfishingwatch/mcp vessel-by-id --ids abc123 def456 ghi789
241
241
  ```
242
242
 
243
243
  #### `vessel-events`
@@ -245,7 +245,7 @@ npx gfw-mcp-js vessel-by-id --ids abc123 def456 ghi789
245
245
  Retrieve fishing, encounter, port visit, or loitering events.
246
246
 
247
247
  ```bash
248
- npx gfw-mcp-js vessel-events --event-type <type>
248
+ npx @globalfishingwatch/mcp vessel-events --event-type <type>
249
249
  --start-date <YYYY-MM-DD> --end-date <YYYY-MM-DD>
250
250
  [--vessel-id <id>] [--limit <n>] [--offset <n>]
251
251
  [--confidence <2|3|4> ...] # port_visit only
@@ -263,10 +263,10 @@ npx gfw-mcp-js vessel-events --event-type <type>
263
263
  | `--region-type` | `MPA` \| `EEZ` \| `RFMO` |
264
264
 
265
265
  ```bash
266
- npx gfw-mcp-js vessel-events --event-type fishing --start-date 2024-01-01 --end-date 2024-06-01
267
- npx gfw-mcp-js vessel-events --event-type port_visit --vessel-id abc123 --start-date 2024-01-01 --end-date 2024-12-31
268
- npx gfw-mcp-js vessel-events --event-type encounter --start-date 2024-01-01 --end-date 2024-12-31 --encounter-types CARRIER-FISHING SUPPORT-FISHING
269
- npx gfw-mcp-js vessel-events --event-type fishing --region-type EEZ --region-id 8386 --start-date 2024-01-01 --end-date 2024-06-01
266
+ npx @globalfishingwatch/mcp vessel-events --event-type fishing --start-date 2024-01-01 --end-date 2024-06-01
267
+ npx @globalfishingwatch/mcp vessel-events --event-type port_visit --vessel-id abc123 --start-date 2024-01-01 --end-date 2024-12-31
268
+ npx @globalfishingwatch/mcp vessel-events --event-type encounter --start-date 2024-01-01 --end-date 2024-12-31 --encounter-types CARRIER-FISHING SUPPORT-FISHING
269
+ npx @globalfishingwatch/mcp vessel-events --event-type fishing --region-type EEZ --region-id 8386 --start-date 2024-01-01 --end-date 2024-06-01
270
270
  ```
271
271
 
272
272
  #### `events-stats`
@@ -274,7 +274,7 @@ npx gfw-mcp-js vessel-events --event-type fishing --region-type EEZ --region-id
274
274
  Compute aggregate event statistics over a date range.
275
275
 
276
276
  ```bash
277
- npx gfw-mcp-js events-stats --event-type <type>
277
+ npx @globalfishingwatch/mcp events-stats --event-type <type>
278
278
  --start-date <YYYY-MM-DD> --end-date <YYYY-MM-DD>
279
279
  [--group-by <FLAG|GEARTYPE>]
280
280
  [--region-type <MPA|EEZ|RFMO>] [--region-id <id>]
@@ -291,9 +291,9 @@ npx gfw-mcp-js events-stats --event-type <type>
291
291
  | `--encounter-types` | `CARRIER-FISHING` \| `CARRIER-BUNKER` \| `FISHING-BUNKER` \| `FISHING-FISHING` \| `SUPPORT-FISHING` (encounter only; default `CARRIER-FISHING SUPPORT-FISHING`) |
292
292
 
293
293
  ```bash
294
- npx gfw-mcp-js events-stats --event-type fishing --start-date 2024-01-01 --end-date 2024-12-31
295
- npx gfw-mcp-js events-stats --event-type fishing --start-date 2024-01-01 --end-date 2024-12-31 --group-by GEARTYPE
296
- npx gfw-mcp-js events-stats --event-type encounter --start-date 2024-01-01 --end-date 2024-12-31 --region-type RFMO --region-id WCPFC
294
+ npx @globalfishingwatch/mcp events-stats --event-type fishing --start-date 2024-01-01 --end-date 2024-12-31
295
+ npx @globalfishingwatch/mcp events-stats --event-type fishing --start-date 2024-01-01 --end-date 2024-12-31 --group-by GEARTYPE
296
+ npx @globalfishingwatch/mcp events-stats --event-type encounter --start-date 2024-01-01 --end-date 2024-12-31 --region-type RFMO --region-id WCPFC
297
297
  ```
298
298
 
299
299
  #### `region-id-lookup`
@@ -301,7 +301,7 @@ npx gfw-mcp-js events-stats --event-type encounter --start-date 2024-01-01 --end
301
301
  Resolve an MPA, EEZ, or RFMO name to its canonical ID.
302
302
 
303
303
  ```bash
304
- npx gfw-mcp-js region-id-lookup --region-type <MPA|EEZ|RFMO> --query <name> [--limit <n>]
304
+ npx @globalfishingwatch/mcp region-id-lookup --region-type <MPA|EEZ|RFMO> --query <name> [--limit <n>]
305
305
  ```
306
306
 
307
307
  Use this before `vessel-report` or `vessel-events` when you only know the human-readable name of a region.
@@ -312,9 +312,9 @@ Use this before `vessel-report` or `vessel-events` when you only know the human-
312
312
  | `--limit` | 1–20 (default 5) |
313
313
 
314
314
  ```bash
315
- npx gfw-mcp-js region-id-lookup --region-type MPA --query "Galapagos"
316
- npx gfw-mcp-js region-id-lookup --region-type EEZ --query "Patagonia" --limit 10
317
- npx gfw-mcp-js region-id-lookup --region-type RFMO --query "WCPFC"
315
+ npx @globalfishingwatch/mcp region-id-lookup --region-type MPA --query "Galapagos"
316
+ npx @globalfishingwatch/mcp region-id-lookup --region-type EEZ --query "Patagonia" --limit 10
317
+ npx @globalfishingwatch/mcp region-id-lookup --region-type RFMO --query "WCPFC"
318
318
  ```
319
319
 
320
320
  #### `region-geometry`
@@ -322,7 +322,7 @@ npx gfw-mcp-js region-id-lookup --region-type RFMO --query "WCPFC"
322
322
  Get the GeoJSON URL for a specific region (no API token required).
323
323
 
324
324
  ```bash
325
- npx gfw-mcp-js region-geometry --region-type <MPA|EEZ|RFMO> --id <id>
325
+ npx @globalfishingwatch/mcp region-geometry --region-type <MPA|EEZ|RFMO> --id <id>
326
326
  ```
327
327
 
328
328
  | Parameter | Format / values |
@@ -330,8 +330,8 @@ npx gfw-mcp-js region-geometry --region-type <MPA|EEZ|RFMO> --id <id>
330
330
  | `--region-type` | `MPA` \| `EEZ` \| `RFMO` |
331
331
 
332
332
  ```bash
333
- npx gfw-mcp-js region-geometry --region-type EEZ --id 8386
334
- npx gfw-mcp-js region-geometry --region-type MPA --id 12345
333
+ npx @globalfishingwatch/mcp region-geometry --region-type EEZ --id 8386
334
+ npx @globalfishingwatch/mcp region-geometry --region-type MPA --id 12345
335
335
  ```
336
336
 
337
337
  #### `vessel-report`
@@ -341,7 +341,7 @@ Calculate fishing or presence hours inside a region. Date range must not exceed
341
341
  > **Important:** This command must never be run in parallel. If multiple reports are needed, run them sequentially — one at a time, waiting for each to complete before starting the next.
342
342
 
343
343
  ```bash
344
- npx gfw-mcp-js vessel-report --region-type <MPA|EEZ|RFMO> --region-id <id>
344
+ npx @globalfishingwatch/mcp vessel-report --region-type <MPA|EEZ|RFMO> --region-id <id>
345
345
  --start-date <YYYY-MM-DD> --end-date <YYYY-MM-DD>
346
346
  [--type <FISHING|PRESENCE>]
347
347
  [--flags <ISO3> ...]
@@ -363,10 +363,10 @@ npx gfw-mcp-js vessel-report --region-type <MPA|EEZ|RFMO> --region-id <id>
363
363
  | `--group-by` | `VESSEL_ID` (default) \| `FLAG` \| `GEARTYPE` \| `FLAGANDGEARTYPE` (`GEARTYPE`/`FLAGANDGEARTYPE` only valid with `--type FISHING`) |
364
364
 
365
365
  ```bash
366
- npx gfw-mcp-js vessel-report --region-type EEZ --region-id 8386 --start-date 2024-01-01 --end-date 2024-12-31
367
- npx gfw-mcp-js vessel-report --region-type MPA --region-id 12345 --start-date 2024-01-01 --end-date 2024-12-31 --flags CHN ESP
368
- npx gfw-mcp-js vessel-report --region-type RFMO --region-id WCPFC --start-date 2024-01-01 --end-date 2024-12-31 --type FISHING --group-by FLAG
369
- npx gfw-mcp-js vessel-report --region-type EEZ --region-id 8386 --start-date 2024-01-01 --end-date 2024-12-31 --type PRESENCE --vessel-types fishing cargo
366
+ npx @globalfishingwatch/mcp vessel-report --region-type EEZ --region-id 8386 --start-date 2024-01-01 --end-date 2024-12-31
367
+ npx @globalfishingwatch/mcp vessel-report --region-type MPA --region-id 12345 --start-date 2024-01-01 --end-date 2024-12-31 --flags CHN ESP
368
+ npx @globalfishingwatch/mcp vessel-report --region-type RFMO --region-id WCPFC --start-date 2024-01-01 --end-date 2024-12-31 --type FISHING --group-by FLAG
369
+ npx @globalfishingwatch/mcp vessel-report --region-type EEZ --region-id 8386 --start-date 2024-01-01 --end-date 2024-12-31 --type PRESENCE --vessel-types fishing cargo
370
370
  ```
371
371
 
372
372
  ### Output
@@ -374,8 +374,8 @@ npx gfw-mcp-js vessel-report --region-type EEZ --region-id 8386 --start-date 202
374
374
  All commands output JSON to stdout, ready to pipe to `jq`:
375
375
 
376
376
  ```bash
377
- npx gfw-mcp-js vessel-search --name "Maria" | jq '.results[].name'
378
- npx gfw-mcp-js vessel-report --region-type EEZ --region-id 8386 --start-date 2024-01-01 --end-date 2024-12-31 | jq '.fishingHours'
377
+ npx @globalfishingwatch/mcp vessel-search --name "Maria" | jq '.results[].name'
378
+ npx @globalfishingwatch/mcp vessel-report --region-type EEZ --region-id 8386 --start-date 2024-01-01 --end-date 2024-12-31 | jq '.fishingHours'
379
379
  ```
380
380
 
381
381
  ---
package/dist/index.js CHANGED
@@ -78,7 +78,7 @@ const server = (0, mcp_server_js_1.createServer)();
78
78
  async function main() {
79
79
  const transport = new stdio_js_1.StdioServerTransport();
80
80
  await server.connect(transport);
81
- console.error('Demo MCP Server running on stdio');
81
+ console.error('GFW MCP Server running on stdio');
82
82
  }
83
83
  main().catch((error) => {
84
84
  console.error('Fatal error in main():', error);
@@ -56,7 +56,7 @@ function generateVesselProfileUrl(vesselId, activeFrom, activeTo, events = []) {
56
56
  const baseUrl = '/vessel';
57
57
  let dynamicPath = `/${vesselId}?`;
58
58
  if (activeFrom && activeTo) {
59
- dynamicPath += `&activeFrom=${activeFrom}&activeTo=${activeTo}`;
59
+ dynamicPath += `&start=${activeFrom}&end=${activeTo}`;
60
60
  }
61
61
  if (events.length > 0) {
62
62
  dynamicPath += events.map((e, i) => `vE[${i}]=${e}`).join('&');
@@ -53,7 +53,13 @@ async function vesselEvents({ eventType, startDate, endDate, vesselId, limit, of
53
53
  });
54
54
  }
55
55
  if (eventType === 'encounter') {
56
- const encounterTypeList = encounterTypes ?? ['CARRIER-FISHING', 'SUPPORT-FISHING'];
56
+ const encounterTypeList = encounterTypes ?? [
57
+ 'CARRIER-FISHING',
58
+ 'CARRIER-BUNKER',
59
+ 'FISHING-BUNKER',
60
+ 'FISHING-FISHING',
61
+ 'SUPPORT-FISHING',
62
+ ];
57
63
  const expanded = [];
58
64
  for (const v of encounterTypeList) {
59
65
  expanded.push(v);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@globalfishingwatch/mcp",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "MCP server for Global Fishing Watch data — vessel search, events, fishing hours, and region lookups",
5
5
  "author": "Global Fishing Watch",
6
6
  "license": "Apache-2.0",
@@ -15,7 +15,8 @@
15
15
  ],
16
16
  "main": "./dist/index.js",
17
17
  "bin": {
18
- "gfw-mcp": "./dist/bin.js"
18
+ "gfw-mcp": "./dist/bin.js",
19
+ "mcp": "./dist/bin.js"
19
20
  },
20
21
  "files": [
21
22
  "dist/"
@@ -34,6 +35,7 @@
34
35
  "axios": "^1.13.6",
35
36
  "commander": "^14.0.3",
36
37
  "express": "^5.1.0",
38
+ "playwright": "^1.59.1",
37
39
  "qs": "^6.15.1",
38
40
  "undici": "^7.25.0",
39
41
  "zod": "^3.25.76"