@shyzus/mcp-geocrafter 1.3.0 β†’ 1.4.1

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/README.md +30 -14
  2. package/package.json +6 -3
package/README.md CHANGED
@@ -3,13 +3,14 @@
3
3
  GeoCrafter is a clean, modular MCP server for geocoding and reverse geocoding - Powered by Photon API (OpenStreetMap + Elasticsearch) with fuzzy matching support.
4
4
 
5
5
  [![CI](https://github.com/Shyzkanza/mcp-location/actions/workflows/ci.yml/badge.svg)](https://github.com/Shyzkanza/mcp-location/actions/workflows/ci.yml)
6
+ [![Release](https://github.com/Shyzkanza/mcp-location/actions/workflows/release.yml/badge.svg)](https://github.com/Shyzkanza/mcp-location/actions/workflows/release.yml)
6
7
  [![npm version](https://img.shields.io/npm/v/@shyzus/mcp-geocrafter)](https://www.npmjs.com/package/@shyzus/mcp-geocrafter)
7
8
  [![npm downloads](https://img.shields.io/npm/dm/@shyzus/mcp-geocrafter?cacheSeconds=3600)](https://www.npmjs.com/package/@shyzus/mcp-geocrafter)
8
9
  [![Website Status](https://img.shields.io/website?url=https%3A%2F%2Fgeocrafter.rankorr.red%2Fhealth&label=API)](https://geocrafter.rankorr.red/health)
9
10
  ![Node](https://img.shields.io/badge/node-20%2B-green)
10
11
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)
11
12
  ![MCP](https://img.shields.io/badge/MCP-2025--11--25-orange)
12
- ![ChatGPT](https://img.shields.io/badge/ChatGPT-Apps%20SDK-purple)
13
+ ![ChatGPT](https://img.shields.io/badge/ChatGPT-MCP-purple)
13
14
 
14
15
  ---
15
16
 
@@ -32,31 +33,35 @@ This application allows **ChatGPT** and other MCP clients to access geocoding se
32
33
 
33
34
  ### ✨ Features
34
35
 
35
- - πŸ” **Address to GPS** - Convert addresses to coordinates
36
+ - πŸ” **Address to GPS** - Convert addresses to coordinates (fuzzy matching)
36
37
  - πŸ“ **GPS to Address** - Convert coordinates to addresses
38
+ - πŸ”— **Geohash Encoding/Decoding** - Convert coordinates to geohash strings for location deduplication
39
+ - πŸ“ **Distance Calculation** - Haversine formula to compute exact distance between two GPS points
37
40
  - πŸ—οΈ **Modular Architecture** - Clean separation of concerns, reusable for future MCP servers
38
41
  - πŸ”Œ **Dual Mode** - Works with ChatGPT (HTTP) and IDEs (stdio)
39
42
  - πŸ—ΊοΈ **GeoJSON Map Viewer** - Render interactive maps inside ChatGPT with fullscreen controls (Apps SDK)
40
43
 
41
- ### πŸ’¬ Usage example
44
+ ### πŸ’¬ Usage examples
42
45
 
43
- In ChatGPT, simply ask:
46
+ In ChatGPT or your IDE, simply ask:
44
47
 
45
48
  > "What are the coordinates of the Eiffel Tower?"
46
49
 
47
- Or:
48
-
49
50
  > "What is the address at coordinates 48.8566, 2.3522?"
50
51
 
51
- ChatGPT will use the MCP server to get the information.
52
+ > "Encode the Eiffel Tower coordinates as a geohash"
53
+
54
+ > "What's the distance between Paris and Marseille?"
55
+
56
+ The LLM will use the MCP server to get the information.
52
57
 
53
58
  ---
54
59
 
55
- ## πŸ—οΈ Architecture: ChatGPT MCP App
60
+ ## πŸ—οΈ Architecture: MCP Server
56
61
 
57
- ### What is a ChatGPT App?
62
+ ### What is an MCP Server?
58
63
 
59
- **ChatGPT Apps** (via [Apps SDK](https://developers.openai.com/apps-sdk)) allow you to extend ChatGPT with:
64
+ **MCP (Model Context Protocol)** servers allow you to extend ChatGPT and other LLMs with:
60
65
  - **Custom tools** (call external APIs)
61
66
  - **Real-time data** (up-to-date information)
62
67
 
@@ -171,10 +176,13 @@ npm test
171
176
  npm run test:watch
172
177
  ```
173
178
 
174
- 63 tests across 3 suites:
179
+ 90 tests across 6 suites:
175
180
  - `errors.test.ts` β€” Error classes, formatting, network detection (17 tests)
176
181
  - `config.test.ts` β€” Environment variables, validation, singleton (20 tests)
177
182
  - `displayGeoJsonMap.test.ts` β€” GeoJSON parsing, viewport, colors, output (26 tests)
183
+ - `geohash.test.ts` β€” Geohash encode/decode, roundtrip, precision (12 tests)
184
+ - `haversine.test.ts` β€” Haversine distance formula, edge cases, symmetry (8 tests)
185
+ - `calculateDistance.test.ts` β€” Distance tool validation, output format (7 tests)
178
186
 
179
187
  ---
180
188
 
@@ -357,9 +365,13 @@ mcp-location/
357
365
  β”‚ β”œβ”€β”€ tools/
358
366
  β”‚ β”‚ β”œβ”€β”€ searchAddress.ts # Tool: adresse β†’ GPS
359
367
  β”‚ β”‚ β”œβ”€β”€ reverseGeocode.ts # Tool: GPS β†’ adresse
368
+ β”‚ β”‚ β”œβ”€β”€ encodeGeohash.ts # Tool: GPS β†’ geohash
369
+ β”‚ β”‚ β”œβ”€β”€ decodeGeohash.ts # Tool: geohash β†’ GPS
370
+ β”‚ β”‚ β”œβ”€β”€ calculateDistance.ts # Tool: distance entre 2 points
360
371
  β”‚ β”‚ β”œβ”€β”€ displayGeoJsonMap.ts # Tool: GeoJSON β†’ widget UI
361
372
  β”‚ β”‚ └── __tests__/
362
- β”‚ β”‚ └── displayGeoJsonMap.test.ts
373
+ β”‚ β”‚ β”œβ”€β”€ displayGeoJsonMap.test.ts
374
+ β”‚ β”‚ └── calculateDistance.test.ts
363
375
  β”‚ β”œβ”€β”€ resources/
364
376
  β”‚ β”‚ └── mapViewerTemplate.ts # Template HTML pour ChatGPT
365
377
  β”‚ β”œβ”€β”€ servers/
@@ -367,8 +379,12 @@ mcp-location/
367
379
  β”‚ β”‚ └── http.ts # Serveur Streamable HTTP (ChatGPT)
368
380
  β”‚ β”œβ”€β”€ utils/
369
381
  β”‚ β”‚ β”œβ”€β”€ errors.ts # Gestion erreurs centralisΓ©e
382
+ β”‚ β”‚ β”œβ”€β”€ geohash.ts # Encode/decode geohash (zero deps)
383
+ β”‚ β”‚ β”œβ”€β”€ haversine.ts # Distance Haversine (zero deps)
370
384
  β”‚ β”‚ └── __tests__/
371
- β”‚ β”‚ └── errors.test.ts
385
+ β”‚ β”‚ β”œβ”€β”€ errors.test.ts
386
+ β”‚ β”‚ β”œβ”€β”€ geohash.test.ts
387
+ β”‚ β”‚ └── haversine.test.ts
372
388
  β”‚ β”œβ”€β”€ index.ts # Entry point stdio
373
389
  β”‚ β”œβ”€β”€ http-server.ts # Entry point HTTP
374
390
  β”‚ └── http-client.ts # Client npm
@@ -459,7 +475,7 @@ This project serves as a **template/base** for future MCP servers with a clean,
459
475
  - **`client/`**: External API abstraction (Photon)
460
476
  - **`tools/`**: Business logic (validation, transformation, formatting)
461
477
  - **`servers/`**: MCP implementation (stdio/Streamable HTTP), reuses tools
462
- - **`utils/errors.ts`**: Custom error classes, formatting
478
+ - **`utils/`**: Custom error classes, geohash encode/decode, Haversine distance (zero dependencies)
463
479
 
464
480
  See [CONTEXT.md](CONTEXT.md) for detailed architecture documentation.
465
481
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shyzus/mcp-geocrafter",
3
- "version": "1.3.0",
4
- "description": "GeoCrafter - MCP server for geocoding and reverse geocoding - Powered by Nominatim API",
3
+ "version": "1.4.1",
4
+ "description": "GeoCrafter - MCP server for geocoding, reverse geocoding, geohash and distance calculation - Powered by Photon API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -14,7 +14,10 @@
14
14
  "keywords": [
15
15
  "mcp",
16
16
  "geocoding",
17
- "nominatim",
17
+ "photon",
18
+ "geohash",
19
+ "distance",
20
+ "haversine",
18
21
  "location",
19
22
  "address",
20
23
  "gps",