docs

    MCP Server

    Give AI coding agents — Claude Desktop, Cursor, and any Model Context Protocol client — live CHRT spatial queries mid-conversation, without writing throwaway code.

    Not for primary navigation. CHRT data is derived from official electronic navigational charts but is not for primary navigation and is not SOLAS-compliant. Always use official, type-approved ECDIS or paper charts for navigation safety. CHRT provides situational awareness data only. Every tool repeats this in its description and response — agents must relay it to end users.

    @chrtco/mcp is a thin layer over the @chrtco/sdk. It runs as a local process your MCP client launches via npx, reading your API key from the CHRT_API_KEY environment variable.

    What it exposes

    ToolWhat it does
    chrt_aheadWhat's charted in a sector ahead of a position — given a bearing in degrees true, an arc and a range. Each feature carries its distance, bearing and depth clearance. Answers "what's ahead of me on this course?". Returns what is charted, never a safety verdict; an empty result is not an all-clear.
    chrt_along_routeWhat's charted in a corridor along a planned route — given waypoints and a corridor width. Ordered by how far into the passage each feature is, which is the order you meet them. Use chrt_ahead instead when there's a heading but no route; neither replaces the other, since a boat with a route still drifts off it.
    chrt_nearbyCharted features within a radius of a longitude/latitude point.
    chrt_features_bboxCharted features inside a bounding box, optionally filtered to an S-57 layer.
    chrt_cellOne ENC cell's metadata and data currency (issue date, update number, edition), or list cells.
    chrt_coverageWhere CHRT has coverage and which hydrographic offices issue it.
    chrt_usageYour plan, monthly quotas and usage this month, for the key the server runs with. Never metered.

    Plus read-only resources chrt://coverage and chrt://cells, and chrt://quickstart: how to put CHRT charts in an app (keys, tile tokens over REST, the style URL, a Flutter snippet, offline, and the credit and non-navigation notice the app must show). Every response surfaces the non-SOLAS disclaimer, the issuing-office attribution, and data currency. There is no tile or token tool.

    Hosted server: no install

    The same server, tools and disclaimers, hosted at https://mcp.chrt.co/mcp over MCP Streamable HTTP. Nothing to install and no Node.js. Every call runs with your own API key, so its scopes, coverage, rate limits and plan quota apply exactly as for a direct API call.

    Claude Code
    claude mcp add --transport http chrt https://mcp.chrt.co/mcp --header "Authorization: Bearer $CHRT_API_KEY"

    Any client that takes a remote server URL and headers (Cursor, VS Code, Windsurf, Zed):

    mcp.json
    {
      "mcpServers": {
        "chrt": {
          "url": "https://mcp.chrt.co/mcp",
          "headers": { "Authorization": "Bearer ${CHRT_API_KEY}" }
        }
      }
    }
    • Use a secret key made just for MCP, scoped to features:read, search:read, cells:read. Never a publishable key, and never paste a key into a chat.
    • Send the key in a header. A key in the URL (?key=) is refused: URLs end up in logs and histories.
    • A key with an IP allowlist doesn't work here. The hosted server can't prove your address to CHRT, so it refuses such a key. Leave the MCP key's IP allowlist empty, or run @chrtco/mcp yourself.
    • Listing the tools needs no key; calling one does.

    Prerequisites

    • Node.js 18+ (npx ships with npm).
    • A CHRT API key. Create a scoped, server-side key at /app/keys.

    Claude Desktop

    Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\), then restart Claude Desktop.

    claude_desktop_config.json
    {
      "mcpServers": {
        "chrt": {
          "command": "npx",
          "args": ["-y", "@chrtco/mcp"],
          "env": {
            "CHRT_API_KEY": "chrt_sk_live_your_scoped_key"
          }
        }
      }
    }

    Cursor

    Create .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally). Cursor → Settings → MCP lists the server once saved.

    mcp.json
    {
      "mcpServers": {
        "chrt": {
          "command": "npx",
          "args": ["-y", "@chrtco/mcp"],
          "env": {
            "CHRT_API_KEY": "chrt_sk_live_your_scoped_key"
          }
        }
      }
    }

    Any MCP client

    The server speaks the Model Context Protocol over stdio. Launch it directly:

    terminal
    CHRT_API_KEY=chrt_sk_live_... npx -y @chrtco/mcp

    Configuration

    VariableRequiredDescription
    CHRT_API_KEYYesYour CHRT API key (chrt_sk_live_… / chrt_sk_test_…).
    CHRT_API_BASE_URLNoOverride the API base URL (default https://api.chrt.co/v1).

    Handling your API key safely

    • Use a dedicated, scoped key for the MCP server — restrict scopes, coverage, and IP at /app/keys. Don't reuse a broad production key. An IP allowlist works only when you run the server yourself: the hosted server at mcp.chrt.co refuses a key that has one.
    • Keep the key in the client config env block or your shell environment — never paste it into an agent prompt or transcript, and never commit it to source control.
    • Server-side use only. Treat the key like a password and rotate it if exposed.

    Example prompts

    Once configured, ask your agent things like:

    • "Use CHRT to list charted features within 2 km of 42.02 N, 70.86 W."
    • "What wrecks and obstructions are in the bounding box around Boston Harbor?"
    • "How current is ENC cell US5MA11M? Show the issue date and update number."
    • "Does CHRT have coverage for the US, and which office issues it?"

    The agent calls the relevant tool and must relay the disclaimer, the issuing office, and the data currency in its answer. For building integrations in code instead, see SDKs & Libraries.

    For situational awareness only — not for primary navigation. CHRT is not an ECDIS and is not SOLAS-compliant.

    CHRT uses only the cookies and local storage the site needs to work — keeping you signed in, remembering your preferences, and protecting the forms. There is no analytics, no advertising and no cross-site tracking, so there is nothing here to opt out of. Privacy Policy