atlasfetch-mcp 0.1.6 → 0.3.0

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
@@ -15,13 +15,47 @@ country: United Kingdom (GB) · region: England (GB-ENG) · municipal: City of W
15
15
  | Tool | What it does |
16
16
  | --- | --- |
17
17
  | `lookup_location` | A coordinate becomes the country, region and municipality containing it, with ISO 3166-1 / 3166-2 codes, plus matches from your own boundary sets. Optionally the **nearest street** (ask for the `street` layer), and the point as an H3 cell or Google Plus Code. |
18
+ | `geocode_address` | An address becomes a point, in South Africa today, with a **precision** that says whether the house, the street or only the suburb was found — and what to do about it. |
19
+ | `get_route` | A route between 2 and 25 coordinates by car, bike, foot or truck, with turn-by-turn steps — optionally **around** your own zones, or **measuring** how far it runs inside them. |
18
20
  | `list_boundary_sets` | Lists your boundary sets, their counts, and which API keys may query them. |
19
21
  | `create_boundary_set` | Creates an empty set for your own polygons. |
20
22
  | `add_boundary` | Adds one GeoJSON polygon, with properties returned on every match. |
23
+ | `update_boundary` | Moves or reshapes one boundary, keeping its id, name and properties. |
21
24
 
22
- **Good for:** reverse geocoding to administrative areas, finding the street a point is on, geofencing against your own delivery zones or service areas, jurisdiction and region checks, tagging location data with region codes.
25
+ **Good for:** reverse geocoding to administrative areas, finding the street a point is on, geofencing against your own delivery zones or service areas, jurisdiction and region checks, tagging location data with region codes, geocoding delivery addresses in South Africa, and routing that keeps out of the areas you name.
23
26
 
24
- **Not for:** forward geocoding or place search (an address to a coordinate), routing, distances, map tiles, or downloading boundary geometry.
27
+ **Not for:** geocoding outside South Africa (yet), searching for places by name, traffic-aware ETAs, distance matrices, isochrones, map tiles, or downloading boundary geometry.
28
+
29
+ ### Directions
30
+
31
+ `get_route` returns distance, duration and turn-by-turn steps between 2 and 25 coordinates, for `car`, `bike`, `foot` or `truck`.
32
+
33
+ ```
34
+ car: 3.5 km · 5 min · 11 steps · a location moved 62 m to reach a road — free-flow, no traffic
35
+ ```
36
+
37
+ Three things worth knowing before you wire it up:
38
+
39
+ - **A route costs 10 lookups**, not one. Everything it returns is included in that, but it is ten times a lookup.
40
+ - **Durations are free-flow** — the network at its own speed limits, with no live or historical traffic. They are not ETAs. For those, use a traffic-aware service.
41
+ - **The route line is off by default** (`geometry: "none"`). An encoded polyline is thousands of characters an assistant cannot read; ask for `polyline6` or `geojson` only when something will draw it.
42
+
43
+ **Your own zones, in a route.** `avoidSets` names boundary sets to route *around*; `exposureSets` names sets to *measure* against, leaving the route alone and reporting how many metres of it ran inside each zone. A zone containing one of your locations cannot be avoided for that route — it is skipped, and the answer says so.
44
+
45
+ Plan limits apply: 2 locations on the free plans and up to 25 on Pro, truck is Pro only, and alternatives need exactly 2 locations. Over a cap the answer is a `403` and nothing is billed; a location with no road near it is a `422`, and that one **is** billed, because the route was attempted.
46
+
47
+ ### Geocoding
48
+
49
+ `geocode_address` turns one address into a point — `q` on one line, or `address` already split into parts. South Africa today.
50
+
51
+ ```
52
+ address · confidence 0.96 · 25 Adderley Street, Cape Town, ZA-WC — dispatch
53
+ street · confidence 0.47 · ambiguous · Long Street, Cape Town, ZA-WC — ask the customer before dispatching
54
+ ```
55
+
56
+ **Read the precision before you use the point.** `address` is the house; `interpolated` is estimated between the numbers either side; `street` is the right street but not the house; `locality` is only the suburb. The result line applies the API's own advice for deliveries: dispatch only on a house-level answer that is not ambiguous, ask the recipient for a pin on a street-level one, and ask the customer when it is ambiguous. In South Africa most answers are street-level, because OpenStreetMap has house numbers on about 13% of street names.
57
+
58
+ One address per call, at 1 lookup each, found or not. That is deliberate: a delivery list goes through one row at a time, where you can see what it spends. Programs with thousands of rows should call `POST /geocode/batch` on the API directly.
25
59
 
26
60
  ### Streets
27
61
 
@@ -37,7 +71,7 @@ You always get three answers — for 5 m, 20 m and unlimited — because "the ne
37
71
  ]
38
72
  ```
39
73
 
40
- **Two nulls that mean different things:** `"street": null` means there is no street data for that country, while an entry whose fields are null means nothing was within that radius. `streetNumber` and `postcode` are strings (`44A`, `12-14`, `0181`); house numbers are rare outside well-mapped areas; no street geometry is returned.
74
+ **Two nulls that mean different things:** `"street": null` means there is no street data for that country, while an entry whose fields are null means nothing was within that radius. `streetNumber` and `postcode` are strings (`44A`, `12-14`, `0181`); house numbers are rare outside well-mapped areas. Set `streetGeometry` and each answer also carries the street's line, trimmed to about 250 m — leave it off unless something will draw it.
41
75
 
42
76
  ## Install
43
77
 
@@ -71,7 +105,7 @@ Requires Node 20 or newer.
71
105
 
72
106
  The demo key is shared by **every** anonymous user on the internet — one pooled quota and rate limit. Fine for a first look, wrong for anything real.
73
107
 
74
- Create your own at [atlasfetch.xyz/dashboard](https://atlasfetch.xyz/dashboard) and set `ATLASFETCH_API_KEY`. The free Personal plan needs no card.
108
+ Create your own at [atlasfetch.xyz/dashboard](https://atlasfetch.xyz/dashboard) and set `ATLASFETCH_API_KEY`. The free Personal plan needs no card. You can copy a key from the dashboard at any time — so restrict it to your own domains there. Keys made before 12 October 2026 were revoked; if yours stops working, copy a live one.
75
109
 
76
110
  | Variable | Default | Purpose |
77
111
  | --- | --- | --- |
@@ -86,7 +120,7 @@ Create your own at [atlasfetch.xyz/dashboard](https://atlasfetch.xyz/dashboard)
86
120
 
87
121
  ## Billing
88
122
 
89
- One call is one lookup, however many layers, sets or grid codes it touches. Metering happens before matching, so a lookup that matches nothing still counts. Requests rejected as invalid or rate-limited are not billed.
123
+ A lookup or a geocoded address is one lookup; a route is 10 on the standard plans. A lookup is one, however many layers, sets or grid codes it touches. Metering happens before matching, so a lookup that matches nothing still counts. Requests rejected as invalid or rate-limited are not billed.
90
124
 
91
125
  ## Development
92
126
 
package/dist/api.d.ts CHANGED
@@ -11,7 +11,7 @@
11
11
  * only `atlasfetch-mcp/<version>` from it — never the rest, and never anything
12
12
  * about the user. See src/lib/clientId.ts in the API.
13
13
  */
14
- export declare const USER_AGENT = "atlasfetch-mcp/0.1.6 (+https://github.com/atlasfetch-dev/atlasfetch-mcp)";
14
+ export declare const USER_AGENT = "atlasfetch-mcp/0.3.0 (+https://github.com/atlasfetch-dev/atlasfetch-mcp)";
15
15
  export declare function baseUrl(): string;
16
16
  /** A failure the caller should be told about verbatim, not retried blindly. */
17
17
  export declare class ApiError extends Error {
@@ -61,6 +61,11 @@ export interface StreetAnswer {
61
61
  streetName: string | null;
62
62
  postcode: string | null;
63
63
  distanceMeters: number | null;
64
+ /** Only when streetgeom was asked for: the named street, trimmed to about 250 m. */
65
+ geometry?: string | {
66
+ type: string;
67
+ coordinates: number[][];
68
+ } | null;
64
69
  }
65
70
  export interface LookupResponse {
66
71
  /**
@@ -83,6 +88,112 @@ export interface LookupResponse {
83
88
  message: string;
84
89
  }>;
85
90
  }
91
+ export interface GeocodeResult {
92
+ lat: number;
93
+ lng: number;
94
+ /** address, interpolated, street or locality: how much of the address was found. */
95
+ precision: 'address' | 'interpolated' | 'street' | 'locality';
96
+ /** 0 to 1. Ranks answers; not a probability. */
97
+ confidence: number;
98
+ /** A same-named street elsewhere scored about as well. */
99
+ ambiguous: boolean;
100
+ /** What was used, spelt as the data spells it. */
101
+ matched: {
102
+ housenumber?: string;
103
+ street?: string;
104
+ locality?: string;
105
+ region?: string;
106
+ country?: string;
107
+ };
108
+ /** Parts of the address that matched nothing. */
109
+ unmatched: string[];
110
+ sets?: Record<string, Array<{
111
+ name: string;
112
+ properties?: unknown;
113
+ }>>;
114
+ base?: Record<string, LayerHit | null>;
115
+ geometry?: string | {
116
+ type: string;
117
+ coordinates: number[][];
118
+ } | null;
119
+ }
120
+ export interface GeocodeResponse {
121
+ result: GeocodeResult | null;
122
+ errors: Array<{
123
+ type: string;
124
+ message: string;
125
+ }>;
126
+ }
127
+ export interface StoredBoundary {
128
+ id: string;
129
+ set?: string;
130
+ name: string;
131
+ properties?: unknown;
132
+ pointCount?: number;
133
+ }
134
+ export interface RouteStep {
135
+ /** depart, arrive, continue, turn-left, …, roundabout, ferry, other. */
136
+ maneuver: string;
137
+ instruction: string;
138
+ streetNames: string[];
139
+ distanceMeters: number;
140
+ durationSeconds: number;
141
+ }
142
+ export interface RouteLeg {
143
+ distanceMeters: number;
144
+ durationSeconds: number;
145
+ /** Only when `steps: true` was asked for. */
146
+ steps?: RouteStep[];
147
+ }
148
+ export interface Route {
149
+ mode: string;
150
+ distanceMeters: number;
151
+ durationSeconds: number;
152
+ legs: RouteLeg[];
153
+ /** Only when `geometry` was asked for; omitted by default on purpose. */
154
+ geometry?: string | {
155
+ type: string;
156
+ coordinates: number[][];
157
+ };
158
+ /** Only when `exposure.sets` was asked for. */
159
+ exposure?: Array<{
160
+ set: string;
161
+ zone: string;
162
+ properties?: unknown;
163
+ metersInside: number;
164
+ }>;
165
+ }
166
+ export interface RouteResponse {
167
+ route: Route;
168
+ alternatives?: Route[];
169
+ /** The SNAPPED locations, and how far each moved to reach a road. */
170
+ locations: Array<{
171
+ lat: number;
172
+ lng: number;
173
+ snapDistanceMeters: number;
174
+ }>;
175
+ avoid?: {
176
+ applied: Array<{
177
+ set: string;
178
+ zone: string;
179
+ }>;
180
+ /** A zone holding one of the locations cannot be avoided for that route. */
181
+ skipped: Array<{
182
+ set: string;
183
+ zone: string;
184
+ reason: string;
185
+ locationIndex?: number;
186
+ }>;
187
+ };
188
+ warnings: Array<{
189
+ type: string;
190
+ message?: string;
191
+ }>;
192
+ errors: Array<{
193
+ type: string;
194
+ message: string;
195
+ }>;
196
+ }
86
197
  /**
87
198
  * Shape confirmed against the live API on 2026-09-16, not guessed from the
88
199
  * OpenAPI spec — the spec lists a subset of these fields, and an OpenAPI object
package/dist/api.js CHANGED
@@ -102,8 +102,13 @@ export async function request(path, init = {}) {
102
102
  case 400:
103
103
  throw new ApiError(`The request was rejected: ${detail}`, 400);
104
104
  case 401:
105
- throw new ApiError(`The API key was rejected (${detail}). Check ATLASFETCH_API_KEY, or create a new key at ` +
106
- 'https://atlasfetch.xyz/dashboard — keys are shown once and stored hashed.', 401);
105
+ throw new ApiError(
106
+ // Since 2026-10-12 keys can be shown again in the dashboard, and every key
107
+ // made before then was revoked. Someone holding an old key is told to copy
108
+ // a live one, not to start over.
109
+ `The API key was rejected (${detail}). Copy a live key from ` +
110
+ 'https://atlasfetch.xyz/dashboard, where keys can be shown at any time, and set it as ' +
111
+ 'ATLASFETCH_API_KEY. Keys made before 12 October 2026 were revoked.', 401);
107
112
  case 402:
108
113
  throw new ApiError(`The monthly lookup allowance is exhausted (${detail}). It resets at the start of the next ` +
109
114
  'billing period; retrying before then will fail the same way.', 402);
@@ -111,12 +116,20 @@ export async function request(path, init = {}) {
111
116
  throw new ApiError(`The current plan does not allow this, or a cap was exceeded: ${detail}`, 403);
112
117
  case 404:
113
118
  throw new ApiError(detail || 'Not found.', 404);
119
+ case 422:
120
+ // Routing only: the request was valid and was attempted, so it IS billed.
121
+ // Retrying the identical route cannot succeed; the locations must move.
122
+ throw new ApiError(`${detail} This one was billed, because the route was attempted. Retrying the same ` +
123
+ 'locations will fail the same way — move them nearer a road, or closer together.', 422);
114
124
  case 409:
115
125
  throw new ApiError(detail || 'Conflict — something of that name already exists.', 409);
116
126
  case 429: {
117
127
  const retryAfter = response.headers.get('retry-after');
118
128
  throw new ApiError(`Rate limited${retryAfter ? `; retry after ${retryAfter}s` : ''}. The limit is per key, per second.`, 429, true);
119
129
  }
130
+ case 503:
131
+ throw new ApiError(`The routing engine is not answering right now (${detail}). Nothing was billed. ` +
132
+ 'Lookups are unaffected; try the route again in a few minutes.', 503, true);
120
133
  default:
121
134
  throw new ApiError(`AtlasFetch returned ${response.status}: ${detail}`, response.status, response.status >= 500);
122
135
  }
package/dist/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,gBAAgB,GAAG,4BAA4B,CAAA;AAErD;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,OAAO,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,IAAI,QAAQ,CAChB,8CAA8C,MAAM,wCAAwC;gBAC1F,8DAA8D,EAChE,GAAG,CACJ,CAAA;QACH,KAAK,GAAG;YACN,MAAM,IAAI,QAAQ,CAAC,gEAAgE,MAAM,EAAE,EAAE,GAAG,CAAC,CAAA;QACnG,KAAK,GAAG;YACN,MAAM,IAAI,QAAQ,CAAC,MAAM,IAAI,YAAY,EAAE,GAAG,CAAC,CAAA;QACjD,KAAK,GAAG;YACN,0EAA0E;YAC1E,wEAAwE;YACxE,MAAM,IAAI,QAAQ,CAChB,GAAG,MAAM,2EAA2E;gBAClF,iFAAiF,EACnF,GAAG,CACJ,CAAA;QACH,KAAK,GAAG;YACN,MAAM,IAAI,QAAQ,CAAC,MAAM,IAAI,mDAAmD,EAAE,GAAG,CAAC,CAAA;QACxF,KAAK,GAAG,CAAC,CAAC,CAAC;YACT,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;YACtD,MAAM,IAAI,QAAQ,CAChB,eAAe,UAAU,CAAC,CAAC,CAAC,iBAAiB,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,qCAAqC,EACpG,GAAG,EACH,IAAI,CACL,CAAA;QACH,CAAC;QACD,KAAK,GAAG;YACN,MAAM,IAAI,QAAQ,CAChB,kDAAkD,MAAM,yBAAyB;gBAC/E,+DAA+D,EACjE,GAAG,EACH,IAAI,CACL,CAAA;QACH;YACE,MAAM,IAAI,QAAQ,CAAC,uBAAuB,QAAQ,CAAC,MAAM,KAAK,MAAM,EAAE,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,IAAI,GAAG,CAAC,CAAA;IACpH,CAAC;AACH,CAAC"}
package/dist/server.js CHANGED
@@ -46,13 +46,89 @@ function summarise(result) {
46
46
  parts.push(`sets: ${setNames.join('; ')}`);
47
47
  return parts.join(' · ');
48
48
  }
49
+ /** 840 -> "840 m", 3513 -> "3.5 km", 51000 -> "51 km". */
50
+ const distance = (meters) => meters >= 1000 ? `${(meters / 1000).toFixed(meters >= 10000 ? 0 : 1)} km` : `${Math.round(meters)} m`;
51
+ /** 44 -> "44 s", 306 -> "5 min", 3906 -> "1 h 5 min". */
52
+ function clock(seconds) {
53
+ if (seconds < 60)
54
+ return `${Math.round(seconds)} s`;
55
+ const minutes = Math.round(seconds / 60);
56
+ if (minutes < 60)
57
+ return `${minutes} min`;
58
+ return `${Math.floor(minutes / 60)} h ${minutes % 60} min`;
59
+ }
60
+ /**
61
+ * The line before the JSON: what the route is, at a glance, with the things a
62
+ * reader would otherwise have to dig for — a location snapped a long way, a
63
+ * zone the route could not avoid, how far it ran inside a measured one. The
64
+ * traffic caveat rides along, because a duration with no caveat reads as an ETA.
65
+ */
66
+ function summariseRoute(result) {
67
+ const { route } = result;
68
+ const parts = [`${route.mode}: ${distance(route.distanceMeters)} · ${clock(route.durationSeconds)}`];
69
+ if (route.legs.length > 1)
70
+ parts.push(`${route.legs.length} legs`);
71
+ const stepCount = route.legs.reduce((total, leg) => total + (leg.steps?.length ?? 0), 0);
72
+ if (stepCount > 0)
73
+ parts.push(`${stepCount} steps`);
74
+ const alternatives = result.alternatives?.length ?? 0;
75
+ if (alternatives > 0)
76
+ parts.push(`${alternatives} alternative${alternatives === 1 ? '' : 's'}`);
77
+ const far = result.locations.filter(l => l.snapDistanceMeters >= 50);
78
+ if (far.length > 0) {
79
+ parts.push(`a location moved ${distance(Math.max(...far.map(l => l.snapDistanceMeters)))} to reach a road`);
80
+ }
81
+ for (const zone of route.exposure ?? [])
82
+ parts.push(`${distance(zone.metersInside)} inside ${zone.zone}`);
83
+ const skipped = result.avoid?.skipped?.length ?? 0;
84
+ if (skipped > 0)
85
+ parts.push(`${skipped} avoid zone${skipped === 1 ? '' : 's'} skipped`);
86
+ return `${parts.join(' · ')} — free-flow, no traffic`;
87
+ }
88
+ /**
89
+ * The dispatch table from the API's docs, applied: what to DO with a geocode.
90
+ * Ambiguity is checked first, because an ambiguous house is still the wrong
91
+ * house half the time, however precise it claims to be.
92
+ */
93
+ function dispatchAdvice(result) {
94
+ if (result.ambiguous || result.precision === 'locality') {
95
+ return 'ask the customer before dispatching';
96
+ }
97
+ if (result.precision === 'street') {
98
+ return 'right street, not the house: ask the recipient for a pin or a landmark';
99
+ }
100
+ if (result.confidence < 0.5) {
101
+ return 'house found, but with low confidence: check with the customer';
102
+ }
103
+ return 'dispatch';
104
+ }
105
+ /** "address · 0.96 · 25 Adderley Street, Cape Town, ZA-WC — dispatch". */
106
+ function summariseGeocode(result) {
107
+ if (!result)
108
+ return 'Nothing trustworthy found for that address. The lookup was still billed.';
109
+ const m = result.matched;
110
+ const where = [
111
+ [m.housenumber, m.street].filter(Boolean).join(' '),
112
+ m.locality,
113
+ m.region ?? m.country,
114
+ ].filter(Boolean).join(', ');
115
+ const flags = [
116
+ result.precision,
117
+ `confidence ${result.confidence}`,
118
+ ...(result.ambiguous ? ['ambiguous'] : []),
119
+ ...(result.unmatched.length > 0 ? [`unmatched: ${result.unmatched.join(', ')}`] : []),
120
+ ];
121
+ return `${flags.join(' · ')} · ${where} — ${dispatchAdvice(result)}`;
122
+ }
49
123
  export function createServer() {
50
124
  const server = new McpServer({ name: 'atlasfetch', version: VERSION }, {
51
125
  instructions: 'AtlasFetch answers "which place is this coordinate in?" — the country, region and ' +
52
126
  'municipality containing a point, the nearest street and house number (opt-in), ' +
53
- 'plus the boundaries the caller has uploaded themselves. It does not do forward ' +
54
- 'geocoding or place search, routing or distances, and it does not return boundary geometry ' +
55
- 'for the reference layers.',
127
+ 'plus the boundaries the caller has uploaded themselves. It also routes between ' +
128
+ 'coordinates, optionally around those same boundaries (get_route, 10 lookups a call on the ' +
129
+ 'standard plans, free-flow durations with no traffic), and geocodes addresses to ' +
130
+ 'coordinates in South Africa (geocode_address, 1 lookup). It does not search for places ' +
131
+ 'by name, and it does not return boundary geometry for the reference layers.',
56
132
  });
57
133
  // ── The lookup ─────────────────────────────────────────────────────────────
58
134
  server.registerTool('lookup_location', {
@@ -65,8 +141,9 @@ export function createServer() {
65
141
  'Use for: which country, region or municipality a point is in; which street a point is on',
66
142
  '(add "street" to base); geofence checks against your own polygons; tagging data with region',
67
143
  'codes.',
68
- 'Do NOT use for: forward geocoding or place search (an address to a coordinate), routing,',
69
- 'distances, or fetching boundary geometry.',
144
+ 'For the other direction, an address to a coordinate, use geocode_address. For a route,',
145
+ 'a travel distance or a travel time, use get_route — 10 lookups on the standard plans to',
146
+ 'this one’s 1. Do NOT use for place search by name or for fetching boundary geometry.',
70
147
  '',
71
148
  'Caveats worth repeating to the user: municipal is the finest unit AVAILABLE, not a',
72
149
  'consistent kind of thing — Los Angeles returns a city, rural Kansas returns a county, so',
@@ -82,7 +159,8 @@ export function createServer() {
82
159
  'Two different nulls: base.street === null means there is no street data for the point’s',
83
160
  'country, while an entry whose fields are null means nothing was within that radius —',
84
161
  'never report them the same way. streetNumber and postcode are STRINGS (44A, 12-14, 0181),',
85
- 'house numbers are rare outside well-mapped areas, and no street geometry is returned.',
162
+ 'house numbers are rare outside well-mapped areas. Street geometry comes back only when',
163
+ 'streetGeometry is set — leave it off unless something will draw the line.',
86
164
  '',
87
165
  'One call is one billed lookup however many layers, sets or grid codes it touches, and a',
88
166
  'call that matches nothing still bills.',
@@ -112,15 +190,27 @@ export function createServer() {
112
190
  ])
113
191
  .optional()
114
192
  .describe('Plus Code length. 9 is not a valid length. 10 is about 14 m.'),
193
+ streetGeometry: z
194
+ .enum(['polyline6', 'geojson'])
195
+ .optional()
196
+ .describe('Give each street answer the line of the street it names, trimmed to about 250 m either ' +
197
+ 'side of the point. Implies the street layer. Off by default, and leave it off unless ' +
198
+ 'something will draw it: a line is hundreds of characters nobody reads.'),
115
199
  },
116
200
  annotations: { readOnlyHint: true, openWorldHint: true },
117
- }, async ({ lat, lng, base, sets, encode, h3res, pluslen }) => {
201
+ }, async ({ lat, lng, base, sets, encode, h3res, pluslen, streetGeometry }) => {
118
202
  try {
203
+ // The API refuses streetgeom without the street layer. Asking for the line
204
+ // of the street means asking for the street, so add it rather than fail.
205
+ const layers = streetGeometry && !(base ?? []).includes('street')
206
+ ? [...(base ?? ['country', 'region', 'municipal']), 'street']
207
+ : base;
119
208
  const result = await request('/location/lookup', {
120
209
  query: {
121
210
  lat: String(lat),
122
211
  lng: String(lng),
123
- base: base?.join(','),
212
+ base: layers?.join(','),
213
+ streetgeom: streetGeometry,
124
214
  set: sets?.join(','),
125
215
  encode: encode?.join(','),
126
216
  h3res: h3res === undefined ? undefined : String(h3res),
@@ -136,6 +226,102 @@ export function createServer() {
136
226
  return fail(error);
137
227
  }
138
228
  });
229
+ // ── Geocoding ─────────────────────────────────────────────────────────────
230
+ server.registerTool('geocode_address', {
231
+ title: 'Geocode an address to a coordinate (South Africa)',
232
+ description: [
233
+ 'Turn ONE address into a point, with an honest account of how much of it was found. Built',
234
+ 'for deliveries. South Africa today; more countries as their data loads. 1 lookup per',
235
+ 'address, found or not.',
236
+ '',
237
+ 'Send either q (one line) or address (housenumber, street, suburb, city, postcode, unit) —',
238
+ 'never both. If the address is already split, send it split: it matches better.',
239
+ '',
240
+ 'READ precision BEFORE using the point. "address" means the house was found;',
241
+ '"interpolated" means it was estimated between the numbers either side; "street" means the',
242
+ 'right street but NOT the house; "locality" means only the suburb or town. NEVER present',
243
+ 'a street- or locality-level point as a door: a driver sent there will be at the wrong',
244
+ 'house. In South Africa most answers are street-level, because OpenStreetMap has house',
245
+ 'numbers on about 13% of street names — that is the data being honest, not a failure.',
246
+ '',
247
+ 'What to do with an answer — the result line says which applies:',
248
+ '- address or interpolated, not ambiguous, confidence 0.5 or more: dispatch.',
249
+ '- street: ask the recipient for a pin or a landmark.',
250
+ '- ambiguous, or locality: ask the customer before dispatching.',
251
+ 'confidence ranks answers; it is NOT a probability. ambiguous means a same-named street',
252
+ 'elsewhere scored about as well. result null means nothing trustworthy was found, and',
253
+ 'that still costs the lookup.',
254
+ '',
255
+ 'country is a hard filter; region (ZA-WC, or "Western Cape") only ranks streets inside it',
256
+ 'first, so a wrong province does not lose the address. An uncovered country is refused,',
257
+ 'unbilled, with the list of covered countries in the message — that message is the live',
258
+ 'coverage list; there is no other. sets and base answer "which delivery zone is it in" in',
259
+ 'the same call, at no extra cost.',
260
+ '',
261
+ 'One address per call, deliberately. For a delivery list, call this once per row so the',
262
+ 'user sees what is being spent; programs with thousands of rows should use the API’s',
263
+ 'POST /geocode/batch directly. Not for: searching for a business or landmark by name,',
264
+ 'or a coordinate to an address (that is lookup_location with the street layer).',
265
+ ].join('\n'),
266
+ inputSchema: {
267
+ q: z.string().max(300).optional().describe('The whole address on one line, e.g. "25 Adderley Street, Cape Town".'),
268
+ address: z
269
+ .object({
270
+ housenumber: z.string().max(120).optional(),
271
+ street: z.string().max(120).optional(),
272
+ suburb: z.string().max(120).optional(),
273
+ city: z.string().max(120).optional(),
274
+ postcode: z.string().max(120).optional(),
275
+ unit: z.string().max(120).optional(),
276
+ })
277
+ .optional()
278
+ .describe('The address already split into parts. Needs at least a street. Use instead of q.'),
279
+ country: z
280
+ .string()
281
+ .length(2)
282
+ .optional()
283
+ .describe('ISO 3166-1 alpha-2, e.g. "ZA". A hard filter: only that country is searched.'),
284
+ region: z
285
+ .string()
286
+ .max(120)
287
+ .optional()
288
+ .describe('ISO 3166-2 ("ZA-WC") or a name ("Western Cape"). A preference, not a filter.'),
289
+ sets: z
290
+ .array(z.string().max(64))
291
+ .optional()
292
+ .describe('Boundary sets on this account to match at the found point, e.g. delivery zones.'),
293
+ base: z
294
+ .array(z.enum(['country', 'region', 'municipal']))
295
+ .optional()
296
+ .describe('Administrative layers to resolve at the found point.'),
297
+ streetGeometry: z
298
+ .enum(['polyline6', 'geojson'])
299
+ .optional()
300
+ .describe('The matched street’s line, trimmed to about 250 m. Only if something will draw it.'),
301
+ },
302
+ annotations: { readOnlyHint: true, openWorldHint: true },
303
+ }, async ({ q, address, country, region, sets, base, streetGeometry }) => {
304
+ // Refuse locally rather than spend a request on a shape the API refuses.
305
+ if ((q === undefined) === (address === undefined)) {
306
+ return {
307
+ content: [{ type: 'text', text: 'Send either q (one line) or address (split into parts) — exactly one of them.' }],
308
+ isError: true,
309
+ };
310
+ }
311
+ try {
312
+ const answer = await request('/geocode', {
313
+ method: 'POST',
314
+ body: { q, address, country, region, set: sets, base, streetgeom: streetGeometry },
315
+ });
316
+ const problems = answer.errors.length > 0
317
+ ? `\n\nPartial problems (the geocode still answered):\n${answer.errors.map(e => `- [${e.type}] ${e.message}`).join('\n')}`
318
+ : '';
319
+ return ok(`${summariseGeocode(answer.result)}\n\n${json(answer)}${problems}`);
320
+ }
321
+ catch (error) {
322
+ return fail(error);
323
+ }
324
+ });
139
325
  // ── Boundary sets ──────────────────────────────────────────────────────────
140
326
  server.registerTool('list_boundary_sets', {
141
327
  title: 'List the boundary sets on this account',
@@ -261,6 +447,203 @@ export function createServer() {
261
447
  return fail(error);
262
448
  }
263
449
  });
450
+ server.registerTool('update_boundary', {
451
+ title: 'Move or reshape a boundary, keeping its name and properties',
452
+ description: [
453
+ 'Replace the shape of ONE existing boundary. Its id, name, properties and set stay as they',
454
+ 'are, so every lookup that matches it keeps returning the same properties.',
455
+ '',
456
+ 'Use this to fix or move a zone. Do NOT delete it and add it again: that gives it a new id',
457
+ 'and loses the properties unless they are re-sent.',
458
+ '',
459
+ 'Name the boundary by set and name; this finds its id. If a set holds two boundaries with',
460
+ 'that name, the answer lists their ids and asks for one. The new shape gets the same',
461
+ 'checks as add_boundary, including the plan’s points-per-boundary cap (refused, unbilled).',
462
+ 'Only boundaries on this account can be changed.',
463
+ ].join('\n'),
464
+ inputSchema: {
465
+ set: z.string().max(64).describe('The set the boundary is in.'),
466
+ name: z.string().max(100).optional().describe('The boundary’s name. Use this or id.'),
467
+ id: z
468
+ .string()
469
+ .regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, 'A boundary id is a UUID; give the name instead.')
470
+ .optional()
471
+ .describe('The boundary’s id (a UUID), when it is known. Use this or name.'),
472
+ geometry: z
473
+ .object({
474
+ type: z.literal('Polygon'),
475
+ coordinates: z
476
+ .array(z.array(z.array(z.number()).min(2).max(3)).min(4))
477
+ .min(1)
478
+ .describe('Rings of [longitude, latitude]; the first is the outline, any others holes. Each ring closed.'),
479
+ })
480
+ .describe('The new shape: a GeoJSON Polygon.'),
481
+ },
482
+ // destructiveHint: the old shape is gone. idempotentHint: sending the same
483
+ // shape twice leaves the same boundary.
484
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
485
+ }, async ({ set, name, id, geometry }) => {
486
+ if (!id && !name) {
487
+ return { content: [{ type: 'text', text: 'Name the boundary (name) or give its id.' }], isError: true };
488
+ }
489
+ try {
490
+ let target = id;
491
+ if (!target) {
492
+ const view = await request('/boundaries/view', { query: { set } });
493
+ const matches = view.boundaries.filter(b => b.name === name);
494
+ if (matches.length === 0) {
495
+ const names = view.boundaries.map(b => b.name);
496
+ return {
497
+ content: [{
498
+ type: 'text',
499
+ text: `No boundary named "${name}" in set "${set}".` +
500
+ (names.length > 0 ? ` Its boundaries are: ${names.join(', ')}.` : ' The set is empty.'),
501
+ }],
502
+ isError: true,
503
+ };
504
+ }
505
+ if (matches.length > 1) {
506
+ return {
507
+ content: [{
508
+ type: 'text',
509
+ text: `Set "${set}" has ${matches.length} boundaries named "${name}". Call again with one ` +
510
+ `of these ids: ${matches.map(b => `${b.id} (${b.pointCount ?? '?'} points)`).join(', ')}.`,
511
+ }],
512
+ isError: true,
513
+ };
514
+ }
515
+ target = matches[0].id;
516
+ }
517
+ const updated = await request(`/boundaries/${encodeURIComponent(target)}`, {
518
+ method: 'PATCH',
519
+ body: { geometry },
520
+ });
521
+ return ok(`Reshaped "${updated.name}" in set "${updated.set ?? set}"; its properties are unchanged.\n\n${json({ ...updated, geometry: undefined })}`);
522
+ }
523
+ catch (error) {
524
+ return fail(error);
525
+ }
526
+ });
527
+ // ── Directions ─────────────────────────────────────────────────────────────
528
+ server.registerTool('get_route', {
529
+ title: 'Route between coordinates, optionally avoiding your own zones',
530
+ description: [
531
+ 'A driving, cycling, walking or truck route from the first location to the last, via any',
532
+ 'in between, with distance, duration and turn-by-turn steps.',
533
+ '',
534
+ 'COST: a route is 10 LOOKUPS on the standard plans, not one (a custom plan may charge less;',
535
+ 'X-Lookups-Remaining is always the truth). Everything it returns is included in that, so do',
536
+ 'not call it in a loop to compare options without saying so.',
537
+ '',
538
+ 'Durations are FREE-FLOW: the road network at its own speed limits, with NO live or',
539
+ 'historical traffic. Never present one as an arrival time in traffic — for that, say a',
540
+ 'traffic-aware service (Google, Mapbox) is needed.',
541
+ '',
542
+ 'The route line is NOT returned unless geometry is set, because an encoded polyline is',
543
+ 'thousands of characters that no one reads. Ask for it only when something will draw it.',
544
+ '',
545
+ 'Locations are SNAPPED to the nearest routable road, and locations[] in the response says',
546
+ 'how far each one moved. A large snapDistanceMeters means the answer starts somewhere else',
547
+ 'than asked — worth repeating to the user.',
548
+ '',
549
+ 'avoidSets and exposureSets name BOUNDARY SETS on the account (list_boundary_sets), not',
550
+ 'ad-hoc shapes. avoid routes around every zone in those sets; exposure leaves the route',
551
+ 'alone and reports how far it ran inside each zone. A zone containing one of the locations',
552
+ 'cannot be avoided for that route: it is skipped and reported in avoid.skipped.',
553
+ '',
554
+ 'Limits by plan: 2 locations and 1 alternative on the free plans, up to 25 and 2 on Pro;',
555
+ 'truck is Pro only; alternatives need exactly 2 locations. Over a cap the answer is 403,',
556
+ 'and nothing is billed. A location with no road near it, or two places with no road',
557
+ 'between them, is 422 — and that one IS billed, because the route was attempted.',
558
+ '',
559
+ 'Not for: distance matrices, isochrones or live traffic (none exist yet), and not for',
560
+ 'which-area-is-this questions — that is lookup_location, at one lookup.',
561
+ ].join('\n'),
562
+ inputSchema: {
563
+ locations: z
564
+ .array(z.object({
565
+ lat: z.number().min(-90).max(90).describe('Latitude, -90 to 90.'),
566
+ lng: z.number().min(-180).max(180).describe('Longitude, -180 to 180.'),
567
+ }))
568
+ .min(2)
569
+ .max(25)
570
+ .describe('Origin, any stops in order, then destination. 2 on the free plans, up to 25 on Pro.'),
571
+ mode: z
572
+ .enum(['car', 'bike', 'foot', 'truck'])
573
+ .optional()
574
+ .describe('Travel mode. Defaults to car. "truck" is Pro only and obeys vehicle limits.'),
575
+ steps: z
576
+ .boolean()
577
+ .optional()
578
+ .describe('Turn-by-turn steps per leg. Defaults to true here; set false for distance and time only.'),
579
+ alternatives: z
580
+ .number()
581
+ .int()
582
+ .min(0)
583
+ .max(2)
584
+ .optional()
585
+ .describe('Also return up to this many other routes. Exactly 2 locations only. Plan-capped.'),
586
+ avoidSets: z
587
+ .array(z.string().max(64))
588
+ .optional()
589
+ .describe('Names of boundary sets on this account to route AROUND. Every zone in them is excluded.'),
590
+ exposureSets: z
591
+ .array(z.string().max(64))
592
+ .optional()
593
+ .describe('Names of boundary sets to MEASURE against: the route is unchanged, and the answer says how ' +
594
+ 'many metres of it ran inside each zone.'),
595
+ geometry: z
596
+ .enum(['none', 'polyline6', 'geojson'])
597
+ .optional()
598
+ .describe('The route line. Defaults to none. Ask for polyline6 or geojson only when something will ' +
599
+ 'draw it: it is long, and an assistant cannot read it usefully.'),
600
+ language: z
601
+ .string()
602
+ .max(16)
603
+ .optional()
604
+ .describe('Language for the step instructions, e.g. "en-GB", "de-DE", "fr-FR". Defaults to en-US.'),
605
+ vehicle: z
606
+ .object({
607
+ heightMeters: z.number().optional(),
608
+ widthMeters: z.number().optional(),
609
+ lengthMeters: z.number().optional(),
610
+ weightTonnes: z.number().optional(),
611
+ axleLoadTonnes: z.number().optional(),
612
+ hazmat: z.boolean().optional(),
613
+ })
614
+ .optional()
615
+ .describe('Truck dimensions and load. Only with mode "truck"; rejected otherwise.'),
616
+ },
617
+ annotations: { readOnlyHint: true, openWorldHint: true },
618
+ }, async ({ locations, mode, steps, alternatives, avoidSets, exposureSets, geometry, language, vehicle }) => {
619
+ try {
620
+ const result = await request('/route', {
621
+ method: 'POST',
622
+ body: {
623
+ locations,
624
+ mode,
625
+ // Steps are the point of asking an assistant for directions, so they
626
+ // are on unless turned off — the API itself defaults them off.
627
+ steps: steps ?? true,
628
+ alternatives,
629
+ geometry: geometry ?? 'none',
630
+ language,
631
+ vehicle,
632
+ avoid: avoidSets?.length ? { sets: avoidSets } : undefined,
633
+ exposure: exposureSets?.length ? { sets: exposureSets } : undefined,
634
+ },
635
+ });
636
+ const notes = [
637
+ ...result.warnings.map(w => `- [${w.type}] ${w.message ?? ''}`.trimEnd()),
638
+ ...result.errors.map(e => `- [${e.type}] ${e.message}`),
639
+ ];
640
+ const problems = notes.length > 0 ? `\n\nNotes (the route still answered):\n${notes.join('\n')}` : '';
641
+ return ok(`${summariseRoute(result)}\n\n${json(result)}${problems}`);
642
+ }
643
+ catch (error) {
644
+ return fail(error);
645
+ }
646
+ });
264
647
  return server;
265
648
  }
266
649
  //# sourceMappingURL=server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACnE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,GAEjD,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAqBtC,gFAAgF;AAChF,SAAS,EAAE,CAAC,IAAY;IACtB,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,eAAe,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;IACpE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAA;AACpD,CAAC;AAED,SAAS,IAAI,CAAC,KAAc;IAC1B,MAAM,OAAO,GAAG,KAAK,YAAY,QAAQ;Q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F,MAAM,KAAK,GAAG;gBACZ,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC;gBACzE,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;aACxD,CAAA;YACD,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,0CAA0C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;YAErG,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,QAAQ,EAAE,CAAC,CAAA;QACtE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAA;QACpB,CAAC;IACH,CAAC,CACF,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
package/dist/version.d.ts CHANGED
@@ -4,4 +4,4 @@
4
4
  * package.json, server.json and manifest.json by scripts/release.mjs, which
5
5
  * refuses to release if they disagree.
6
6
  */
7
- export declare const VERSION = "0.1.6";
7
+ export declare const VERSION = "0.3.0";
package/dist/version.js CHANGED
@@ -4,5 +4,5 @@
4
4
  * package.json, server.json and manifest.json by scripts/release.mjs, which
5
5
  * refuses to release if they disagree.
6
6
  */
7
- export const VERSION = '0.1.6';
7
+ export const VERSION = '0.3.0';
8
8
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "atlasfetch-mcp",
3
- "version": "0.1.6",
3
+ "version": "0.3.0",
4
4
  "mcpName": "xyz.atlasfetch/atlasfetch",
5
- "description": "MCP server for AtlasFetch — reverse geocode a coordinate to its country, region and municipality (ISO 3166 codes), the nearest street and house number, and match it against your own geofences.",
5
+ "description": "MCP server for AtlasFetch — reverse geocode a coordinate to its country, region and municipality (ISO 3166 codes), the nearest street and house number, geocode South African addresses, match against your own geofences, and route around them.",
6
6
  "keywords": [
7
7
  "mcp",
8
8
  "modelcontextprotocol",
package/server.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "xyz.atlasfetch/atlasfetch",
4
4
  "title": "AtlasFetch",
5
- "description": "Reverse geocode a coordinate to country, region, municipality and street, plus your own geofences.",
6
- "version": "0.1.6",
5
+ "description": "Coordinates to places and streets, ZA addresses to points, and routes around your own geofences.",
6
+ "version": "0.3.0",
7
7
  "websiteUrl": "https://atlasfetch.xyz",
8
8
  "repository": {
9
9
  "url": "https://github.com/atlasfetch-dev/atlasfetch-mcp",
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "atlasfetch-mcp",
16
- "version": "0.1.6",
16
+ "version": "0.3.0",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  },