@pipeworx/mcp-blm-mining-claims 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mojibake Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,136 @@
1
- # Temporary Holding Version
1
+ # @pipeworx/blm-mining-claims
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ US federal mining claims from the Bureau of Land Management's Mineral and Land Records System (MLRS): claims near a point or inside a box, one claim by case serial number, and claim counts by type and status around a site. Each result has the case serial, claim name, lode/placer/mill-site/tunnel-site type, status, recorded acres, the PLSS legal land description and a link to the MLRS case record.
4
+
5
+ Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1763+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.
6
+
7
+ ## Tools
8
+
9
+ - `blm_claims_near(latitude, longitude, radius_km?, status?, claim_type?, limit?, after_object_id?)`: claims within a radius (max 50 km) of a point, with the total count in the radius. Each page is sorted by distance. Use it to see who has staked ground around a lithium, gold or uranium deposit.
10
+ - `blm_claims_in_bbox(min_lat, min_lon, max_lat, max_lon, status?, claim_type?, limit?, after_object_id?)`: the same for a bounding box of up to 2° on a side.
11
+ - `blm_claims_case(case_id)`: one case by MLRS serial (`NV101474832`) or legacy serial (`NMC1018964`). Returns type, status, acres, patented/excluded/conveyed flags, the parsed PLSS legal land description (meridian, township, range, section, aliquot part), the mapped bounding box, BLM's mapping-quality log and the MLRS link.
12
+ - `blm_claims_summary(latitude, longitude, radius_km?, status?)`: counts and total recorded acres by claim type and status within a radius.
13
+
14
+ `status` accepts `open` (default: every case not closed, including Active, Filed, Under Review and On Appeal), `active` (disposition exactly Active), `closed` or `all`. `claim_type` accepts `lode`, `placer`, `mill_site` or `tunnel_site`.
15
+
16
+ ## Auth
17
+
18
+ Keyless.
19
+
20
+ ## Data sources
21
+
22
+ - <https://gis.blm.gov/nlsdb/rest/services/Mining_Claims/MiningClaims/MapServer>: BLM MLRS mining-claim case layer (ArcGIS MapServer). Layer 0 holds every case, layer 1 holds cases that are not closed, and layer 2 holds closed cases. Each call queries the service live.
23
+ - <https://mlrs.blm.gov/>: the MLRS case record that `mlrs_case_url` opens.
24
+
25
+ Things the next person would otherwise rediscover:
26
+
27
+ - **The geometry is not the staked boundary.** BLM maps each case's recorded Legal Land Description onto the PLSS cadastral grid, so a 20-acre lode claim appears as the aliquot part(s) it was recorded in. The `QLTY` score says how well the mapping worked. `geometry_basis` turns it into words: direct PLSS match, calculated, section-only, county-only, no geometry, or hand-edited by BLM.
28
+ - **The layer has no location date, claimant names or claimant count.** Those fields exist only in the MLRS case record. The tools say so in `fields_not_in_layer` rather than returning nulls.
29
+ - **No as-of date is published.** The service carries no editingInfo or documentInfo date, so `data_as_of` is the time of the live query and `data_as_of_basis` says that.
30
+ - **`orderByFields` is very slow:** 30–60 s against about 5 s without it, measured 2026-10-08. Rows come back in OBJECTID order, so paging uses an OBJECTID cursor (`after_object_id` → `next_after_object_id`).
31
+ - **`resultOffset` is off by one on spatial queries.** Offset 0 returns one row short, and offset *k* starts at row *k*−1. Paging by offset would repeat or skip a claim, which is why this pack uses the cursor instead.
32
+ - `BLM_PROD` capitalization varies (`Lode Claim` and `LODE CLAIM` both occur), so type filters match on `UPPER(BLM_PROD) LIKE 'LODE CLAIM%'`, which also includes the "– National Park" variants.
33
+
34
+ ## Quick Start
35
+
36
+ Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "blm-mining-claims": {
42
+ "url": "https://gateway.pipeworx.io/blm-mining-claims/mcp"
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
48
+ ### What this endpoint actually serves
49
+
50
+ `tools/list` at `https://gateway.pipeworx.io/blm-mining-claims/mcp` returns the tools in the table
51
+ above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
52
+ `discover_tools`, `search_within`, `remember`/`recall` and the rest of the
53
+ gateway-wide set. So the tool count you see is larger than this table: a
54
+ single-pack endpoint currently lists roughly 30 shared tools alongside the
55
+ pack's own. The connection's `initialize` response states its exact scope, and
56
+ is the authoritative answer for a given day.
57
+
58
+ This is deliberate, not multiplexing by accident. The meta-tools are what let a
59
+ scoped connection answer a question this pack does not cover — via
60
+ `ask_pipeworx`, which routes across the whole catalog — without you adding a
61
+ second MCP server. There is currently no way to mount a pack endpoint without
62
+ them; if the extra schemas cost you more context than the routing is worth,
63
+ connect to the full gateway once rather than to several pack endpoints.
64
+
65
+ Or connect to the full Pipeworx gateway to get every pack's tools listed
66
+ directly, instead of just this one's:
67
+
68
+ ```json
69
+ {
70
+ "mcpServers": {
71
+ "pipeworx": {
72
+ "url": "https://gateway.pipeworx.io/mcp"
73
+ }
74
+ }
75
+ }
76
+ ```
77
+
78
+ Both URLs reach the same gateway and the same 1763+ data sources. The
79
+ only difference is which pack's tools are listed **directly**; `ask_pipeworx`
80
+ reaches all of them from either one.
81
+
82
+ ## No MCP client? Call it over HTTP
83
+
84
+ ```bash
85
+ curl -X POST https://gateway.pipeworx.io/v1/tools/blm_claims_near \
86
+ -H 'Content-Type: application/json' \
87
+ -d '{"latitude":41.71,"longitude":-118.06,"radius_km":10,"limit":5}'
88
+ ```
89
+
90
+ No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/blm_claims_near`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
91
+
92
+ ## Standalone (no gateway account)
93
+
94
+ This package also runs as a local stdio MCP server — no Pipeworx account, no
95
+ gateway round-trip:
96
+
97
+ ```json
98
+ {
99
+ "mcpServers": {
100
+ "blm-mining-claims": {
101
+ "command": "npx",
102
+ "args": ["-y", "@pipeworx/mcp-blm-mining-claims"]
103
+ }
104
+ }
105
+ }
106
+ ```
107
+
108
+ Or run it directly to confirm it starts:
109
+
110
+ ```bash
111
+ npx -y @pipeworx/mcp-blm-mining-claims
112
+ ```
113
+
114
+ It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
115
+ for **only** this pack's tools — none of the shared meta-tools the gateway
116
+ connection above adds. Same source, same tools, no ask_pipeworx routing.
117
+
118
+ ## Using with ask_pipeworx
119
+
120
+ Instead of calling tools directly, you can ask questions in plain English —
121
+ this works on the pack endpoint above as well as on the full gateway:
122
+
123
+ ```
124
+ ask_pipeworx({ question: "your question about Blm Mining Claims data" })
125
+ ```
126
+
127
+ The gateway picks the right tool and fills the arguments automatically.
128
+
129
+ ## More
130
+
131
+ - [Docs and guides](https://pipeworx.io/docs)
132
+ - [pipeworx.io](https://pipeworx.io)
133
+
134
+ ## License
135
+
136
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ //
3
+ // Entry point for `npx @pipeworx/mcp-<slug>`.
4
+ //
5
+ // Packs ship as raw TypeScript (no build step — see publish-pack.sh for why:
6
+ // tsx sidesteps every extensionless-import / bare-JSON-import edge case a
7
+ // per-pack tsc build would have to solve one pack at a time). This file
8
+ // registers tsx's ESM loader programmatically, then hands off to src/server.ts,
9
+ // which wraps the pack's {tools, callTool} export in a stdio MCP server.
10
+ //
11
+ // Copied verbatim into every published pack repo by scripts/publish-pack.sh —
12
+ // edit this file, not a per-pack copy.
13
+ import { register } from 'tsx/esm/api';
14
+
15
+ register();
16
+
17
+ await import('../src/server.ts');
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "@pipeworx/mcp-blm-mining-claims",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "BLM mining claims (MLRS) — fleet #2826.",
5
+ "type": "module",
6
+ "main": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "bin": {
9
+ "mcp-blm-mining-claims": "bin/cli.js"
10
+ },
11
+ "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "blm-mining-claims"],
12
+ "license": "MIT",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/pipeworx-io/mcp-blm-mining-claims.git"
16
+ },
17
+ "scripts": {
18
+ "typecheck": "tsc --noEmit"
19
+ },
20
+ "dependencies": {
21
+ "@modelcontextprotocol/sdk": "^1.30.0",
22
+ "tsx": "^4.19.0"
23
+ },
24
+ "devDependencies": {
25
+ "typescript": "^5.9.3",
26
+ "@cloudflare/workers-types": "^4.20260405.1"
27
+ },
28
+ "pipeworx": {
29
+ "sourceHash": "v1-caa1899e6cb99ac2609dce21488670c46f914165be3cfecdc619c9a016f168fa",
30
+ "sourceCommit": "051ee2039fc96224cb5b7358fd69d525bced13a6"
31
+ }
32
+ }
package/server.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.pipeworx-io/blm-mining-claims",
4
+ "title": "Blm Mining Claims",
5
+ "description": "BLM mining claims (MLRS) — fleet #2826.",
6
+ "version": "0.1.0",
7
+ "websiteUrl": "https://pipeworx.io/packs/blm-mining-claims",
8
+ "repository": {
9
+ "url": "https://github.com/pipeworx-io/mcp-blm-mining-claims",
10
+ "source": "github"
11
+ },
12
+ "remotes": [
13
+ {
14
+ "type": "streamable-http",
15
+ "url": "https://gateway.pipeworx.io/blm-mining-claims/mcp"
16
+ }
17
+ ]
18
+ }