@shyzus/mcp-geocrafter 1.0.5 β 1.2.3
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 +66 -86
- package/package.json +19 -6
package/README.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
GeoCrafter is a clean, modular MCP server for geocoding and reverse geocoding - Powered by Nominatim API (OpenStreetMap).
|
|
4
4
|
|
|
5
|
-
[](https://github.com/Shyzkanza/mcp-location/actions/workflows/ci.yml)
|
|
6
|
+
[](https://www.npmjs.com/package/@shyzus/mcp-geocrafter)
|
|
7
7
|
[](https://www.npmjs.com/package/@shyzus/mcp-geocrafter)
|
|
8
8
|
[](https://geocrafter.rankorr.red/health)
|
|
9
|
-

|
|
10
10
|

|
|
11
|
-

|
|
12
12
|

|
|
13
13
|
|
|
14
14
|
---
|
|
@@ -161,9 +161,24 @@ npx @modelcontextprotocol/inspector node dist/index.js
|
|
|
161
161
|
|
|
162
162
|
---
|
|
163
163
|
|
|
164
|
-
##
|
|
164
|
+
## π§ͺ Tests
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Run tests
|
|
168
|
+
npm test
|
|
165
169
|
|
|
166
|
-
|
|
170
|
+
# Watch mode
|
|
171
|
+
npm run test:watch
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
63 tests across 3 suites:
|
|
175
|
+
- `errors.test.ts` β Error classes, formatting, network detection (17 tests)
|
|
176
|
+
- `config.test.ts` β Environment variables, validation, singleton (20 tests)
|
|
177
|
+
- `displayGeoJsonMap.test.ts` β GeoJSON parsing, viewport, colors, output (26 tests)
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## π± Deployment and Development
|
|
167
182
|
|
|
168
183
|
> **π‘ To use the application in ChatGPT**, see the [π Quick Start](#-quick-start) section above for complete instructions.
|
|
169
184
|
|
|
@@ -209,71 +224,28 @@ Follow the configuration instructions in the [π Quick Start](#-quick-start) s
|
|
|
209
224
|
|
|
210
225
|
> **Note**: If you just want to use the application, see the [π Quick Start](#-quick-start) section which uses the production server already available.
|
|
211
226
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
#### **VPS Deployment with GitHub Actions**
|
|
215
|
-
|
|
216
|
-
1. **Configure GitHub secrets** according to [SECRETS.md](SECRETS.md)
|
|
217
|
-
2. **Push to the `main` branch**
|
|
218
|
-
3. GitHub Actions will automatically:
|
|
219
|
-
- β
Test TypeScript code
|
|
220
|
-
- β
Deploy to your VPS via Portainer
|
|
221
|
-
- β
Publish to npm (if version not already published)
|
|
222
|
-
- β
Check health status
|
|
227
|
+
#### **CI/CD Pipelines**
|
|
223
228
|
|
|
224
|
-
|
|
229
|
+
Two GitHub Actions workflows:
|
|
225
230
|
|
|
226
|
-
|
|
231
|
+
- **`ci.yml`** β Runs on push/PR to `main`: type check, tests, build
|
|
232
|
+
- **`release.yml`** β Runs on tag push (`*.*.*`): tests β GHCR image β Docker Swarm deploy β health check β npm publish
|
|
227
233
|
|
|
228
|
-
**
|
|
229
|
-
- Exemples : `1.0.0`, `1.0.1`, `1.1.0`, `2.0.0`
|
|
234
|
+
#### **Release Process**
|
|
230
235
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
```bash
|
|
235
|
-
npm version patch # 1.0.0 β 1.0.1
|
|
236
|
-
npm version minor # 1.0.0 β 1.1.0
|
|
237
|
-
npm version major # 1.0.0 β 2.0.0
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
2. **CrΓ©er le tag Git** correspondant :
|
|
241
|
-
```bash
|
|
242
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
243
|
-
git tag -a "$VERSION" -m "Release $VERSION - {description}"
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
3. **Commit et push** (y compris les tags) :
|
|
247
|
-
```bash
|
|
248
|
-
git add package.json
|
|
249
|
-
git commit -m "chore: bump version to $VERSION"
|
|
250
|
-
git push origin main
|
|
251
|
-
git push origin --tags
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
4. **Le workflow GitHub Actions** publiera automatiquement sur npm si la version n'existe pas dΓ©jΓ .
|
|
255
|
-
|
|
256
|
-
**Branches** :
|
|
257
|
-
- **`main`** : Production (protΓ©gΓ©e, dΓ©ploiement automatique)
|
|
258
|
-
- **`develop`** : DΓ©veloppement (branche de travail principale)
|
|
259
|
-
|
|
260
|
-
Voir [CONTEXT.md](CONTEXT.md) pour plus de dΓ©tails sur le workflow de dΓ©veloppement.
|
|
261
|
-
|
|
262
|
-
**Benefits**:
|
|
263
|
-
- Automatic deployment on each push
|
|
264
|
-
- Free SSL with Traefik + Let's Encrypt
|
|
265
|
-
- Integrated health monitoring
|
|
266
|
-
- Centralized logs
|
|
267
|
-
|
|
268
|
-
#### **Other cloud platforms**
|
|
236
|
+
```bash
|
|
237
|
+
# 1. Bump version
|
|
238
|
+
npm version patch # 1.0.5 β 1.0.6
|
|
269
239
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
- **Fly.io** - Edge computing with global deployment
|
|
274
|
-
- **Google Cloud Run** - Serverless with automatic scaling
|
|
240
|
+
# 2. Push with tags
|
|
241
|
+
git push origin main --tags
|
|
242
|
+
```
|
|
275
243
|
|
|
276
|
-
|
|
244
|
+
The tag push triggers `release.yml` which automatically:
|
|
245
|
+
- Builds & pushes the Docker image to GHCR
|
|
246
|
+
- Deploys to VPS via SSH + `docker stack deploy`
|
|
247
|
+
- Runs health check
|
|
248
|
+
- Publishes to npm (if version not already published)
|
|
277
249
|
|
|
278
250
|
#### **Configure your server in ChatGPT**
|
|
279
251
|
|
|
@@ -376,31 +348,39 @@ Opens a web interface to test all tools.
|
|
|
376
348
|
```
|
|
377
349
|
mcp-location/
|
|
378
350
|
βββ src/
|
|
379
|
-
β βββ config.ts
|
|
380
|
-
β βββ types.ts
|
|
351
|
+
β βββ config.ts # Configuration centralisΓ©e
|
|
352
|
+
β βββ types.ts # Types TypeScript partagΓ©s
|
|
353
|
+
β βββ __tests__/
|
|
354
|
+
β β βββ config.test.ts # Tests config
|
|
381
355
|
β βββ client/
|
|
382
|
-
β β βββ nominatimClient.ts
|
|
356
|
+
β β βββ nominatimClient.ts # Client API Nominatim
|
|
383
357
|
β βββ tools/
|
|
384
|
-
β β βββ searchAddress.ts
|
|
385
|
-
β β βββ reverseGeocode.ts
|
|
386
|
-
β β
|
|
358
|
+
β β βββ searchAddress.ts # Tool: adresse β GPS
|
|
359
|
+
β β βββ reverseGeocode.ts # Tool: GPS β adresse
|
|
360
|
+
β β βββ displayGeoJsonMap.ts # Tool: GeoJSON β widget UI
|
|
361
|
+
β β βββ __tests__/
|
|
362
|
+
β β βββ displayGeoJsonMap.test.ts
|
|
387
363
|
β βββ resources/
|
|
388
|
-
β β βββ mapViewerTemplate.ts # Template HTML
|
|
364
|
+
β β βββ mapViewerTemplate.ts # Template HTML pour ChatGPT
|
|
389
365
|
β βββ servers/
|
|
390
|
-
β β βββ stdio.ts
|
|
391
|
-
β β βββ http.ts
|
|
366
|
+
β β βββ stdio.ts # Serveur stdio (IDEs)
|
|
367
|
+
β β βββ http.ts # Serveur Streamable HTTP (ChatGPT)
|
|
392
368
|
β βββ utils/
|
|
393
|
-
β β
|
|
394
|
-
β
|
|
395
|
-
β
|
|
396
|
-
β
|
|
397
|
-
βββ
|
|
398
|
-
|
|
399
|
-
βββ
|
|
400
|
-
βββ .
|
|
401
|
-
|
|
402
|
-
βββ
|
|
403
|
-
|
|
369
|
+
β β βββ errors.ts # Gestion erreurs centralisΓ©e
|
|
370
|
+
β β βββ __tests__/
|
|
371
|
+
β β βββ errors.test.ts
|
|
372
|
+
β βββ index.ts # Entry point stdio
|
|
373
|
+
β βββ http-server.ts # Entry point HTTP
|
|
374
|
+
β βββ http-client.ts # Client npm
|
|
375
|
+
βββ .github/workflows/
|
|
376
|
+
β βββ ci.yml # CI: tests on push/PR
|
|
377
|
+
β βββ release.yml # Release: GHCR + deploy + npm
|
|
378
|
+
βββ Dockerfile # Multi-stage Docker (node:20-alpine)
|
|
379
|
+
βββ docker-compose.yml # Docker Swarm stack
|
|
380
|
+
βββ vitest.config.ts # Vitest configuration
|
|
381
|
+
βββ package.json
|
|
382
|
+
βββ tsconfig.json
|
|
383
|
+
βββ README.md
|
|
404
384
|
```
|
|
405
385
|
|
|
406
386
|
---
|
|
@@ -514,7 +494,7 @@ See [CONTEXT.md](CONTEXT.md) for detailed architecture documentation.
|
|
|
514
494
|
|
|
515
495
|
```bash
|
|
516
496
|
# Check that Node.js is installed
|
|
517
|
-
node --version # Must be
|
|
497
|
+
node --version # Must be 20+
|
|
518
498
|
|
|
519
499
|
# Check that dependencies are installed
|
|
520
500
|
npm install
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shyzus/mcp-geocrafter",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "GeoCrafter - MCP server for geocoding and reverse geocoding - Powered by Nominatim API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,11 +11,22 @@
|
|
|
11
11
|
"dist/http-client.js",
|
|
12
12
|
"README.md"
|
|
13
13
|
],
|
|
14
|
-
"keywords": [
|
|
14
|
+
"keywords": [
|
|
15
|
+
"mcp",
|
|
16
|
+
"geocoding",
|
|
17
|
+
"nominatim",
|
|
18
|
+
"location",
|
|
19
|
+
"address",
|
|
20
|
+
"gps",
|
|
21
|
+
"chatgpt"
|
|
22
|
+
],
|
|
15
23
|
"author": "Rankorr",
|
|
16
24
|
"license": "MIT",
|
|
17
25
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
26
|
+
"node": ">=20.0.0"
|
|
27
|
+
},
|
|
28
|
+
"volta": {
|
|
29
|
+
"node": "20.19.5"
|
|
19
30
|
},
|
|
20
31
|
"repository": {
|
|
21
32
|
"type": "git",
|
|
@@ -37,16 +48,18 @@
|
|
|
37
48
|
"tunnel": "ngrok http ${PORT:-3000}",
|
|
38
49
|
"inspect": "npx @modelcontextprotocol/inspector@latest http://localhost:${PORT:-3000}/mcp",
|
|
39
50
|
"health": "curl -s http://localhost:${PORT:-3000}/health | jq .",
|
|
51
|
+
"test": "vitest run",
|
|
52
|
+
"test:watch": "vitest",
|
|
40
53
|
"prepare": "npm run build"
|
|
41
54
|
},
|
|
42
55
|
"dependencies": {
|
|
43
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
56
|
+
"@modelcontextprotocol/sdk": "^1.27.1"
|
|
44
57
|
},
|
|
45
58
|
"devDependencies": {
|
|
46
59
|
"@types/node": "^20.10.0",
|
|
47
60
|
"npm-run-all": "^4.1.5",
|
|
48
61
|
"tsx": "^4.7.0",
|
|
49
|
-
"typescript": "^5.3.0"
|
|
62
|
+
"typescript": "^5.3.0",
|
|
63
|
+
"vitest": "^4.0.18"
|
|
50
64
|
}
|
|
51
65
|
}
|
|
52
|
-
|