@honua/mcp-server 0.1.2-beta.0 → 0.1.8-beta.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.
Files changed (117) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +232 -9
  3. package/dist/src/certification/admin-parity.d.ts +96 -0
  4. package/dist/src/certification/admin-parity.d.ts.map +1 -0
  5. package/dist/src/certification/admin-parity.js +235 -0
  6. package/dist/src/certification/census-fixture-client.d.ts.map +1 -1
  7. package/dist/src/certification/census-fixture-client.js +5 -0
  8. package/dist/src/certification/certifier.d.ts +1 -1
  9. package/dist/src/certification/certifier.d.ts.map +1 -1
  10. package/dist/src/certification/certifier.js +28 -20
  11. package/dist/src/certification/cli.js +1 -1
  12. package/dist/src/certification/cql2.d.ts +24 -0
  13. package/dist/src/certification/cql2.d.ts.map +1 -0
  14. package/dist/src/certification/cql2.js +354 -0
  15. package/dist/src/certification/fixtures.d.ts +8 -0
  16. package/dist/src/certification/fixtures.d.ts.map +1 -1
  17. package/dist/src/certification/fixtures.js +26 -10
  18. package/dist/src/certification/ogc-data.d.ts +30 -0
  19. package/dist/src/certification/ogc-data.d.ts.map +1 -0
  20. package/dist/src/certification/ogc-data.js +726 -0
  21. package/dist/src/certification/ogc-fixture-client.d.ts +4 -0
  22. package/dist/src/certification/ogc-fixture-client.d.ts.map +1 -0
  23. package/dist/src/certification/ogc-fixture-client.js +190 -0
  24. package/dist/src/certification/target.d.ts +10 -1
  25. package/dist/src/certification/target.d.ts.map +1 -1
  26. package/dist/src/certification/target.js +63 -28
  27. package/dist/src/credential-endpoint.d.ts +3 -0
  28. package/dist/src/credential-endpoint.d.ts.map +1 -0
  29. package/dist/src/credential-endpoint.js +24 -0
  30. package/dist/src/eval/cli.js +6 -3
  31. package/dist/src/eval/corpus.d.ts +7 -0
  32. package/dist/src/eval/corpus.d.ts.map +1 -1
  33. package/dist/src/eval/corpus.js +12 -0
  34. package/dist/src/eval/ogc-corpus.d.ts +3 -0
  35. package/dist/src/eval/ogc-corpus.d.ts.map +1 -0
  36. package/dist/src/eval/ogc-corpus.js +437 -0
  37. package/dist/src/eval/runner.d.ts +6 -0
  38. package/dist/src/eval/runner.d.ts.map +1 -1
  39. package/dist/src/eval/runner.js +21 -7
  40. package/dist/src/helpers.d.ts +8 -13
  41. package/dist/src/helpers.d.ts.map +1 -1
  42. package/dist/src/helpers.js +7 -35
  43. package/dist/src/index.d.ts +36 -8
  44. package/dist/src/index.d.ts.map +1 -1
  45. package/dist/src/index.js +55 -18
  46. package/dist/src/neutral/errors.d.ts +73 -0
  47. package/dist/src/neutral/errors.d.ts.map +1 -0
  48. package/dist/src/neutral/errors.js +112 -0
  49. package/dist/src/neutral/filter.d.ts +108 -0
  50. package/dist/src/neutral/filter.d.ts.map +1 -0
  51. package/dist/src/neutral/filter.js +271 -0
  52. package/dist/src/neutral/query.d.ts +101 -0
  53. package/dist/src/neutral/query.d.ts.map +1 -0
  54. package/dist/src/neutral/query.js +180 -0
  55. package/dist/src/neutral/result.d.ts +33 -0
  56. package/dist/src/neutral/result.d.ts.map +1 -0
  57. package/dist/src/neutral/result.js +38 -0
  58. package/dist/src/neutral/source-ref.d.ts +126 -0
  59. package/dist/src/neutral/source-ref.d.ts.map +1 -0
  60. package/dist/src/neutral/source-ref.js +267 -0
  61. package/dist/src/nl-map-control.d.ts.map +1 -1
  62. package/dist/src/proxy.d.ts.map +1 -1
  63. package/dist/src/proxy.js +29 -14
  64. package/dist/src/release/zero-to-map-checkpoint.d.ts +34 -0
  65. package/dist/src/release/zero-to-map-checkpoint.d.ts.map +1 -0
  66. package/dist/src/release/zero-to-map-checkpoint.js +369 -0
  67. package/dist/src/release/zero-to-map-cli.d.ts +51 -0
  68. package/dist/src/release/zero-to-map-cli.d.ts.map +1 -0
  69. package/dist/src/release/zero-to-map-cli.js +880 -0
  70. package/dist/src/release/zero-to-map-provision.d.ts +37 -0
  71. package/dist/src/release/zero-to-map-provision.d.ts.map +1 -0
  72. package/dist/src/release/zero-to-map-provision.js +177 -0
  73. package/dist/src/release/zero-to-map.d.ts +296 -0
  74. package/dist/src/release/zero-to-map.d.ts.map +1 -0
  75. package/dist/src/release/zero-to-map.js +1069 -0
  76. package/dist/src/tools/admin-install-local.d.ts +30 -0
  77. package/dist/src/tools/admin-install-local.d.ts.map +1 -0
  78. package/dist/src/tools/admin-install-local.js +22 -0
  79. package/dist/src/tools/control-plane-command.d.ts +99 -0
  80. package/dist/src/tools/control-plane-command.d.ts.map +1 -0
  81. package/dist/src/tools/control-plane-command.js +180 -0
  82. package/dist/src/tools/count-features.d.ts +85 -11
  83. package/dist/src/tools/count-features.d.ts.map +1 -1
  84. package/dist/src/tools/count-features.js +49 -31
  85. package/dist/src/tools/describe-layer.d.ts +30 -6
  86. package/dist/src/tools/describe-layer.d.ts.map +1 -1
  87. package/dist/src/tools/describe-layer.js +99 -8
  88. package/dist/src/tools/docs-search.d.ts +100 -0
  89. package/dist/src/tools/docs-search.d.ts.map +1 -0
  90. package/dist/src/tools/docs-search.js +381 -0
  91. package/dist/src/tools/get-extent.d.ts +69 -11
  92. package/dist/src/tools/get-extent.d.ts.map +1 -1
  93. package/dist/src/tools/get-extent.js +28 -46
  94. package/dist/src/tools/list-services.d.ts +7 -0
  95. package/dist/src/tools/list-services.d.ts.map +1 -1
  96. package/dist/src/tools/list-services.js +8 -1
  97. package/dist/src/tools/list-sources.d.ts +44 -0
  98. package/dist/src/tools/list-sources.d.ts.map +1 -0
  99. package/dist/src/tools/list-sources.js +138 -0
  100. package/dist/src/tools/query-features.d.ts +99 -19
  101. package/dist/src/tools/query-features.d.ts.map +1 -1
  102. package/dist/src/tools/query-features.js +38 -45
  103. package/dist/src/tools/statistics.d.ts +80 -12
  104. package/dist/src/tools/statistics.d.ts.map +1 -1
  105. package/dist/src/tools/statistics.js +56 -23
  106. package/package.json +37 -8
  107. package/release/zero-to-map/README.md +174 -0
  108. package/release/zero-to-map/configs/claude-code.mcp.json +11 -0
  109. package/release/zero-to-map/configs/claude-desktop.json +11 -0
  110. package/release/zero-to-map/configs/cursor.json +11 -0
  111. package/release/zero-to-map/contracts/aws-ecs-provision-binding.schema.json +59 -0
  112. package/release/zero-to-map/contracts/checkpoint.schema.json +152 -0
  113. package/release/zero-to-map/contracts/console-receipt.schema.json +150 -0
  114. package/release/zero-to-map/contracts/esri-gp-mcp.v1.json +73 -0
  115. package/release/zero-to-map/fixtures/parcels.geojson +33 -0
  116. package/release/zero-to-map/fixtures/zoning.geojson +24 -0
  117. package/release/zero-to-map/journey.v1.json +1248 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Honua
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -9,6 +9,11 @@ bound to their own platform; this one is bound to none.
9
9
  **Release status: beta.** Tool contracts are certified against live and fixture
10
10
  targets on every release; remaining pre-1.0 work is hardening, not surface change.
11
11
 
12
+ **Scores are published, not claimed.** How well different client models actually
13
+ drive this surface — and where they fail — is in the
14
+ [cross-model MCP eval scorecard](../docs/generated/mcp-eval-scorecard.md),
15
+ generated from the dated run artifacts committed under [`evals/`](evals/README.md).
16
+
12
17
  Two modes:
13
18
 
14
19
  - **Standalone (platform-free) — the front door.** The `honua-mcp` bin runs the
@@ -21,9 +26,48 @@ Two modes:
21
26
 
22
27
  ## Requirements
23
28
 
24
- - Node.js `>=20`
29
+ - Node.js `>=20.19`
25
30
  - Any reachable FeatureServer/OGC endpoint (public or Honua)
26
31
 
32
+ ## Install
33
+
34
+ The server is published as
35
+ [`@honua/mcp-server`](https://www.npmjs.com/package/@honua/mcp-server) with two
36
+ bins: `honua-mcp` (the platform-free stdio server) and `honua-mcp-proxy` (the
37
+ bridge to a Honua deployment's hosted `/mcp` catalog). No checkout, no build:
38
+
39
+ ```bash
40
+ # one-off
41
+ npx -y -p @honua/mcp-server honua-mcp # reads HONUA_BASE_URL from the environment
42
+
43
+ # or keep it installed
44
+ npm install -g @honua/mcp-server
45
+ ```
46
+
47
+ Claude Desktop, Claude Code, Cursor, and other MCP clients launch it as a stdio
48
+ server. Copy-paste client config (`.mcp.json` / `mcp.json` / Claude Desktop's
49
+ `claude_desktop_config.json`):
50
+
51
+ ```json
52
+ {
53
+ "mcpServers": {
54
+ "honua": {
55
+ "command": "npx",
56
+ "args": ["-y", "-p", "@honua/mcp-server", "honua-mcp"],
57
+ "env": {
58
+ "HONUA_BASE_URL": "https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis",
59
+ "HONUA_TRANSPORT": "rest"
60
+ }
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ That example points at a public ArcGIS endpoint — swap `HONUA_BASE_URL` for
67
+ your own FeatureServer folder, OGC API root, or Honua deployment. Contributors
68
+ running from a checkout: `npm install && npm run build`, then
69
+ `node dist/src/index.js` with the same environment.
70
+
27
71
  ## Platform-free mode (any ArcGIS / OGC endpoint)
28
72
 
29
73
  Point `HONUA_BASE_URL` at any origin/folder that serves the standard GeoServices
@@ -31,12 +75,16 @@ REST paths (`/rest/services`, `/FeatureServer/{id}/query`). Example — the publ
31
75
  US Census 2020 apportionment FeatureServer on `services.arcgis.com`:
32
76
 
33
77
  ```bash
34
- npm install
35
- npm run build
36
78
  HONUA_BASE_URL="https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis" \
37
- HONUA_TRANSPORT="rest" node dist/src/index.js
79
+ HONUA_TRANSPORT="rest" npx -y -p @honua/mcp-server honua-mcp
38
80
  ```
39
81
 
82
+ The same applies to a bare **OGC API** service root: point `HONUA_BASE_URL` at
83
+ the root, address sources with the neutral `<protocol>:<address>` form
84
+ (`ogc-features:<collectionId>`), and pass `layout: "ogc-api"` on calls against
85
+ a third-party root (see the addressing table below). STAC works the same way
86
+ with `layout: "stac-api"` or `"stac-static"`.
87
+
40
88
  Tools that require a Honua-only surface (server-side styling via OGC API – Styles,
41
89
  a `/rest/services` catalog) **degrade gracefully** on a plain endpoint: they
42
90
  return a structured result
@@ -48,11 +96,27 @@ return a structured result
48
96
  instead of crashing, hanging, or returning misleading empty data. This is the
49
97
  same skip-with-reason honesty the certification suite uses.
50
98
 
99
+ ### Bootstrap-only local installation
100
+
101
+ Local installation is deliberately absent from the ordinary `honua-mcp`
102
+ catalog. During an explicitly approved laptop bootstrap, start a separate,
103
+ single-purpose process that exposes only `honua_admin_install_local`:
104
+
105
+ ```bash
106
+ HONUA_MCP_BOOTSTRAP=1 npx -y -p @honua/mcp-server honua-mcp
107
+ ```
108
+
109
+ The tool requires `confirm: true`. Stop and remove this bootstrap server from
110
+ the MCP client configuration after installation; the normal platform-free
111
+ server remains read-only and cannot invoke the installer.
112
+
51
113
  ## Environment Variables
52
114
 
53
- - `HONUA_BASE_URL` (required): absolute base URL — a public ArcGIS folder
115
+ - `HONUA_BASE_URL` (required in normal mode): absolute base URL — a public ArcGIS folder
54
116
  (`https://services.arcgis.com/<org>/arcgis`) or a Honua deployment
55
117
  (`https://honua.example.com`).
118
+ - `HONUA_MCP_BOOTSTRAP` (bootstrap only): set to `1` or `true` to start the
119
+ isolated local-install catalog instead of the ordinary read-only server.
56
120
  - `HONUA_TRANSPORT` (optional): `grpc-web` (default, Honua deployments) or `rest`.
57
121
  Use `rest` for plain public ArcGIS/OGC endpoints.
58
122
  - `HONUA_API_KEY` (optional): API key when your deployment requires it. Public
@@ -66,14 +130,110 @@ When `HONUA_API_KEY` is configured, use `https://` for non-localhost servers.
66
130
 
67
131
  All read-only:
68
132
 
69
- - `honua_list_services` — discover services (degrades if the target has no catalog)
70
- - `honua_describe_layer`
133
+ - `honua_list_sources` — **protocol-neutral discovery.** Returns `<protocol>:<address>` source references plus each source's real capabilities. Every protocol family degrades independently with a reason.
134
+ - `honua_list_services` — GeoServices-specific service catalog (prefer `honua_list_sources`)
135
+ - `honua_describe_layer` — source schema, protocol, and advertised capabilities
71
136
  - `honua_query_features`
72
137
  - `honua_count_features`
73
138
  - `honua_get_extent`
74
139
  - `honua_statistics`
75
140
  - `honua_explain_capability_gap`
76
141
  - `honua_get_style`, `honua_apply_style_preset` — structured-unavailable on a plain FeatureServer
142
+ - `honua_docs_search` — answer a Honua documentation question from the local versioned docs corpus (`llms-full.txt`), with a source-file and release-version citation per hit. Each citation is pinned to the exact commit the corpus bytes come from, so it keeps naming the text that was searched after `trunk` moves; when that commit cannot be established (an installed package with no checkout, or a locally regenerated corpus) the citation reports `sourceRevision: null` and links to `trunk` rather than claiming a pin it cannot back. Offline: reads committed files, never the network, and reports structured-unavailable when the corpus is not present in the installation. Point `HONUA_DOCS_CORPUS_PATH` at a corpus file (any name) or at a directory holding `llms-full.txt` to supply the corpus explicitly; `HONUA_SOURCE_REVISION` declares the commit when git is unavailable.
143
+
144
+ ### Protocol-neutral tool contract
145
+
146
+ The tool vocabulary is the SDK's `Dataset` → `Source` → `Query` → `Result` contract,
147
+ not GeoServices with extra fields. **No tool schema requires an Esri-only field.**
148
+
149
+ **Addressing.** A source is one string, `<protocol>:<address>`, exactly as
150
+ `honua_list_sources` emits it:
151
+
152
+ | protocol | address | example |
153
+ | --- | --- | --- |
154
+ | `geoservices-feature-service` (alias `geoservices`) | `<serviceId>/<layerId>` | `geoservices-feature-service:Parks/0` |
155
+ | `geoservices-map-service` | `<serviceId>/<layerId>` | `geoservices-map-service:Basemap/2` |
156
+ | `ogc-features` (alias `ogc`) | `<collectionId>` | `ogc-features:hotels` |
157
+ | `ogc-records` | `<collectionId>` | `ogc-records:catalog` |
158
+ | `stac` | `<collectionId>` | `stac:sentinel-2-l2a` |
159
+ | `wfs` | `<typeName>` | `wfs:topp:states` |
160
+ | `odata` | `<entitySet>` | `odata:People` |
161
+
162
+ An unrecognized protocol token is **refused with the accepted forms** rather than
163
+ guessed at. Pass `layout` (`ogc-api` / `auto` / `stac-api` / `stac-static`) when the
164
+ OGC/STAC source lives at a third-party service root rather than the Honua facade.
165
+
166
+ **Filtering.** `filter` is the SDK's typed semantic filter, which compiles to
167
+ GeoServices SQL-92, CQL2, FES 2.0, or OData `$filter` depending on the backend —
168
+ one filter, same meaning everywhere:
169
+
170
+ ```jsonc
171
+ {
172
+ "source": "ogc-features:obs",
173
+ "filter": {
174
+ "op": "and",
175
+ "args": [
176
+ { "op": "eq", "field": "stn_id", "value": 2147 },
177
+ { "op": "gt", "field": "value", "value": 95 }
178
+ ]
179
+ },
180
+ "orderBy": [{ "field": "value", "direction": "desc" }],
181
+ "limit": 10
182
+ }
183
+ ```
184
+
185
+ Nodes: `eq`/`ne`/`lt`/`lte`/`gt`/`gte` (`field`, `value`), `in` (`values`),
186
+ `between` (`lower`, `upper`), `is-null`/`is-not-null`, `like` (`pattern`,
187
+ `caseSensitive`), `and`/`or` (`args`), `not` (`arg`), the spatial predicates
188
+ `intersects`/`contains`/`within`/`crosses`/`touches`/`overlaps`/`bbox-intersects`
189
+ (`geometry` or `bbox`), and the temporal predicates
190
+ `before`/`after`/`during`/`time-intersects` (`field`, `value`).
191
+
192
+ **Geometry** is GeoJSON (RFC 7946), or a `bbox` as `[minX, minY, maxX, maxY]`.
193
+ An envelope tested with `intersects` travels as the portable spatial constraint
194
+ (the OGC `bbox` parameter / a GeoServices geometry parameter); a richer geometry
195
+ or predicate becomes a typed spatial filter, which compiles where supported and
196
+ fails closed where it is not. **Time** is `temporal` — `{ "instant": … }` or
197
+ `{ "start": …, "end": … }`, with an optional `field`; without a field it targets
198
+ the source's own time dimension (`time=` / `datetime=`).
199
+
200
+ **Results** carry the neutral source identity, GeoJSON geometry, and — when the
201
+ protocol served the request a weaker way — an explicit `degraded` array (e.g. OGC
202
+ API Features has no server-side aggregation, so `honua_statistics` says it
203
+ aggregated client-side rather than presenting the number as authoritative).
204
+
205
+ **Capability honesty.** A request the backing protocol cannot express returns an
206
+ `isError` result with a structured envelope, never a silently empty feature list:
207
+
208
+ ```json
209
+ {
210
+ "code": "capability_not_supported",
211
+ "error": {
212
+ "kind": "ExecutionFailed",
213
+ "message": "Capability \"queryAggregate\" is not supported by protocol \"wmts\"",
214
+ "capability": "queryAggregate",
215
+ "protocol": "wmts",
216
+ "guidance": "…what to do instead…"
217
+ }
218
+ }
219
+ ```
220
+
221
+ ### Deprecated inputs (still accepted)
222
+
223
+ Nothing was removed. The following remain as **optional** compatibility inputs so
224
+ existing MCP clients keep working, and are marked `[DEPRECATED]` in their schema
225
+ descriptions:
226
+
227
+ - `serviceId` + `layerId` — the GeoServices pair. Equivalent to
228
+ `source: "geoservices-feature-service:<serviceId>/<layerId>"`. Passing
229
+ `serviceId` without `layerId` is refused rather than defaulted to layer 0.
230
+ - `where` — source-native filter text, whose language depends on the backend. Use
231
+ `filter` for a protocol-neutral one.
232
+ - `geometry` as Esri-JSON, with `geometryType` — converted on the way in.
233
+
234
+ One behavioural note: a source addressed the **deprecated** way keeps the legacy
235
+ Esri-JSON geometry output; a source addressed with `source` gets GeoJSON. Set
236
+ `geometryFormat` explicitly to override either default.
77
237
 
78
238
  Hosts that use signed safe-agent plans can import
79
239
  `@honua/mcp-server/agent-execution`. Its `createReadOnlyMcpAgentExecutor` binds
@@ -184,10 +344,37 @@ The fixture is recorded by `scripts/record-census-fixtures.mjs` into
184
344
  `src/certification/census-data.ts`; the evaluator that replays it is verified for
185
345
  parity against the live recordings in `test/certification/census-fixture-client.test.ts`.
186
346
 
347
+ ### Non-GeoServices certification lane
348
+
349
+ A `standalone`-shaped lane can prove the surface works against Esri and still say
350
+ nothing about vendor neutrality. So a second target — **`standalone-ogc`**
351
+ (`HONUA_MCP_CERT_TARGET=standalone-ogc`, or `--target standalone-ogc`) — runs the
352
+ **same tool catalog** against an in-process fixture of a plain **OGC API Features**
353
+ endpoint, replaying collections recorded from the public
354
+ [pygeoapi demo](https://demo.pygeoapi.io/master) (the pinned `ogc-features` target
355
+ in `config/live-conformance-endpoints.v1.json`). Nothing Esri exists there: the
356
+ GeoServices entry points all reject, so a tool that still secretly required
357
+ `serviceId`/`layerId` fails loudly instead of passing by accident.
358
+
359
+ ```bash
360
+ npm run certify:standalone-ogc # non-GeoServices cert (OGC API Features fixture)
361
+ npm run test:certification:standalone-ogc # CI gate variant
362
+ ```
363
+
364
+ The fixture serves the OGC API Features Part 1 parameters (`limit`, `offset`,
365
+ `bbox`, `datetime`, `properties`, `sortby`) plus the Part 3 `filter` +
366
+ `filter-lang=cql2-text` the neutral contract compiles to — including a CQL2
367
+ evaluator that **refuses** a construct it cannot evaluate exactly (`S_*` spatial
368
+ predicates) rather than matching every row. Re-record with
369
+ `node scripts/record-ogc-fixtures.mjs`.
370
+
187
371
  Artifacts are written to the package root as
188
372
  `mcp-certification-results.json` and `mcp-certification-results.md` (gitignored;
189
373
  uploaded by CI). To certify against a **live** honua-server, set `HONUA_BASE_URL`
190
- (and `HONUA_TRANSPORT`, `HONUA_MCP_SERVICE_ID`, `HONUA_MCP_LAYER_ID`); the
374
+ (and `HONUA_TRANSPORT`, `HONUA_MCP_SERVICE_ID`, `HONUA_MCP_LAYER_ID`; optionally
375
+ `HONUA_MCP_SOURCE` for a neutral `<protocol>:<address>` source ref,
376
+ `HONUA_MCP_ADDRESS` for the geocoding scenario, `HONUA_MCP_STYLE_ID`, and
377
+ `HONUA_MCP_STATISTIC_FIELD`); the
191
378
  harness then drives a real `HonuaClient` instead of the fixture.
192
379
 
193
380
  The standard schemas are vendored under
@@ -217,7 +404,15 @@ Environment variables:
217
404
  - `HONUA_MCP_REMOTE_URL` (required; alias `HONUA_MCP_URL`): the remote honua
218
405
  `/mcp` endpoint to proxy.
219
406
  - `HONUA_MCP_AUTH_TOKEN` (optional): sent as `Authorization: Bearer <token>`.
220
- - `HONUA_API_KEY` (optional): sent as `x-api-key`.
407
+ - `HONUA_ADMIN_KEY` or `HONUA_API_KEY` (optional): sent as `x-api-key`.
408
+
409
+ Configure at most one authentication scheme and one API-key source. The proxy
410
+ rejects bearer plus API-key authentication and rejects simultaneous
411
+ `HONUA_ADMIN_KEY` / `HONUA_API_KEY` values instead of choosing by precedence.
412
+ Credentialed endpoints require HTTPS except for exact `localhost`, `127.0.0.1`,
413
+ or `[::1]` HTTP development endpoints. Userinfo, query parameters, fragments,
414
+ non-HTTP(S) URLs are rejected before connect, and redirect targets are never
415
+ followed or sent credentials.
221
416
 
222
417
  A parity test (`test/proxy.test.ts`) asserts the tool/resource/template catalog
223
418
  the downstream client sees is byte-identical to the upstream surface, that
@@ -226,6 +421,13 @@ notifications are forwarded.
226
421
 
227
422
  ## Cross-model workflow eval (provability)
228
423
 
424
+ **Published results:
425
+ [Cross-model MCP eval scorecard](../docs/generated/mcp-eval-scorecard.md)** —
426
+ generated from the committed run artifacts in [`evals/runs/`](evals/runs), with
427
+ the deterministic control row, every non-passing run, and the protocol
428
+ certification failures. It ships on the docs site; its freshness is a CI gate
429
+ (`npm run docs:mcp-scorecard:check` from the repo root).
430
+
229
431
  The package ships a **cross-model workflow eval** that proves the "any client →
230
432
  any workflow" claim: a held-out corpus of GIS workflows (`src/eval/corpus.ts`)
231
433
  is driven through the MCP surface by different client LLMs and graded for
@@ -273,6 +475,24 @@ hallucinated place name fails. The grading taxonomy is documented in
273
475
  npm run eval:standalone # deterministic control over the census fixture (offline)
274
476
  ```
275
477
 
478
+ ### Non-GeoServices semantic corpus (`src/eval/ogc-corpus.ts`)
479
+
480
+ The **ogc** corpus runs the identical catalog against the plain OGC API Features
481
+ fixture, addressing every source as `ogc-features:<collectionId>` — no `serviceId`,
482
+ no `layerId`, anywhere in the corpus (a test asserts that). Its assertions are
483
+ anchored to the recorded pygeoapi data (5 observations, 31 Utah cities:
484
+ `avg(value)=96.14`, `sum(POP_2000)=354212`, `stn_id=2147 ⇒ 2 rows`, the
485
+ 2001–2004 interval ⇒ 3 rows), and it exercises the typed filter, a GeoJSON/bbox
486
+ spatial constraint, and canonical temporal predicates. Three scenarios grade
487
+ *honesty* rather than data: client-side aggregation must be reported as degraded,
488
+ an extent that came from the declared collection extent must say so, and a CQL2
489
+ spatial predicate the endpoint does not publish must come back as a structured
490
+ capability refusal — never as an empty result set.
491
+
492
+ ```bash
493
+ npm run eval:ogc # deterministic control over the OGC API Features fixture (offline)
494
+ ```
495
+
276
496
  ### Live lane (paid, manual only)
277
497
 
278
498
  The **operator corpus** (`src/eval/operator-corpus.ts`, 8 harder scenarios) is
@@ -301,6 +521,9 @@ Shared env for every live run:
301
521
  - `HONUA_API_KEY`: sent as `x-api-key` (⇒ auth mode `api-key`) when the deployment uses key auth instead.
302
522
  - `HONUA_EVAL_REQUIRE_AUTH=1` (recommended): fail fast if neither credential is present.
303
523
 
524
+ Set exactly one of `HONUA_MCP_AUTH_TOKEN` or `HONUA_API_KEY` for authenticated
525
+ live runs; ambiguous authentication fails closed.
526
+
304
527
  ```bash
305
528
  # Anthropic Claude (default claude-opus-4-8; override with HONUA_EVAL_ANTHROPIC_MODEL):
306
529
  HONUA_MCP_REMOTE_URL="https://demo.honua.io/mcp" \
@@ -0,0 +1,96 @@
1
+ #!/usr/bin/env node
2
+ import type { Tool } from "@modelcontextprotocol/sdk/types.js";
3
+ export interface AdminParityReceipt {
4
+ readonly schemaVersion: "honua.admin-mcp-parity.v1";
5
+ readonly family: "honua_admin_*";
6
+ readonly expectedTools: number;
7
+ readonly expectedStaticTools: number;
8
+ readonly expectedTotalTools: number;
9
+ readonly directTools: number;
10
+ readonly proxiedTools: number;
11
+ readonly directStaticTools: number;
12
+ readonly proxiedStaticTools: number;
13
+ readonly directTotalTools: number;
14
+ readonly proxiedTotalTools: number;
15
+ readonly coverageSha256: string;
16
+ readonly exclusionRosterSha256: string;
17
+ readonly contractServerSha: string | null;
18
+ readonly pass: boolean;
19
+ readonly differences: readonly string[];
20
+ }
21
+ export interface AdminParityExpectation {
22
+ readonly publishedToolNames: readonly string[];
23
+ readonly excludedToolNames: readonly string[];
24
+ readonly expectedStaticTools: number;
25
+ readonly expectedTotalTools: number;
26
+ }
27
+ export declare function certifyAdminCatalogParity(directCatalog: readonly Tool[], proxiedCatalog: readonly Tool[], expectation?: AdminParityExpectation): AdminParityReceipt;
28
+ export declare function normalizeAdminTools(tools: readonly Tool[]): {
29
+ name: string;
30
+ title: string | undefined;
31
+ description: string | undefined;
32
+ inputSchema: {
33
+ [x: string]: unknown;
34
+ type: "object";
35
+ properties?: {
36
+ [x: string]: object;
37
+ } | undefined;
38
+ required?: string[] | undefined;
39
+ };
40
+ outputSchema: {
41
+ [x: string]: unknown;
42
+ type: "object";
43
+ properties?: {
44
+ [x: string]: object;
45
+ } | undefined;
46
+ required?: string[] | undefined;
47
+ } | undefined;
48
+ annotations: {
49
+ title?: string | undefined;
50
+ readOnlyHint?: boolean | undefined;
51
+ destructiveHint?: boolean | undefined;
52
+ idempotentHint?: boolean | undefined;
53
+ openWorldHint?: boolean | undefined;
54
+ } | undefined;
55
+ }[];
56
+ /**
57
+ * Hostile-server safety ceiling on the number of `tools/list` pages a single
58
+ * catalog read may consume.
59
+ *
60
+ * This is deliberately NOT the expected roster size. A roster assertion says
61
+ * "this catalog is wrong"; this ceiling says "this server never stopped
62
+ * paging". Conflating the two produced a single unactionable diagnostic and,
63
+ * worse, made an opt-in profile catalog (base + analysis + Esri GP) impossible
64
+ * to read at all because the *transport* refused any catalog larger than the
65
+ * default roster.
66
+ */
67
+ export declare const MCP_TOOLS_LIST_MAX_PAGES = 1024;
68
+ /**
69
+ * Hostile-server safety ceiling on the number of tools a single catalog read
70
+ * may accumulate. Independent of {@link MCP_DEFAULT_TOTAL_TOOL_COUNT} so that
71
+ * enabling additive server profiles is a roster question, not a transport
72
+ * failure.
73
+ */
74
+ export declare const MCP_TOOLS_LIST_MAX_TOOLS = 8192;
75
+ /** Maximum accepted `tools/list` continuation cursor length, in characters. */
76
+ export declare const MCP_TOOLS_LIST_MAX_CURSOR_LENGTH = 1024;
77
+ /**
78
+ * Read the complete MCP tool catalog. The server deliberately pages large
79
+ * catalogs, so a single tools/list response is not certification evidence for
80
+ * the 432-tool default roster (47 static plus 385 Admin MCP tools).
81
+ *
82
+ * Roster size is *not* enforced here. This function is responsible only for
83
+ * retrieving a complete, non-hostile catalog; deciding whether that catalog is
84
+ * the 432-tool default roster or a profile-enabled superset belongs to the
85
+ * certification and preflight callers.
86
+ */
87
+ export declare function listAllTools(client: {
88
+ listTools(request?: {
89
+ cursor?: string;
90
+ }): Promise<{
91
+ tools: Tool[];
92
+ nextCursor?: string;
93
+ }>;
94
+ }): Promise<Tool[]>;
95
+ export declare function runAdminParityCertification(env?: NodeJS.ProcessEnv, outputPath?: string): Promise<AdminParityReceipt>;
96
+ //# sourceMappingURL=admin-parity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-parity.d.ts","sourceRoot":"","sources":["../../../src/certification/admin-parity.ts"],"names":[],"mappings":";AAgBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG/D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,aAAa,EAAE,2BAA2B,CAAC;IACpD,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AASD,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,SAAS,IAAI,EAAE,EAC9B,cAAc,EAAE,SAAS,IAAI,EAAE,EAC/B,WAAW,GAAE,sBAA4C,GACxD,kBAAkB,CAqFpB;AAgCD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYzD;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAE9C,+EAA+E;AAC/E,eAAO,MAAM,gCAAgC,OAAQ,CAAC;AAEtD;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE;IACzC,SAAS,CAAC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3F,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAgClB;AAED,wBAAsB,2BAA2B,CAC/C,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,UAAU,SAA0B,GACnC,OAAO,CAAC,kBAAkB,CAAC,CAwB7B"}