@acid-cat/cli 0.15.0 → 0.17.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 CHANGED
@@ -39,7 +39,7 @@ You get the JSON document only when the options are correct. With incorrect opti
39
39
  - An **error** is a broken rule. Examples: an audience that names an unknown target, an event payload that is not an object, or an id that is both a capability and an event.
40
40
  - A **warning** is a broken recommendation. Examples: a file that is not in [canonical form](../../spec/catalog.md#canonical-form), or a member with no `x-` prefix.
41
41
 
42
- It also checks each alias in `options.cli` against the [alias rules](../../spec/bindings/cli.md#aliases).
42
+ It also checks each alias in `options.cli` against the [alias rules](../../spec/bindings/cli.md#aliases), and each `x-mcp-header` member in an input schema against the [header annotation rules](../../spec/bindings/mcp.md#header-annotations) of MCP. An error about `x-mcp-header` names the capability or the event, and the location of the member as a JSON pointer into the bundled input schema.
43
43
 
44
44
  The exit code is 1 with errors, and 0 otherwise. With `--strict`, warnings also give exit code 1.
45
45
 
@@ -87,7 +87,10 @@ Each flag has an equivalent option for `conform()` in code. Give one or more bin
87
87
  - Events: Through HTTP, MCP and the CLI: the list of events, failures before the first occurrence, each occurrence against `schemas/occurrence.schema.json` and its payload schema, order, `truncated`, the cursor, each end, and cancellation. Through WebMCP, no event is a tool.
88
88
  - [Poll delivery](../../spec/bindings/mcp.md#poll): Through MCP, when `events/list` gives `poll`. Otherwise the check gives a warning and `events/poll` must answer `Unsupported`. `--poll-buffer` adds a cursor older than the buffer. The lease time of `--mcp` and `--mcp-stdio` must be longer than the deadline, because a check uses a lease for its whole time. `--poll-lease-mcp` with `--poll-lease-ms` adds the end of an unused lease. Serve it from a second MCP server with a lease time shorter than the deadline, for example 1000.
89
89
  - [Webhook delivery](../../spec/bindings/mcp.md#webhook): Through MCP over HTTP, with the three `--webhook-*` options. The checks run an HTTPS receiver on `127.0.0.1` with that certificate. Configure the deployment to trust the certificate, allow deliveries to private addresses, and give the principal `<name>` to a request with `Authorization: Bearer <name>`. The deadline must be longer than the deployment's first retry wait, and the maximum lifetime must be longer than the deadline. Give `--webhook-other-principal` with `--webhook-max-subscriptions`: the limit check then fills a principal that no other check uses. Without the webhook options, a server that does not list `webhook` must answer `Unsupported`.
90
+ - [Server Card](../../spec/bindings/mcp.md#server-card): Through MCP over HTTP, when `<mcp>/server-card` gives 200. The card must pass the JSON Schema of the Server Card extension, have one remote with the URL of `--mcp`, the version of `server/discover` and the revisions that the server serves, the CORS and cache headers, 304 for its `ETag`, 204 for `OPTIONS`, public signing keys only, and egress ranges in CIDR text. With the webhook options and signing keys in the card, each webhook request must have one `v1a,` signature for each key, and each must verify. The JSON Schema is `conformance/server-card.schema.json`, from commit `28db12c` of [ext-server-card](https://github.com/modelcontextprotocol/ext-server-card), under the Apache License 2.0 in `conformance/server-card.LICENSE`.
90
91
  - [Hints](../../spec/bindings/mcp.md#tools): Each MCP tool's annotations match its capability's hints.
92
+ - [Heartbeat](../../spec/bindings/mcp.md#push): Through MCP with each transport, each `notifications/events/active` grants a `heartbeatMs`. A suggestion is clamped between 1000 and 60 000, a heartbeat comes after the grant, and a suggestion that is not valid gets `-32602`.
93
+ - [Headers](../../spec/bindings/mcp.md#headers): Through MCP over HTTP, a missing or wrong `Mcp-Method`, `Mcp-Name` or `Mcp-Param-*` header on `tools/call` and `events/stream` gets 400 and `-32020`, and a value in the base64 form is decoded, with a leading U+FEFF kept. Every request of conform mirrors the annotated arguments of the fixture (`fixture.switch.set` and `fixture.ticks`) into their headers.
91
94
  - Properties: With fast-check, through MCP and HTTP: concurrent calls each get their own outcome, and a cancellation changes only its own call.
92
95
 
93
96
  Each poll check uses a new key, so leases from an earlier run do not change the result.
@@ -427,7 +427,8 @@
427
427
  "input": {
428
428
  "properties": {
429
429
  "on": {
430
- "type": "boolean"
430
+ "type": "boolean",
431
+ "x-mcp-header": "On"
431
432
  }
432
433
  },
433
434
  "required": [
@@ -536,7 +537,8 @@
536
537
  "type": "integer"
537
538
  },
538
539
  "key": {
539
- "type": "string"
540
+ "type": "string",
541
+ "x-mcp-header": "Key"
540
542
  }
541
543
  },
542
544
  "required": [
@@ -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 [yyyy] [name of copyright owner]
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.
@@ -0,0 +1,295 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$defs": {
4
+ "Icon": {
5
+ "description": "An optionally-sized icon that can be displayed in a user interface.",
6
+ "properties": {
7
+ "mimeType": {
8
+ "description": "Optional MIME type override if the source MIME type is missing or generic.\nFor example: `\"image/png\"`, `\"image/jpeg\"`, or `\"image/svg+xml\"`.",
9
+ "type": "string"
10
+ },
11
+ "sizes": {
12
+ "description": "Optional array of strings that specify sizes at which the icon can be used.\nEach string should be in WxH format (e.g., `\"48x48\"`, `\"96x96\"`) or `\"any\"` for scalable formats like SVG.\n\nIf not provided, the client should assume that the icon can be used at any size.",
13
+ "items": {
14
+ "type": "string"
15
+ },
16
+ "type": "array"
17
+ },
18
+ "src": {
19
+ "description": "A standard URI pointing to an icon resource. May be an HTTP/HTTPS URL or a\n`data:` URI with Base64-encoded image data.\n\nConsumers SHOULD take steps to ensure URLs serving icons are from the\nsame domain as the client/server or a trusted domain.\n\nConsumers SHOULD take appropriate precautions when consuming SVGs as they can contain\nexecutable JavaScript.",
20
+ "format": "uri",
21
+ "type": "string"
22
+ },
23
+ "theme": {
24
+ "description": "Optional specifier for the theme this icon is designed for. `\"light\"` indicates\nthe icon is designed to be used with a light background, and `\"dark\"` indicates\nthe icon is designed to be used with a dark background.\n\nIf not provided, the client should assume the icon can be used with any theme.",
25
+ "enum": ["dark", "light"],
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": ["src"],
30
+ "type": "object"
31
+ },
32
+ "Input": {
33
+ "description": "A user-supplied or pre-set input value, used for {@link Remote} URL\nvariables and header values.",
34
+ "properties": {
35
+ "choices": {
36
+ "description": "Allowed values for the input. If provided, the user must select one.",
37
+ "items": {
38
+ "type": "string"
39
+ },
40
+ "type": "array"
41
+ },
42
+ "default": {
43
+ "description": "Default value for the input. SHOULD be a valid value for the input.",
44
+ "type": "string"
45
+ },
46
+ "description": {
47
+ "description": "Human-readable explanation of the input. Clients can use this to provide\ncontext to the user.",
48
+ "type": "string"
49
+ },
50
+ "format": {
51
+ "description": "Specifies the input format. `\"filepath\"` should be interpreted as a file\non the user's filesystem. When the input is converted to a string,\nbooleans should be represented by `\"true\"`/`\"false\"`, and numbers by\ndecimal values.",
52
+ "enum": ["boolean", "filepath", "number", "string"],
53
+ "type": "string"
54
+ },
55
+ "isRequired": {
56
+ "description": "Whether the input must be supplied for the connection to succeed.",
57
+ "type": "boolean"
58
+ },
59
+ "isSecret": {
60
+ "description": "Whether the input is a secret value (e.g., password, token). If true,\nclients should handle the value securely.",
61
+ "type": "boolean"
62
+ },
63
+ "placeholder": {
64
+ "description": "Placeholder displayed during configuration to provide examples or\nguidance about the expected form of the input.",
65
+ "type": "string"
66
+ },
67
+ "value": {
68
+ "description": "Pre-set value for the input. If set, the value should not be configurable\nby end users. Identifiers wrapped in `{curly_braces}` will be replaced\nwith the corresponding entries from the input's `variables` map (if any).",
69
+ "type": "string"
70
+ }
71
+ },
72
+ "type": "object"
73
+ },
74
+ "JSONArray": {
75
+ "items": {
76
+ "$ref": "#/$defs/JSONValue"
77
+ },
78
+ "type": "array"
79
+ },
80
+ "JSONObject": {
81
+ "additionalProperties": {
82
+ "$ref": "#/$defs/JSONValue"
83
+ },
84
+ "type": "object"
85
+ },
86
+ "JSONValue": {
87
+ "anyOf": [
88
+ {
89
+ "$ref": "#/$defs/JSONObject"
90
+ },
91
+ {
92
+ "items": {
93
+ "$ref": "#/$defs/JSONValue"
94
+ },
95
+ "type": "array"
96
+ },
97
+ {
98
+ "type": ["string", "integer", "boolean"]
99
+ }
100
+ ]
101
+ },
102
+ "KeyValueInput": {
103
+ "description": "A named {@link Input} — used for HTTP headers — whose `value` may reference\nvariables for substitution.",
104
+ "properties": {
105
+ "choices": {
106
+ "description": "Allowed values for the input. If provided, the user must select one.",
107
+ "items": {
108
+ "type": "string"
109
+ },
110
+ "type": "array"
111
+ },
112
+ "default": {
113
+ "description": "Default value for the input. SHOULD be a valid value for the input.",
114
+ "type": "string"
115
+ },
116
+ "description": {
117
+ "description": "Human-readable explanation of the input. Clients can use this to provide\ncontext to the user.",
118
+ "type": "string"
119
+ },
120
+ "format": {
121
+ "description": "Specifies the input format. `\"filepath\"` should be interpreted as a file\non the user's filesystem. When the input is converted to a string,\nbooleans should be represented by `\"true\"`/`\"false\"`, and numbers by\ndecimal values.",
122
+ "enum": ["boolean", "filepath", "number", "string"],
123
+ "type": "string"
124
+ },
125
+ "isRequired": {
126
+ "description": "Whether the input must be supplied for the connection to succeed.",
127
+ "type": "boolean"
128
+ },
129
+ "isSecret": {
130
+ "description": "Whether the input is a secret value (e.g., password, token). If true,\nclients should handle the value securely.",
131
+ "type": "boolean"
132
+ },
133
+ "name": {
134
+ "description": "Name of the header.",
135
+ "type": "string"
136
+ },
137
+ "placeholder": {
138
+ "description": "Placeholder displayed during configuration to provide examples or\nguidance about the expected form of the input.",
139
+ "type": "string"
140
+ },
141
+ "value": {
142
+ "description": "Pre-set value for the input. If set, the value should not be configurable\nby end users. Identifiers wrapped in `{curly_braces}` will be replaced\nwith the corresponding entries from the input's `variables` map (if any).",
143
+ "type": "string"
144
+ },
145
+ "variables": {
146
+ "additionalProperties": {
147
+ "$ref": "#/$defs/Input"
148
+ },
149
+ "description": "Variables referenced by `{curly_braces}` identifiers in `value`. The map\nkey is the variable name; the value defines the variable's properties.",
150
+ "type": "object"
151
+ }
152
+ },
153
+ "required": ["name"],
154
+ "type": "object"
155
+ },
156
+ "MetaObject": {
157
+ "additionalProperties": {},
158
+ "description": "Represents the contents of a `_meta` field, which clients and servers use to attach additional metadata to their interactions.\n\nCertain key names are reserved by MCP for protocol-level metadata; implementations MUST NOT make assumptions about values at these keys. Additionally, specific schema definitions may reserve particular names for purpose-specific metadata, as declared in those definitions.\n\nValid keys have two segments:\n\n**Prefix:**\n- Optional — if specified, MUST be a series of _labels_ separated by dots (`.`), followed by a slash (`/`).\n- Labels MUST start with a letter and end with a letter or digit. Interior characters may be letters, digits, or hyphens (`-`).\n- Any prefix consisting of zero or more labels, followed by `modelcontextprotocol` or `mcp`, followed by any label, is **reserved** for MCP use. For example: `modelcontextprotocol.io/`, `mcp.dev/`, `api.modelcontextprotocol.org/`, and `tools.mcp.com/` are all reserved.\n\n**Name:**\n- Unless empty, MUST start and end with an alphanumeric character (`[a-z0-9A-Z]`).\n- Interior characters may be alphanumeric, hyphens (`-`), underscores (`_`), or dots (`.`).",
159
+ "type": "object"
160
+ },
161
+ "Remote": {
162
+ "description": "Metadata for connecting to a remote (HTTP-based) MCP server endpoint.",
163
+ "properties": {
164
+ "extensionsInfo": {
165
+ "additionalProperties": {
166
+ "$ref": "#/$defs/JSONObject"
167
+ },
168
+ "description": "Optional server-level information about MCP extensions for this remote\nendpoint. Keys are extension identifiers (e.g.,\n`\"io.modelcontextprotocol/events\"`), and values are objects whose contents\nare defined by the respective extension — typically information a client\nneeds before connecting, such as keys for verifying webhook signatures.\n\nThe presence or absence of an entry does not indicate whether the server\nsupports that extension, and an entry need not match the server's\n`capabilities.extensions`. Extension support is negotiated at runtime via\n`server/discover` and may vary per user.\n\nKeys MUST follow the {@link MetaObject`_meta` key naming rules}, with a\nmandatory prefix.",
169
+ "type": "object"
170
+ },
171
+ "headers": {
172
+ "description": "HTTP headers required or accepted when connecting to this remote\nendpoint. Each header is described as a {@link KeyValueInput} so that\nclients can prompt users for required values, mark secrets, surface\ndefaults, and constrain to a list of choices.",
173
+ "items": {
174
+ "$ref": "#/$defs/KeyValueInput"
175
+ },
176
+ "type": "array"
177
+ },
178
+ "supportedProtocolVersions": {
179
+ "description": "MCP protocol versions actively supported by this remote endpoint. Allows\nclients to select a compatible protocol version before connecting.",
180
+ "items": {
181
+ "type": "string"
182
+ },
183
+ "type": "array"
184
+ },
185
+ "type": {
186
+ "description": "The transport type for this remote endpoint.",
187
+ "enum": ["sse", "streamable-http"],
188
+ "type": "string"
189
+ },
190
+ "url": {
191
+ "description": "URL template for the remote endpoint. Must start with `http://`,\n`https://`, or a `{template-variable}`. Variables in `{curly_braces}`\nare substituted from the {@link Remote.variables} map before the\nclient connects.",
192
+ "pattern": "^(https?://[^\\s]+|\\{[a-zA-Z_][a-zA-Z0-9_]*\\}[^\\s]*)$",
193
+ "type": "string"
194
+ },
195
+ "variables": {
196
+ "additionalProperties": {
197
+ "$ref": "#/$defs/Input"
198
+ },
199
+ "description": "Configuration variables that can be referenced as `{curly_braces}`\nplaceholders in `url` (and inside header values via\n{@link KeyValueInput.variables}). The map key is the variable\nname; the value defines the variable's properties (e.g., human-readable\ndescription, default, whether it is required or secret).",
200
+ "type": "object"
201
+ }
202
+ },
203
+ "required": ["type", "url"],
204
+ "type": "object"
205
+ },
206
+ "Repository": {
207
+ "description": "Repository metadata for the MCP server source code. Enables users and\nsecurity experts to inspect the code, improving transparency.",
208
+ "properties": {
209
+ "id": {
210
+ "description": "Repository identifier from the hosting service (e.g., GitHub repo ID).\nOwned and determined by the source forge. Should remain stable across\nrepository renames and may be used to detect repository resurrection\nattacks — if a repository is deleted and recreated, the ID should change.",
211
+ "type": "string"
212
+ },
213
+ "source": {
214
+ "description": "Repository hosting service identifier (e.g., `\"github\"`). Used by registries\nto determine validation and API access methods.",
215
+ "type": "string"
216
+ },
217
+ "subfolder": {
218
+ "description": "Optional relative path from repository root to the server location within a\nmonorepo or nested package structure. Must be a clean relative path.",
219
+ "type": "string"
220
+ },
221
+ "url": {
222
+ "description": "Repository URL for browsing source code. Should support both web browsing\nand `git clone` operations.",
223
+ "format": "uri",
224
+ "type": "string"
225
+ }
226
+ },
227
+ "required": ["source", "url"],
228
+ "type": "object"
229
+ },
230
+ "ServerCard": {
231
+ "description": "A static metadata document describing a remote MCP server, suitable for\npre-connection discovery. A Server Card may be hosted at any unreserved URI;\nMCP reserves `GET <streamable-http-url>/server-card` as the recommended\nlocation. Clients learn a card's URL from an [AI Catalog](https://github.com/Agent-Card/ai-catalog)\nrather than guessing it.\n\nServer Cards describe only what is needed to discover and connect to a remote server:\nidentity, transport, and protocol versions.\n\nThey do not enumerate primitives (tools, resources, prompts) — those remain\nsubject to runtime listing via the protocol's standard list operations.\n\nThe fields a Server Card does declare (identity, transport, protocol\nversions) are advisory, not authoritative: they should be consistent with\nthe server's `server/discover` response, and clients must not treat them as\nauthoritative for security decisions. See \"Consistency with Runtime\nBehavior\" in docs/discovery.md for the normative requirement.",
232
+ "properties": {
233
+ "$schema": {
234
+ "description": "The Server Card JSON Schema URI that this document conforms to. Required.\n\nMust be the `/v1/` Server Card schema URL under\n`static.modelcontextprotocol.io/schemas/` (i.e.,\n`https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json`).\nSchema URLs are versioned by the `vN` segment rather than by date; a\nbreaking revision of the Server Card shape publishes a new `vN` family.",
235
+ "format": "uri",
236
+ "pattern": "^https://static\\.modelcontextprotocol\\.io/schemas/v1/server-card\\.schema\\.json$",
237
+ "type": "string"
238
+ },
239
+ "_meta": {
240
+ "$ref": "#/$defs/MetaObject",
241
+ "description": "Extension metadata using reverse-DNS namespacing for vendor-specific data.\n\nFollows the protocol's standard `_meta` definition."
242
+ },
243
+ "description": {
244
+ "description": "Clear human-readable explanation of server functionality. Should focus on\ncapabilities, not implementation details.",
245
+ "maxLength": 100,
246
+ "minLength": 1,
247
+ "type": "string"
248
+ },
249
+ "icons": {
250
+ "description": "Optional set of sized icons that the client can display in a user interface.\n\nClients that support rendering icons MUST support at least the following\nMIME types: `image/png` and `image/jpeg` (safe, universal compatibility).\nClients SHOULD also support: `image/svg+xml` (scalable but requires security\nprecautions) and `image/webp` (modern, efficient format).",
251
+ "items": {
252
+ "$ref": "#/$defs/Icon"
253
+ },
254
+ "type": "array"
255
+ },
256
+ "name": {
257
+ "description": "Server name in reverse-DNS format. Must contain exactly one forward slash\nseparating namespace from server name.",
258
+ "maxLength": 200,
259
+ "minLength": 3,
260
+ "pattern": "^[a-zA-Z0-9.-]+/[a-zA-Z0-9._-]+$",
261
+ "type": "string"
262
+ },
263
+ "remotes": {
264
+ "description": "Metadata helpful for making HTTP-based connections to this MCP server.",
265
+ "items": {
266
+ "$ref": "#/$defs/Remote"
267
+ },
268
+ "type": "array"
269
+ },
270
+ "repository": {
271
+ "$ref": "#/$defs/Repository",
272
+ "description": "Optional repository metadata for the MCP server source code.\nRecommended for transparency and security inspection."
273
+ },
274
+ "title": {
275
+ "description": "Optional human-readable title or display name for the MCP server.\nMCP subregistries or clients MAY choose to use this for display purposes.",
276
+ "maxLength": 100,
277
+ "minLength": 1,
278
+ "type": "string"
279
+ },
280
+ "version": {
281
+ "description": "Version string for this server. SHOULD follow semantic versioning\n(e.g., '1.0.2', '2.1.0-alpha'). Equivalent of `Implementation.version`\nin the MCP specification. Non-semantic versions are allowed but may not\nsort predictably. Version ranges are rejected (e.g., '^1.2.3', '~1.2.3',\n'>=1.2.3', '1.x', '1.*').",
282
+ "maxLength": 255,
283
+ "type": "string"
284
+ },
285
+ "websiteUrl": {
286
+ "description": "Optional URL to the server's homepage, documentation, or project website.\nProvides a central link for users to learn more about the server.\nParticularly useful when the server has custom installation instructions\nor setup requirements.",
287
+ "format": "uri",
288
+ "type": "string"
289
+ }
290
+ },
291
+ "required": ["$schema", "description", "name", "version"],
292
+ "type": "object"
293
+ }
294
+ }
295
+ }
package/dist/catalog.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import catalog_schema_default from "./json/catalog.schema.json.js";
2
2
  import { isObject, isRecordOf, isStringArray } from "./json.js";
3
3
  import { canonicalText } from "@acid-cat/catalog";
4
- import { REFERENCE, bundle, cliAliases, eventSchemasOf, resolveType, schemasOf, viewOf, visitObjects } from "@acid-cat/spec-ts";
4
+ import { REFERENCE, bundle, cliAliases, eventSchemasOf, mcpHeaderErrors, resolveType, schemasOf, viewOf, visitObjects } from "@acid-cat/spec-ts";
5
5
  import { Result, Schema, SchemaIssue, SchemaRepresentation } from "effect";
6
6
  // src/catalog.ts
7
7
  const KNOWN_MEMBERS = {
@@ -93,6 +93,7 @@ function ruleErrors(catalog) {
93
93
  const references = referenceErrors(schema, types);
94
94
  errors.push(...references.map((error) => `${id} ${member} ${error}`));
95
95
  if ((member === "input" || member === "payload") && references.length === 0 && resolveType(schema, types).type !== "object") errors.push(`${id}: the ${member} is not an object`);
96
+ if (member === "input" && references.length === 0) errors.push(...mcpHeaderErrors(bundle(schema, types)).map((error) => `${id} input: ${error}`));
96
97
  }
97
98
  }
98
99
  for (const target of Object.keys(catalog.targets)) errors.push(...cliAliases(catalog, target).errors);
@@ -12,6 +12,7 @@ export interface McpCheckOptions {
12
12
  readonly webhook: WebhookSettings | undefined;
13
13
  }
14
14
  export declare function checkMcp(url: string, options: McpCheckOptions): Promise<Checks>;
15
+ export declare function mcpRequestHeaders(method: string, params: JsonObject): Record<string, string>;
15
16
  export declare function checkTools(checks: Checks, mcp: Client): Promise<void>;
16
17
  export declare const EVENTS_REVISION = "2026-07-28";
17
18
  export declare const META: {