New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@embed-earth/mcp-test

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@embed-earth/mcp-test

Model Context Protocol server for E2 — expose Earth's open spacetime index to AI agents.

Source
npmnpm
Version
0.1.8
Version published
Weekly downloads
33
-44.07%
Maintainers
1
Weekly downloads
 
Created
Source

@embed-earth/mcp-test

MCP server for E2. It exposes search, cache, routing including feature-backed destinations, cloud/local compute, comparisons, user dataset storage, catalog discovery, and cell encode/decode over stdio. The e2_map_sources tool resolves the Planet basemap and published feature PMTiles sources for Map clients.

Product: embed.earth · Docs: MCP docs · Docs home

Related interfaces: SDK docs and CLI docs.

The MCP server is the agent-facing interface to the same capabilities exposed by the @embed-earth/sdk-test SDK and the @embed-earth/cli-test CLI.

Run

The e2_route tools use https://route.embed.earth by default. Set ROUTE_URL in the MCP host environment to use another compatible routing service.

npx -y @embed-earth/mcp-test

Add it to an MCP host using a standard stdio configuration:

{
  "mcpServers": {
    "e2": {
      "command": "npx",
      "args": ["-y", "@embed-earth/mcp-test"],
      "env": {
        "ROUTE_URL": "https://route.embed.earth"
      }
    }
  }
}

Do not place a real credential in a checked-in MCP configuration. ROUTE_URL is optional because the server already uses https://route.embed.earth.

Tool layout

GroupToolsPurpose
Searche2_searchSearch features and return GeoJSON
Routinge2_route, e2_route_to_featureRun routing operations or route to an indexed feature
Computee2_compute, e2_compareRun spatial primitives or compare features/areas
Catalogse2_features_search, e2_regions_search, e2_datasets_listDiscover available data
Local datae2_cache, e2_storage_uploadManage snapshots or index user data
Mape2_map_sourcesResolve basemap and feature PMTiles
Cellse2_encode, e2_decode, e2_neighborsEncode, decode, and traverse cells

Input conventions

InputConvention
featureA feature key or numeric feature ID
areaA human-readable area name
area_idAn exact catalog ID; do not wrap it in a provider-specific prefix
modecloud, offline, or auto for search/compute
databaseOptional local SQLite path for compute and upload workflows

e2_route accepts route, matrix, isochrone, mapMatch, locate, or height as its operation. e2_compute accepts NEAREST, DISTANCE, WITHIN, COUNT, DENSITY, COVERAGE, GAPS, or CLUSTER.

Use the regions catalog and features catalog to discover valid area, area_id, and feature inputs before calling a tool.

Practical tool calls

Search a named area, or use the raw exact area ID 4915 for New York:

{
  "feature": "restaurant",
  "area": "New York",
  "limit": 25,
  "mode": "auto"
}
{
  "feature": "restaurant",
  "area_id": "4915",
  "limit": 25
}

Run a spatial relation with e2_compute:

{
  "primitive": "NEAREST",
  "feature": ["restaurant"],
  "area_id": "4915",
  "near": "park",
  "distanceMeters": 500,
  "limit": 3,
  "mode": "cloud"
}

Route with e2_route by passing the operation and its body:

{
  "operation": "route",
  "body": {
    "locations": [
      { "lat": 40.74, "lon": -73.99 },
      { "lat": 40.71, "lon": -74.01 }
    ],
    "mode": "walking"
  }
}

Use e2_route_to_feature when the destination is a feature instead of a coordinate. e2_cache manages downloaded snapshots, e2_storage_upload imports GeoJSON/CSV/Parquet into SQLite, and e2_map_sources returns the Planet basemap plus published feature PMTiles sources.

Search, route, and compute in detail

e2_search: return matching features as GeoJSON

e2_search is data retrieval. It returns a GeoJSON FeatureCollection; it does not calculate a route or a spatial aggregate.

InputTypeMeaning
featurefeature or feature arrayRequired catalog key(s) or numeric ID(s).
areastring or string arrayOptional human-readable area name(s).
area_idstring or string arrayOptional exact raw catalog ID(s).
modecloud, offline, autoOptional execution backend; defaults to auto.
limitintegerOptional row limit; defaults to 1000.
bbox[minLng, minLat, maxLng, maxLat]Optional bounding box.
where / propertiesobjectOptional typed source-column or property filters.

Use e2_search when an agent needs the matching feature records themselves.

e2_route: return a network journey

e2_route is network routing. Set operation and pass the matching request body; the default service is https://route.embed.earth.

operationRequired body fieldsResult
routelocationsA route between ordered locations.
matrixsources, targetsTravel metrics for source/target pairs.
isochronelocations, optional contoursReachable contours.
mapMatchshapeA coordinate trace aligned to the network.
locatecompatible location bodyNetwork information near locations.
heightcompatible location bodyElevation information for locations.

e2_route_to_feature is the feature-destination variant: pass feature, from: [lat, lng], and optionally area or area_id; it resolves the nearest indexed destination before requesting the route.

e2_compute: return a spatial analysis result

e2_compute evaluates a spatial relationship or aggregate. It is not a raw record search and it does not return turn-by-turn directions.

InputTypeMeaning
primitiveNEAREST, DISTANCE, WITHIN, COUNT, DENSITY, COVERAGE, GAPS, CLUSTERRequired analysis operation.
featurefeature arrayRequired catalog feature key(s) or ID(s).
area / area_idstringOptional named or exact raw area.
near / withinfeatureOptional relation feature.
distanceMetersnumberRelation distance; defaults to 500.
modecloud, offline, autoOptional backend; defaults to auto.
databasestringOptional local SQLite path.
limitintegerOptional output limit; defaults to 1000.

Use e2_compare to compare two features in one area (features) or one feature across two areas (areas or area_ids).

Choose e2_search for matching records, e2_route for network travel, and e2_compute for a spatial relationship or aggregate.

Open-source foundation

The server uses the standard MCP runtime and delegates geographic work to the SDK:

ToolRole in the MCP package
Model Context Protocol SDKTool registration and stdio transport
ZodRuntime validation for tool inputs
EmbedEarth SDKSearch, routing, compute, catalogs, storage, and map sources
H3Spatial cell operations through the SDK
PMTilesPublished map source descriptors through the SDK

For terminal workflows, see the CLI package. For typed application code, see the SDK package.

Keywords

e2

FAQs

Package last updated on 14 Sep 2026

Related posts