@thehikingworld/mcp 1.1.1 → 1.1.2
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 +46 -40
- package/dist/index.js +1 -1
- package/dist/tools.js +13 -2
- package/package.json +42 -38
- package/server.json +12 -0
package/README.md
CHANGED
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
# @thehikingworld/mcp
|
|
2
|
-
|
|
3
|
-
Read-only access to [The Hiking World](https://www.thehikingworld.com): sourced, dated trail and permit records. A figure is returned only when the catalog stored it. Unverified fees stay labelled unverified. Null means not recorded.
|
|
4
|
-
|
|
5
|
-
Geometry is OpenStreetMap, ODbL. Editorial text is The Hiking World.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
# @thehikingworld/mcp
|
|
2
|
+
|
|
3
|
+
Read-only access to [The Hiking World](https://www.thehikingworld.com): sourced, dated trail and permit records. A figure is returned only when the catalog stored it. Unverified fees stay labelled unverified. Null means not recorded.
|
|
4
|
+
|
|
5
|
+
Geometry is OpenStreetMap, ODbL. Editorial text is The Hiking World. That citation request is not a licence. Permit tariffs stay the issuer's.
|
|
6
|
+
|
|
7
|
+
Cite one number, not only the page:
|
|
8
|
+
|
|
9
|
+
`https://www.thehikingworld.com/trails/inca-trail#fact-ascent`
|
|
10
|
+
|
|
11
|
+
`https://www.thehikingworld.com/api/v1/facts/inca-trail/ascent`
|
|
12
|
+
|
|
13
|
+
The JSON carries value, tier, source, verified date, and the record signature. A withheld ascent is null.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx -y @thehikingworld/mcp
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Claude Desktop:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"thehikingworld": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["-y", "@thehikingworld/mcp"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The process speaks MCP on stdin/stdout. `THW_API_BASE` overrides the default origin `https://www.thehikingworld.com`.
|
|
35
|
+
|
|
36
|
+
## Hosted
|
|
37
|
+
|
|
38
|
+
`https://www.thehikingworld.com/api/mcp` is the same tool set over Streamable HTTP. No install. No API key. Read-only.
|
|
39
|
+
|
|
40
|
+
## Tools
|
|
41
|
+
|
|
42
|
+
`get_trail`, `search_trails`, `get_permit`, `plan_permits`, `get_updates`, `list_regions`, `list_countries`, `get_geojson`, `get_provenance`.
|
|
43
|
+
|
|
44
|
+
`get_permit` returns costLocal, tier, issuer, sourceUrl, and readDate. The tier is the record's status. A reported or unverified row is not an official fee. A null costLocal is not a number. `get_updates` returns confirmed fee changes, newest first, each with a citation. `get_permit` and `get_trail` carry the citation string when a fee is citeable. `plan_permits` takes one or more trail slugs and returns the stored permit rows for each, summing only confident same-currency official figures; a mixed or unverified set keeps a null total. It is a reference, not a route planner or a booking step.
|
|
45
|
+
|
|
46
|
+
If the feed is down, the tool returns an error and the process stays up.
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { pathToFileURL } from "node:url";
|
|
|
5
5
|
import { registerTools } from "./tools.js";
|
|
6
6
|
export { filterSummaries, matchPermits, registerTools } from "./tools.js";
|
|
7
7
|
async function main() {
|
|
8
|
-
const server = new McpServer({ name: "thehikingworld", version: "1.1.
|
|
8
|
+
const server = new McpServer({ name: "thehikingworld", version: "1.1.2" });
|
|
9
9
|
registerTools(server);
|
|
10
10
|
const transport = new StdioServerTransport();
|
|
11
11
|
await server.connect(transport);
|
package/dist/tools.js
CHANGED
|
@@ -161,7 +161,7 @@ export function registerTools(server) {
|
|
|
161
161
|
});
|
|
162
162
|
});
|
|
163
163
|
server.registerTool("get_permit", {
|
|
164
|
-
description: `
|
|
164
|
+
description: `Sourced permit fee for a named trail: local-currency costLocal, tier, issuer, source URL, and read-date. tier is verified-official, reported-secondary, or unverified. Do not quote reported-secondary or unverified as official. A null costLocal is not a number. Ambiguous names return candidates. ${HONESTY}${VERIFY_NOTE}`,
|
|
165
165
|
inputSchema: { trail: z.string().describe("Slug or trail name") },
|
|
166
166
|
}, async ({ trail }) => {
|
|
167
167
|
const result = await getJson("/api/v1/permits");
|
|
@@ -186,7 +186,18 @@ export function registerTools(server) {
|
|
|
186
186
|
schemaVersion: result.body.schemaVersion,
|
|
187
187
|
generatedAt: result.body.generatedAt,
|
|
188
188
|
license: result.body.license,
|
|
189
|
-
|
|
189
|
+
verify: { keyId: "3ad491a01aea", url: `${baseUrl()}/verify` },
|
|
190
|
+
data: found.rows.map((row) => ({
|
|
191
|
+
trailSlug: row.trailSlug,
|
|
192
|
+
trailName: row.trailName,
|
|
193
|
+
country: row.country,
|
|
194
|
+
permitType: row.permitType,
|
|
195
|
+
costLocal: row.costLocal,
|
|
196
|
+
tier: row.status,
|
|
197
|
+
issuer: row.issuer,
|
|
198
|
+
sourceUrl: row.sourceUrl,
|
|
199
|
+
readDate: row.verifiedDate,
|
|
200
|
+
})),
|
|
190
201
|
});
|
|
191
202
|
});
|
|
192
203
|
server.registerTool("list_regions", {
|
package/package.json
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@thehikingworld/mcp",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
},
|
|
34
|
-
"
|
|
35
|
-
"@
|
|
36
|
-
"
|
|
37
|
-
}
|
|
38
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@thehikingworld/mcp",
|
|
3
|
+
"version": "1.1.2",
|
|
4
|
+
"mcpName": "com.thehikingworld/mcp",
|
|
5
|
+
"description": "Read-only sourced trail facts. get_permit returns costLocal, tier, issuer, sourceUrl, and readDate. A reported or unverified row is not an official fee. A missing value stays empty. Verify a signature at https://www.thehikingworld.com/verify (integrity, not currency).",
|
|
6
|
+
"homepage": "https://www.thehikingworld.com/developers",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://gitlab.com/ravitejarx/the-hiking-world.git",
|
|
12
|
+
"directory": "packages/mcp"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"bin": {
|
|
18
|
+
"thehikingworld-mcp": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md",
|
|
23
|
+
"server.json"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "tsc -p tsconfig.build.json",
|
|
27
|
+
"prepublishOnly": "npm run build",
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"start": "node dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=20"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
36
|
+
"zod": "^3.25.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^22.0.0",
|
|
40
|
+
"typescript": "^5.6.0"
|
|
41
|
+
}
|
|
42
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "com.thehikingworld/mcp",
|
|
3
|
+
"description": "Read-only trail facts. Each permit row includes the local-currency figure, tier, issuer, source URL, and read-date. A signature can be checked at https://www.thehikingworld.com/verify with public key id 3ad491a01aea. This listing does not state a coverage count.",
|
|
4
|
+
"version": "1.1.2",
|
|
5
|
+
"packages": [
|
|
6
|
+
{
|
|
7
|
+
"registry_type": "npm",
|
|
8
|
+
"identifier": "@thehikingworld/mcp",
|
|
9
|
+
"transport": { "type": "stdio" }
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|