@shyzus/mcp-geocrafter 1.3.0 β 1.4.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 +30 -14
- 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
|
[](https://github.com/Shyzkanza/mcp-location/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/Shyzkanza/mcp-location/actions/workflows/release.yml)
|
|
6
7
|
[](https://www.npmjs.com/package/@shyzus/mcp-geocrafter)
|
|
7
8
|
[](https://www.npmjs.com/package/@shyzus/mcp-geocrafter)
|
|
8
9
|
[](https://geocrafter.rankorr.red/health)
|
|
9
10
|

|
|
10
11
|

|
|
11
12
|

|
|
12
|
-

|
|
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
|
|
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
|
-
|
|
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:
|
|
60
|
+
## ποΈ Architecture: MCP Server
|
|
56
61
|
|
|
57
|
-
### What is
|
|
62
|
+
### What is an MCP Server?
|
|
58
63
|
|
|
59
|
-
**
|
|
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
|
-
|
|
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
|
-
β β
|
|
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
|
-
β β
|
|
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
|
|
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.
|
|
4
|
-
"description": "GeoCrafter - MCP server for geocoding
|
|
3
|
+
"version": "1.4.0",
|
|
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
|
-
"
|
|
17
|
+
"photon",
|
|
18
|
+
"geohash",
|
|
19
|
+
"distance",
|
|
20
|
+
"haversine",
|
|
18
21
|
"location",
|
|
19
22
|
"address",
|
|
20
23
|
"gps",
|