Skip to content

REST API ​

Endpoint: https://api.vesselmcp.com. It is read-only and requires authentication. Paths must match exactly and query parameters are not accepted. Successful responses have the shape { "data": ... }. There is no CORS permission header, and responses disable caching.

Routes ​

MethodPathSuccessful data
GET/v1/vessels/{imo}{ "vessel": identity object }
GET/v1/vessels/{imo}/recent-ports{ "imo", "recentPorts", "fetchedAt" }

See the query guide for field rules.

http
GET /v1/vessels/9331919
Authorization: Bearer vmcp_api_v1_<key-id>_<secret>
json
{
  "data": {
    "vessel": {
      "imo": "9331919",
      "name": "OCEAN HIRYU",
      "fetchedAt": "2026-09-06T01:02:03.456Z"
    }
  }
}

Ports:

http
GET /v1/vessels/9331919/recent-ports
Authorization: Bearer vmcp_api_v1_<key-id>_<secret>
json
{
  "data": {
    "imo": "9331919",
    "recentPorts": [],
    "fetchedAt": "2026-09-06T01:02:03.456Z"
  }
}

Only vmcp_api_v1_... keys are accepted. MCP keys cannot call this service.

Rate limits ​

Rate limiting first uses the requester IP address, then the non-sensitive key ID after successful authentication. Limits are counted per Cloudflare location, not as a global billing quota.

StageLimit
Before authentication, by IP60 requests per 60 seconds
After authentication, by key ID30 requests per 60 seconds

A limit is exceeded with 429 RATE_LIMITED and Retry-After: 60. Identity and ports each count as one request.

Errors ​

Errors have the shape { "error": { "code", "message" } }.

Validation runs in this order: IP rate limit, authentication, key-ID rate limit, exact path, HTTP method, then IMO checksum and query parameters. The route-related errors below assume authentication and both rate-limit stages have passed. For example, an unauthenticated request to an unknown path normally returns 401, not 404; a rate-limit or service failure may be returned earlier.

HTTPerror.codeWhen
400INVALID_REQUESTGET on a recognized route with an invalid IMO checksum, 0000000, or query parameters
401UNAUTHORIZEDMissing or invalid API key
404NOT_FOUNDPath does not exactly match either route, including malformed IMO segments, trailing slashes, or extra segments
404VESSEL_NOT_FOUNDIdentity is genuinely not found
405METHOD_NOT_ALLOWEDRecognized route using a method other than GET; an unknown path returns 404 first
429RATE_LIMITEDIP or key-ID limit exceeded
502BACKEND_UNAVAILABLEQuery failure, timeout, or invalid result
503SERVICE_UNAVAILABLEService temporarily unavailable

A port-query failure does not become an empty array or VESSEL_NOT_FOUND.

IMO-only queries. No vessel-name search, browser MCP, or real-time data guarantee.