bbox-mcp-server 1.2.2 → 1.2.4

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import proj4 from "proj4";
7
7
  import proj4defs from "./proj4defs.json" with { type: "json" };
8
8
  import { wktToGeoJSON as parseWKT } from "@terraformer/wkt";
9
9
  const SERVER_NAME = "bbox-mcp-server";
10
- const SERVER_VERSION = "1.2.2";
10
+ const SERVER_VERSION = "1.2.4";
11
11
  const MAX_H3_CELLS = process.env.MAX_H3_CELLS ? parseInt(process.env.MAX_H3_CELLS, 10) : 50000;
12
12
  const MAPBOX_ACCESS_TOKEN = process.env.MAPBOX_ACCESS_TOKEN;
13
13
  const MAX_INPUT_LENGTH = 1_000_000; // 1 MB input size guard
@@ -131,7 +131,9 @@ function parseBBox(input) {
131
131
  return ensureValidBBox(minCoords[1], minCoords[0], maxCoords[1], maxCoords[0]);
132
132
  }
133
133
  }
134
- catch (e) { /* Fall through to next parser */ }
134
+ catch (e) {
135
+ log('info', 'parseBBox: ogrinfo extent parse failed, trying next parser', { error: e?.message });
136
+ }
135
137
  }
136
138
  // --- 2. GeoJSON Sniffer ---
137
139
  try {
@@ -148,7 +150,9 @@ function parseBBox(input) {
148
150
  return ensureValidBBox(safeMin(lats), safeMin(lngs), safeMax(lats), safeMax(lngs));
149
151
  }
150
152
  }
151
- catch (e) { /* Not valid JSON, fall through */ }
153
+ catch (e) {
154
+ log('info', 'parseBBox: GeoJSON parse failed, trying next parser', { error: e?.message });
155
+ }
152
156
  // --- 3. WKT Sniffer ---
153
157
  if (input.toUpperCase().includes("POLYGON") || input.toUpperCase().includes("POINT") || input.toUpperCase().includes("LINESTRING")) {
154
158
  try {
@@ -160,7 +164,9 @@ function parseBBox(input) {
160
164
  return ensureValidBBox(safeMin(lats), safeMin(lngs), safeMax(lats), safeMax(lngs));
161
165
  }
162
166
  }
163
- catch (e) { /* Full WKT parse failed */ }
167
+ catch (e) {
168
+ log('info', 'parseBBox: WKT parse failed, trying next parser', { error: e?.message });
169
+ }
164
170
  }
165
171
  // --- 4. Standard Coordinate Array Sniffer ---
166
172
  // Strip brackets/parentheses and split by commas or spaces
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bbox-mcp-server",
3
3
  "mcpName": "io.github.iamvibhorsingh/bbox-mcp-server",
4
- "version": "1.2.2",
4
+ "version": "1.2.4",
5
5
  "description": "MCP server for bounding box coordinate conversion, EPSG projections, Uber H3 hexagonal indexing, Overpass OSM queries, and shareable map links",
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  "prepublishOnly": "npm run build"
48
48
  },
49
49
  "dependencies": {
50
- "@modelcontextprotocol/sdk": "^1.6.1",
50
+ "@modelcontextprotocol/sdk": "^1.27.1",
51
51
  "@terraformer/wkt": "^2.2.1",
52
52
  "h3-js": "^4.1.0",
53
53
  "proj4": "^2.15.0"