geoprimsField-grade geospatial math

Use with agents

geoprims runs as a local MCP server, so an AI agent gets the same calculators and the same answers as this site. It runs on your machine over stdio, has no npm dependencies, and makes no network requests.

Get the server

Clone the v0.1.0 release. It carries the built calculators, so it runs with Node 22 or newer and nothing else. Then replace /abs/path/geoprims below with your clone's path.

git clone --branch v0.1.0 --depth 1 https://github.com/clay-good/geoprims

Or download the release as a zip from GitHub. Claude Desktop can also install thegeoprims-0.1.0.mcpb file from the same page in one click. To build from source instead, clonemain and run npm run build (it needs Rust via rustup and binaryen wasm-opt).

Add it to your client

Claude Code

Run in a terminal

claude mcp add geoprims -- node /abs/path/geoprims/mcp/server.mjs

Claude Desktop

Settings, Developer, Edit Config: claude_desktop_config.json

{
  "mcpServers": {
    "geoprims": {
      "command": "node",
      "args": [
        "/abs/path/geoprims/mcp/server.mjs"
      ]
    }
  }
}

VS Code

.vscode/mcp.json in your workspace

{
  "servers": {
    "geoprims": {
      "type": "stdio",
      "command": "node",
      "args": [
        "/abs/path/geoprims/mcp/server.mjs"
      ]
    }
  }
}

Cursor

.cursor/mcp.json in your project, or ~/.cursor/mcp.json

{
  "mcpServers": {
    "geoprims": {
      "command": "node",
      "args": [
        "/abs/path/geoprims/mcp/server.mjs"
      ]
    }
  }
}

Windsurf

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "geoprims": {
      "command": "node",
      "args": [
        "/abs/path/geoprims/mcp/server.mjs"
      ]
    }
  }
}

What the agent sees

Six tools that reach every calculator, so the tool list stays small:

Results are the same envelope this site computes, byte for byte, with the plain-language summary, the model, accuracy, and warnings. Aviation, drone, navigation, and magnetic results also carry the notice that they are planning aids and not for primary navigation.

Workflow prompts

Options

OptionEffect
--toolsets=<name,...>Also lists each stable tool in the named toolsets as its own tool, named gp_ plus the id with dots as underscores.
--no-metaWith --toolsets, lists only those tools.
--timeout=<ms>Per-call time limit (default 10,000).
--debugLogs argument values to stderr (off by default).
--allow-asset-downloadAccepted. Every dataset the tools use today is built in, so there is nothing to download yet.

Toolsets

Only stable tools join a toolset, so toolsets grow as tools are promoted.

ToolsetTools now
geodesy-coreHelmert transformation (7 or 14 parameters), Transform between ITRF and WGS 84 realizations, Legacy datum to or from WGS 84, Transform between NAD 83 and ITRF or WGS 84, Old US datums to NAD 83 (NADCON5), Move a position between epochs (ITRF2020 plate motion), Auxiliary latitudes, Ellipsoid parameters, Radii of curvature and degree lengths, ECEF to latitude, longitude, and height, Local ENU, NED, or AER to point, Latitude, longitude, and height to ECEF, Point to local ENU, NED, and AER, Geoid height (EGM96), Latitude and longitude to GARS, GARS to latitude and longitude, Latitude and longitude to GEOREF, GEOREF to latitude and longitude, Latitude and longitude to Maidenhead locator, Maidenhead locator to latitude and longitude, Latitude and longitude to MGRS, MGRS to latitude and longitude, Latitude and longitude to USNG, USNG to latitude and longitude, Ellipsoidal and orthometric height, Magnetic declination, Grid variation (grivation), True and magnetic bearings, Add and subtract DMS angles, Difference between two bearings, Read any coordinate, Format a coordinate, Arc-to-chord correction (t − T), Latitude and longitude to state plane (SPCS83), State plane (SPCS83) to latitude and longitude, State plane zone lookup, Latitude and longitude to UPS, UPS to latitude and longitude, Latitude and longitude to UTM, UTM to latitude and longitude
navigationPolygon area and perimeter on the ellipsoid, Buffer a point, line, or polygon, Compare two tracks, Delaunay triangulation of points, Voronoi cells around points, Overlap, union, or difference of two polygons, Point in polygon, Bounding box, antimeridian-aware, Polygon centroid and interior point, Add vertices along geodesic edges (densify), Hull, bounding rectangle, and enclosing circle, Simplify a line or polygon (Douglas-Peucker), Simplify a line or polygon (Visvalingam), Check and repair a polygon, Destination from a start, course, and distance (geodesic), Haversine distance (spherical), Point part way along a great circle, Where two geodesic segments cross, Distance between two points (geodesic), Midpoint on the geodesic, Great-circle destination (spherical), Great-circle distance and course (spherical), Highest point of a geodesic (vertex), Vincenty direct (legacy), Vincenty inverse (legacy), Waypoints along a route line, Dip of the horizon, Fresnel zone and radio link clearance, Distance to the horizon, Can two points see each other?, Destination on a constant course (rhumb line), Rhumb line distance and course, Closest point on a route, Closest point of approach, Cross-track and along-track distance, Fly-by turn anticipation, Route legs, courses, and totals, Range rings, Time, speed, and distance, 3D distance between two points
e6bDensity altitude, Pressure altitude, Top of descent, Visual descent point, Wind triangle: heading and groundspeed, Runway wind components
atmosphereDensity altitude, Pressure altitude, Standard atmosphere, The four aviation nights, Sunrise, sunset, and twilight, Sun hotspot in a camera frame, Mapping light window, Night passenger currency, Sun position (azimuth and elevation)
drone-mappingPart 107 maximum altitude, Height for a target GSD, Ground sampling distance (GSD), Image count and survey size, Overlap over high terrain, Overlap, trigger interval, and line spacing, Battery energy (mAh to Wh), Drone flight time, Visual line of sight distance
survey-cogoArea by coordinates (acreage), Traverse closure and adjustment, Horizontal circular curve, Vertical curve, Deed plot, closure, and area, Combined scale factor (grid and ground)
indexingOne place in every index, at a matched cell size, Geohashes covering an area, Geohash decoder, Geohash encoder, Geohash neighbors, H3 cell inspector, H3 local IJ for a cell (cellToLocalIj), H3 cell set outline (cellsToMultiPolygon), H3 children cells, H3 compact, H3 edges and vertexes, H3 grid disk (k-ring), H3 grid path and distance, H3 grid ring, H3 cell for a point, H3 cell at local IJ (localIjToCell), H3 parent cell, H3 polygon fill (polygonToCells), H3 resolution chooser, H3 uncompact, Plus Code decoder, Plus Code encoder, Shorten a Plus Code, S2 cell details, S2 cells covering a region, S2 cell for a point, S2 edge neighbours, Map tile bounds, Map tiles covering a box, Map tile parent and children, Map tile for a point (XYZ, TMS, quadkey), Map ground resolution and scale

Offline

The magnetic models (WMM2025 and IGRF-14), the EGM96 geoid, the leap-second table, and the time zone rules are built into the modules, so every tool works with no connection.