@fipsign/mcp 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 +21 -0
- package/README.md +205 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +486 -0
- package/dist/index.js.map +1 -0
- package/package.json +45 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FIPSign
|
|
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
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# @fipsign/mcp
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@fipsign/mcp)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://csrc.nist.gov/pubs/fips/204/final)
|
|
6
|
+
|
|
7
|
+
MCP server for [FIPSign](https://fipsign.dev) — post-quantum digital signing via **ML-DSA-65** (NIST FIPS 204).
|
|
8
|
+
|
|
9
|
+
Gives Claude Desktop, Claude Code, and any MCP-compatible AI agent full access to the FIPSign API without writing code: sign payloads, verify tokens, issue and revoke post-quantum certificates, manage webhooks, and monitor usage.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Tools
|
|
14
|
+
|
|
15
|
+
| Tool | Description | Token cost |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| `fipsign_health` | Check service status | free |
|
|
18
|
+
| `fipsign_public_key` | Get the server's ML-DSA-65 public key | free |
|
|
19
|
+
| `fipsign_sign` | Sign any payload | 1 token |
|
|
20
|
+
| `fipsign_verify` | Verify a signed token | 1 token |
|
|
21
|
+
| `fipsign_revoke` | Permanently revoke a token | 1 token |
|
|
22
|
+
| `fipsign_usage` | Get token balance and usage history | free |
|
|
23
|
+
| `fipsign_generate_key_pair` | Generate an ML-DSA-65 key pair locally | free |
|
|
24
|
+
| `fipsign_ca_issue` | Issue a post-quantum certificate | 1 token |
|
|
25
|
+
| `fipsign_ca_revoke_cert` | Revoke a certificate | 1 token |
|
|
26
|
+
| `fipsign_ca_get_cert` | Get certificate status by ID | free |
|
|
27
|
+
| `fipsign_ca_get_crl` | Get the Certificate Revocation List | free |
|
|
28
|
+
| `fipsign_webhooks_register` | Register a webhook endpoint | free |
|
|
29
|
+
| `fipsign_webhooks_get` | Get current webhook config | free |
|
|
30
|
+
| `fipsign_webhooks_delete` | Delete webhook configuration | free |
|
|
31
|
+
| `fipsign_webhooks_test` | Send a test event to your webhook | free |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Prerequisites
|
|
36
|
+
|
|
37
|
+
1. Node.js 18 or later
|
|
38
|
+
2. A FIPSign account and API key — [create one free at app.fipsign.dev](https://app.fipsign.dev)
|
|
39
|
+
3. For CA tools: a CA created inside your project from the dashboard
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Local testing before publishing
|
|
44
|
+
|
|
45
|
+
### Level 1 — MCP Inspector (no Claude Desktop required)
|
|
46
|
+
|
|
47
|
+
The Inspector opens a browser UI where you can call each tool manually and inspect responses without Claude Desktop.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git clone https://github.com/fipsign/fipsign-mcp
|
|
51
|
+
cd fipsign-mcp
|
|
52
|
+
npm install
|
|
53
|
+
npm run build
|
|
54
|
+
export FIPSIGN_API_KEY=pqa_your_real_key
|
|
55
|
+
npx @modelcontextprotocol/inspector node dist/index.js
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Open the URL shown in the terminal (typically `http://localhost:5173`). Select a tool, fill in the parameters, and run it.
|
|
59
|
+
|
|
60
|
+
### Level 2 — Claude Desktop with local code (without publishing to npm)
|
|
61
|
+
|
|
62
|
+
Build first, then point Claude Desktop at the local `dist/index.js`:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm run build
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Add to your `claude_desktop_config.json` (see path below):
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"fipsign": {
|
|
74
|
+
"command": "node",
|
|
75
|
+
"args": ["/absolute/path/to/fipsign-mcp/dist/index.js"],
|
|
76
|
+
"env": {
|
|
77
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Level 3 — Claude Desktop with published package (production)
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"fipsign": {
|
|
90
|
+
"command": "npx",
|
|
91
|
+
"args": ["-y", "@fipsign/mcp"],
|
|
92
|
+
"env": {
|
|
93
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Installation for Claude Desktop
|
|
103
|
+
|
|
104
|
+
`claude_desktop_config.json` is located at:
|
|
105
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
106
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
107
|
+
- **Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
108
|
+
|
|
109
|
+
Add the `fipsign` entry inside `mcpServers` (create the file if it doesn't exist):
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"mcpServers": {
|
|
114
|
+
"fipsign": {
|
|
115
|
+
"command": "npx",
|
|
116
|
+
"args": ["-y", "@fipsign/mcp"],
|
|
117
|
+
"env": {
|
|
118
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Restart Claude Desktop after editing the config. You should see the FIPSign tools available in the tools panel.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Installation for Claude Code
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
claude mcp add fipsign -- env FIPSIGN_API_KEY=pqa_your_real_key npx -y @fipsign/mcp
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Or manually in your project's `.claude/mcp.json`:
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"mcpServers": {
|
|
140
|
+
"fipsign": {
|
|
141
|
+
"command": "npx",
|
|
142
|
+
"args": ["-y", "@fipsign/mcp"],
|
|
143
|
+
"env": {
|
|
144
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Environment variables
|
|
154
|
+
|
|
155
|
+
| Variable | Required | Default | Description |
|
|
156
|
+
|---|---|---|---|
|
|
157
|
+
| `FIPSIGN_API_KEY` | Yes (for most tools) | — | Your FIPSign API key. Format: `pqa_` + 64 lowercase hex chars. Get one at app.fipsign.dev. |
|
|
158
|
+
| `FIPSIGN_BASE_URL` | No | `https://api.fipsign.dev` | Override API base URL (useful for self-hosted instances or local dev). |
|
|
159
|
+
|
|
160
|
+
`fipsign_health`, `fipsign_public_key`, and `fipsign_generate_key_pair` work without an API key.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Usage examples
|
|
165
|
+
|
|
166
|
+
Once configured, you can ask Claude:
|
|
167
|
+
|
|
168
|
+
**Signing:**
|
|
169
|
+
- *"Sign a token for user_123 with role admin that expires in 1 hour"*
|
|
170
|
+
- *"Verify this token: { payload: '...', signature: '...', algorithm: 'ML-DSA-65', issuedAt: 123 }"*
|
|
171
|
+
- *"Revoke this token because the user logged out"*
|
|
172
|
+
|
|
173
|
+
**Certificates:**
|
|
174
|
+
- *"Generate a key pair for a new IoT device"*
|
|
175
|
+
- *"Issue a certificate for device-serial-00123 using the public key I just generated, valid for 1 year"*
|
|
176
|
+
- *"Check the revocation status of cert_abc123"*
|
|
177
|
+
- *"Get the full CRL for our CA"*
|
|
178
|
+
- *"Revoke certificate cert_abc123 — device was reported stolen"*
|
|
179
|
+
|
|
180
|
+
**Monitoring:**
|
|
181
|
+
- *"How many tokens do I have left this month?"*
|
|
182
|
+
- *"Register a webhook at https://myapp.com/hooks/fipsign for limit.warning and limit.reached events"*
|
|
183
|
+
- *"Send a test event to my webhook"*
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Publishing to npm
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
npm run build
|
|
191
|
+
npm publish --access public
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Requires an npm account with publish rights to the `@fipsign` scope.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Links
|
|
199
|
+
|
|
200
|
+
- Dashboard: [app.fipsign.dev](https://app.fipsign.dev)
|
|
201
|
+
- API status: [status.fipsign.dev](https://status.fipsign.dev)
|
|
202
|
+
- JS SDK: [npmjs.com/package/fipsign-sdk](https://www.npmjs.com/package/fipsign-sdk)
|
|
203
|
+
- Python SDK: [pypi.org/project/fipsign-sdk](https://pypi.org/project/fipsign-sdk/)
|
|
204
|
+
- Python MCP: [pypi.org/project/fipsign-mcp](https://pypi.org/project/fipsign-mcp/)
|
|
205
|
+
- NIST FIPS 204: [csrc.nist.gov/pubs/fips/204/final](https://csrc.nist.gov/pubs/fips/204/final)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @fipsign/mcp — MCP server for FIPSign post-quantum signing API
|
|
4
|
+
*
|
|
5
|
+
* Exposes 15 tools covering the full FIPSign runtime API:
|
|
6
|
+
* signing, verification, revocation, usage, CA certificate lifecycle,
|
|
7
|
+
* key pair generation, and webhook management.
|
|
8
|
+
*
|
|
9
|
+
* Configuration:
|
|
10
|
+
* FIPSIGN_API_KEY — required for most tools (pqa_ + 64 hex chars)
|
|
11
|
+
* FIPSIGN_BASE_URL — optional, defaults to https://api.fipsign.dev
|
|
12
|
+
*
|
|
13
|
+
* Transport: stdio (compatible with Claude Desktop and Claude Code)
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @fipsign/mcp — MCP server for FIPSign post-quantum signing API
|
|
4
|
+
*
|
|
5
|
+
* Exposes 15 tools covering the full FIPSign runtime API:
|
|
6
|
+
* signing, verification, revocation, usage, CA certificate lifecycle,
|
|
7
|
+
* key pair generation, and webhook management.
|
|
8
|
+
*
|
|
9
|
+
* Configuration:
|
|
10
|
+
* FIPSIGN_API_KEY — required for most tools (pqa_ + 64 hex chars)
|
|
11
|
+
* FIPSIGN_BASE_URL — optional, defaults to https://api.fipsign.dev
|
|
12
|
+
*
|
|
13
|
+
* Transport: stdio (compatible with Claude Desktop and Claude Code)
|
|
14
|
+
*/
|
|
15
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
16
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
17
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
18
|
+
import { ml_dsa65 } from "@noble/post-quantum/ml-dsa.js";
|
|
19
|
+
// ─── Configuration ────────────────────────────────────────────────────────────
|
|
20
|
+
const API_KEY = process.env.FIPSIGN_API_KEY ?? "";
|
|
21
|
+
const BASE_URL = (process.env.FIPSIGN_BASE_URL ?? "https://api.fipsign.dev").replace(/\/$/, "");
|
|
22
|
+
// ─── HTTP helper ──────────────────────────────────────────────────────────────
|
|
23
|
+
async function apiRequest(method, path, body) {
|
|
24
|
+
const headers = {
|
|
25
|
+
"Content-Type": "application/json",
|
|
26
|
+
};
|
|
27
|
+
if (API_KEY) {
|
|
28
|
+
headers["X-API-Key"] = API_KEY;
|
|
29
|
+
}
|
|
30
|
+
const response = await fetch(`${BASE_URL}${path}`, {
|
|
31
|
+
method,
|
|
32
|
+
headers,
|
|
33
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
34
|
+
signal: AbortSignal.timeout(30_000),
|
|
35
|
+
});
|
|
36
|
+
let data;
|
|
37
|
+
try {
|
|
38
|
+
data = await response.json();
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
data = { success: false, error: `HTTP ${response.status} — non-JSON response` };
|
|
42
|
+
}
|
|
43
|
+
return { ok: response.ok, status: response.status, data };
|
|
44
|
+
}
|
|
45
|
+
// ─── Crypto helpers ───────────────────────────────────────────────────────────
|
|
46
|
+
function toBase64(bytes) {
|
|
47
|
+
let binary = "";
|
|
48
|
+
for (let i = 0; i < bytes.length; i++)
|
|
49
|
+
binary += String.fromCharCode(bytes[i]);
|
|
50
|
+
return btoa(binary);
|
|
51
|
+
}
|
|
52
|
+
// ─── Tool result helpers ──────────────────────────────────────────────────────
|
|
53
|
+
function ok(data) {
|
|
54
|
+
return {
|
|
55
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function err(message, detail) {
|
|
59
|
+
return {
|
|
60
|
+
content: [
|
|
61
|
+
{
|
|
62
|
+
type: "text",
|
|
63
|
+
text: JSON.stringify({ error: message, ...(detail !== undefined ? { detail } : {}) }, null, 2),
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
isError: true,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function missingApiKey() {
|
|
70
|
+
return err("FIPSIGN_API_KEY is not set. Export it before starting the server: export FIPSIGN_API_KEY=pqa_...");
|
|
71
|
+
}
|
|
72
|
+
// ─── Tool definitions ─────────────────────────────────────────────────────────
|
|
73
|
+
const TOOLS = [
|
|
74
|
+
// ── Infrastructure ──────────────────────────────────────────────────────────
|
|
75
|
+
{
|
|
76
|
+
name: "fipsign_health",
|
|
77
|
+
description: "Check the health of the FIPSign service. Returns the service status, algorithm (ML-DSA-65), NIST standard, and version. No API key required. Use this to verify the service is reachable before running other operations.",
|
|
78
|
+
inputSchema: {
|
|
79
|
+
type: "object",
|
|
80
|
+
properties: {},
|
|
81
|
+
required: [],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "fipsign_public_key",
|
|
86
|
+
description: "Get the current ML-DSA-65 public key of the FIPSign server. Returns a base64-encoded 1952-byte public key. Use this when you need to verify token signatures independently without calling the /verify endpoint (e.g. for offline verification or third-party auditing). No API key required.",
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: "object",
|
|
89
|
+
properties: {},
|
|
90
|
+
required: [],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
// ── Core signing ─────────────────────────────────────────────────────────────
|
|
94
|
+
{
|
|
95
|
+
name: "fipsign_sign",
|
|
96
|
+
description: "Sign any payload with ML-DSA-65 (NIST FIPS 204). The only required field is 'sub' — any string identifying the entity being signed: a user ID, order ID, document hash, device serial, AI agent action, or anything else. All other fields are stored in the payload and returned on verify. Costs 1 token. Returns the signed token object (payload, signature, algorithm, issuedAt) plus usage info.",
|
|
97
|
+
inputSchema: {
|
|
98
|
+
type: "object",
|
|
99
|
+
properties: {
|
|
100
|
+
sub: {
|
|
101
|
+
type: "string",
|
|
102
|
+
description: "Required. Entity identifier. Max 128 characters. Examples: 'user_123', 'order_456', 'doc_hash_abc', 'device_serial_001', 'agent_action_summarize'.",
|
|
103
|
+
},
|
|
104
|
+
expiresInSeconds: {
|
|
105
|
+
type: "number",
|
|
106
|
+
description: "Token lifetime in seconds. Default: 3600 (1 hour). Pass a larger value for long-lived tokens (e.g. document signatures: 365 * 24 * 3600).",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
required: ["sub"],
|
|
110
|
+
additionalProperties: {
|
|
111
|
+
description: "Any additional custom fields to embed in the payload. Max 10 extra fields, string values max 256 chars.",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: "fipsign_verify",
|
|
117
|
+
description: "Verify a FIPSign token signed with ML-DSA-65. Checks the cryptographic signature, expiry, and revocation list. Returns valid:true with the decoded payload on success, or valid:false with an error message on failure. Never throws — always returns a result. Costs 1 token.",
|
|
118
|
+
inputSchema: {
|
|
119
|
+
type: "object",
|
|
120
|
+
properties: {
|
|
121
|
+
token: {
|
|
122
|
+
type: "object",
|
|
123
|
+
description: "The token object returned by fipsign_sign. Must have: payload (string), signature (string), algorithm (string), issuedAt (number).",
|
|
124
|
+
properties: {
|
|
125
|
+
payload: { type: "string" },
|
|
126
|
+
signature: { type: "string" },
|
|
127
|
+
algorithm: { type: "string" },
|
|
128
|
+
issuedAt: { type: "number" },
|
|
129
|
+
},
|
|
130
|
+
required: ["payload", "signature", "algorithm", "issuedAt"],
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
required: ["token"],
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "fipsign_revoke",
|
|
138
|
+
description: "Permanently revoke a token. Once revoked, all future verify() calls will reject the token even if its signature is valid and it has not expired. Idempotent: revoking an already-revoked token returns success without consuming an extra token. Costs 1 token. Note: calling this on an already-expired token returns an error (400).",
|
|
139
|
+
inputSchema: {
|
|
140
|
+
type: "object",
|
|
141
|
+
properties: {
|
|
142
|
+
token: {
|
|
143
|
+
type: "object",
|
|
144
|
+
description: "The token object to revoke. Must have: payload, signature, algorithm, issuedAt.",
|
|
145
|
+
properties: {
|
|
146
|
+
payload: { type: "string" },
|
|
147
|
+
signature: { type: "string" },
|
|
148
|
+
algorithm: { type: "string" },
|
|
149
|
+
issuedAt: { type: "number" },
|
|
150
|
+
},
|
|
151
|
+
required: ["payload", "signature", "algorithm", "issuedAt"],
|
|
152
|
+
},
|
|
153
|
+
reason: {
|
|
154
|
+
type: "string",
|
|
155
|
+
description: "Optional human-readable reason stored server-side. Examples: 'user logged out', 'order cancelled', 'suspicious activity detected'.",
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
required: ["token"],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
// ── Account ──────────────────────────────────────────────────────────────────
|
|
162
|
+
{
|
|
163
|
+
name: "fipsign_usage",
|
|
164
|
+
description: "Get the current token balance and 6-month usage history for this API key's account. Returns free tokens remaining (resets monthly), pack tokens remaining (never expire), total remaining, and a monthly breakdown. Free — no token cost. Use before batch operations to confirm sufficient balance.",
|
|
165
|
+
inputSchema: {
|
|
166
|
+
type: "object",
|
|
167
|
+
properties: {},
|
|
168
|
+
required: [],
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
// ── Key generation ───────────────────────────────────────────────────────────
|
|
172
|
+
{
|
|
173
|
+
name: "fipsign_generate_key_pair",
|
|
174
|
+
description: "Generate an ML-DSA-65 key pair locally (no API call, no token cost). Returns a base64-encoded public key (1952 bytes) and secret key (4032 bytes). Use the publicKey when calling fipsign_ca_issue to certify a device or entity. SECURITY WARNING: the secretKey is sensitive — store it securely on the device and never send it to any server. The secretKey will appear in this tool's response; treat it like a private key.",
|
|
175
|
+
inputSchema: {
|
|
176
|
+
type: "object",
|
|
177
|
+
properties: {},
|
|
178
|
+
required: [],
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
// ── Certificate Authority ─────────────────────────────────────────────────────
|
|
182
|
+
{
|
|
183
|
+
name: "fipsign_ca_issue",
|
|
184
|
+
description: "Issue a post-quantum certificate signed by the project's CA. The certificate certifies that the entity identified by 'subject' controls the given ML-DSA-65 public key. Supports both PQCert (native JSON) and X.509 (standard PEM) CA formats — the format is determined by which CA type was created in the dashboard. For PQCert CAs, the response includes a certificate JSON object. For X.509 CAs, it includes a PEM string. Costs 1 token.\n\nRequired: subject (entity name/ID), publicKey (base64 ML-DSA-65 public key — generate with fipsign_generate_key_pair), expiresInSeconds (min 60, max 157680000 = 5 years).\n\nOptional: meta (up to 10 key-value pairs — PQCert CAs only; passing meta to an X.509 CA returns a 400 error).\n\nThe returned certId (in meta.certId) is what you need for fipsign_ca_revoke_cert and fipsign_ca_get_cert.",
|
|
185
|
+
inputSchema: {
|
|
186
|
+
type: "object",
|
|
187
|
+
properties: {
|
|
188
|
+
subject: {
|
|
189
|
+
type: "string",
|
|
190
|
+
description: "Entity identifier to certify. Examples: 'device-serial-00123', 'service-payment-processor', 'lock-v3-batch-2026'. Max 256 characters.",
|
|
191
|
+
},
|
|
192
|
+
publicKey: {
|
|
193
|
+
type: "string",
|
|
194
|
+
description: "Base64-encoded ML-DSA-65 public key of the entity to certify (1952 bytes decoded). Generate with fipsign_generate_key_pair.",
|
|
195
|
+
},
|
|
196
|
+
expiresInSeconds: {
|
|
197
|
+
type: "number",
|
|
198
|
+
description: "Certificate lifetime in seconds. Min: 60 (1 minute). Max: 157680000 (5 years). Example: 31536000 = 1 year.",
|
|
199
|
+
},
|
|
200
|
+
meta: {
|
|
201
|
+
type: "object",
|
|
202
|
+
description: "Optional custom key-value pairs to embed in the certificate (PQCert CAs only — returns 400 for X.509 CAs). Max 10 keys. Example: {\"model\": \"lock-v3\", \"batch\": \"2026-05\"}.",
|
|
203
|
+
additionalProperties: true,
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
required: ["subject", "publicKey", "expiresInSeconds"],
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: "fipsign_ca_revoke_cert",
|
|
211
|
+
description: "Revoke a certificate immediately. From this point on, the certificate will appear in the CRL returned by fipsign_ca_get_crl. Use fipsign_ca_get_cert to check real-time revocation status of a single certificate. Costs 1 token. Returns 409 if the certificate is already revoked.",
|
|
212
|
+
inputSchema: {
|
|
213
|
+
type: "object",
|
|
214
|
+
properties: {
|
|
215
|
+
certId: {
|
|
216
|
+
type: "string",
|
|
217
|
+
description: "The certificate ID to revoke (cert_...). For PQCert: the 'id' field of the certificate object. For X.509: the 'certId' field from meta returned by fipsign_ca_issue.",
|
|
218
|
+
},
|
|
219
|
+
reason: {
|
|
220
|
+
type: "string",
|
|
221
|
+
description: "Optional reason for revocation. Max 256 characters. Examples: 'device decommissioned', 'device reported stolen', 'key compromise'.",
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
required: ["certId"],
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: "fipsign_ca_get_cert",
|
|
229
|
+
description: "Get a certificate by ID and its current real-time status (revoked, expired, revokedAt, expiresAt). Use this for single certificate checks before authorizing high-value operations. For bulk offline revocation checks across many certificates, use fipsign_ca_get_crl instead. Free — no token cost.",
|
|
230
|
+
inputSchema: {
|
|
231
|
+
type: "object",
|
|
232
|
+
properties: {
|
|
233
|
+
certId: {
|
|
234
|
+
type: "string",
|
|
235
|
+
description: "The certificate ID (cert_...). For PQCert: certificate.id. For X.509: meta.certId from fipsign_ca_issue.",
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
required: ["certId"],
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: "fipsign_ca_get_crl",
|
|
243
|
+
description: "Get the Certificate Revocation List (CRL) for this project's CA. Returns all revoked certificate IDs with their revocation timestamps and reasons. Use this to check revocation status of multiple certificates offline — download once, check locally. For a single certificate's real-time status use fipsign_ca_get_cert instead. Free — no token cost. For X.509 CAs the CRL is signed with ML-DSA-65 and includes the full signed object in the 'raw' field.",
|
|
244
|
+
inputSchema: {
|
|
245
|
+
type: "object",
|
|
246
|
+
properties: {},
|
|
247
|
+
required: [],
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
// ── Webhooks ─────────────────────────────────────────────────────────────────
|
|
251
|
+
{
|
|
252
|
+
name: "fipsign_webhooks_register",
|
|
253
|
+
description: "Register or update a webhook endpoint that will receive real-time event notifications. Available events: 'token.signed', 'token.rejected', 'token.revoked', 'limit.warning' (fired at 20% free tokens remaining), 'limit.reached' (fired when free tokens are exhausted). If omitted, all events are subscribed. Re-registering an existing webhook updates the URL and events but preserves the original secret — to rotate the secret, delete and re-register. The 'secret' field in the response is shown only once — store it securely to verify incoming request signatures via HMAC-SHA256 on the X-PQAuth-Signature header.",
|
|
254
|
+
inputSchema: {
|
|
255
|
+
type: "object",
|
|
256
|
+
properties: {
|
|
257
|
+
url: {
|
|
258
|
+
type: "string",
|
|
259
|
+
description: "HTTPS endpoint that will receive POST requests. Must be a valid HTTPS URL accessible from the internet. Example: 'https://yourapp.com/webhooks/fipsign'.",
|
|
260
|
+
},
|
|
261
|
+
events: {
|
|
262
|
+
type: "array",
|
|
263
|
+
items: {
|
|
264
|
+
type: "string",
|
|
265
|
+
enum: ["token.signed", "token.rejected", "token.revoked", "limit.warning", "limit.reached"],
|
|
266
|
+
},
|
|
267
|
+
description: "Optional list of events to subscribe to. Defaults to all events if omitted.",
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
required: ["url"],
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: "fipsign_webhooks_get",
|
|
275
|
+
description: "Get the current webhook configuration (URL, subscribed events, active status, creation timestamp). The webhook secret is never returned after initial registration — only the URL and event list. Returns null webhook if no webhook has been registered.",
|
|
276
|
+
inputSchema: {
|
|
277
|
+
type: "object",
|
|
278
|
+
properties: {},
|
|
279
|
+
required: [],
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
name: "fipsign_webhooks_delete",
|
|
284
|
+
description: "Delete the current webhook configuration. After deletion, no events will be delivered until a new webhook is registered via fipsign_webhooks_register.",
|
|
285
|
+
inputSchema: {
|
|
286
|
+
type: "object",
|
|
287
|
+
properties: {},
|
|
288
|
+
required: [],
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
name: "fipsign_webhooks_test",
|
|
293
|
+
description: "Send a test 'token.signed' event to the registered webhook endpoint. Use this immediately after registering a webhook to confirm delivery is working before relying on it in production. Requires a webhook to be registered first.",
|
|
294
|
+
inputSchema: {
|
|
295
|
+
type: "object",
|
|
296
|
+
properties: {},
|
|
297
|
+
required: [],
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
];
|
|
301
|
+
// ─── Tool handlers ────────────────────────────────────────────────────────────
|
|
302
|
+
async function handleTool(name, args) {
|
|
303
|
+
// Tools that don't require API key
|
|
304
|
+
if (name === "fipsign_health") {
|
|
305
|
+
const { data } = await apiRequest("GET", "/health");
|
|
306
|
+
return ok(data);
|
|
307
|
+
}
|
|
308
|
+
if (name === "fipsign_public_key") {
|
|
309
|
+
const { data } = await apiRequest("GET", "/public-key");
|
|
310
|
+
return ok(data);
|
|
311
|
+
}
|
|
312
|
+
if (name === "fipsign_generate_key_pair") {
|
|
313
|
+
const seed = new Uint8Array(32);
|
|
314
|
+
crypto.getRandomValues(seed);
|
|
315
|
+
const keys = ml_dsa65.keygen(seed);
|
|
316
|
+
seed.fill(0);
|
|
317
|
+
return ok({
|
|
318
|
+
publicKey: toBase64(keys.publicKey),
|
|
319
|
+
secretKey: toBase64(keys.secretKey),
|
|
320
|
+
algorithm: "ML-DSA-65",
|
|
321
|
+
standard: "NIST FIPS 204",
|
|
322
|
+
sizes: {
|
|
323
|
+
publicKeyBytes: keys.publicKey.length,
|
|
324
|
+
secretKeyBytes: keys.secretKey.length,
|
|
325
|
+
},
|
|
326
|
+
note: "Store secretKey securely on the device. Never send it to any server. Pass publicKey to fipsign_ca_issue.",
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
// All remaining tools require API key
|
|
330
|
+
if (!API_KEY)
|
|
331
|
+
return missingApiKey();
|
|
332
|
+
switch (name) {
|
|
333
|
+
// ── Core signing ──────────────────────────────────────────────────────────
|
|
334
|
+
case "fipsign_sign": {
|
|
335
|
+
const { sub, expiresInSeconds, ...rest } = args;
|
|
336
|
+
if (!sub || typeof sub !== "string") {
|
|
337
|
+
return err('"sub" is required and must be a string');
|
|
338
|
+
}
|
|
339
|
+
const body = { sub, ...rest };
|
|
340
|
+
if (expiresInSeconds !== undefined)
|
|
341
|
+
body.expiresInSeconds = expiresInSeconds;
|
|
342
|
+
const { ok: success, data } = await apiRequest("POST", "/sign", body);
|
|
343
|
+
if (!success)
|
|
344
|
+
return err("Sign failed", data);
|
|
345
|
+
return ok(data);
|
|
346
|
+
}
|
|
347
|
+
case "fipsign_verify": {
|
|
348
|
+
const { token } = args;
|
|
349
|
+
if (!token || typeof token !== "object") {
|
|
350
|
+
return err('"token" is required and must be the token object returned by fipsign_sign');
|
|
351
|
+
}
|
|
352
|
+
const { ok: success, data } = await apiRequest("POST", "/verify", { token });
|
|
353
|
+
// verify returns valid:false on failure — not necessarily an HTTP error
|
|
354
|
+
return ok(data);
|
|
355
|
+
}
|
|
356
|
+
case "fipsign_revoke": {
|
|
357
|
+
const { token, reason } = args;
|
|
358
|
+
if (!token || typeof token !== "object") {
|
|
359
|
+
return err('"token" is required and must be the token object returned by fipsign_sign');
|
|
360
|
+
}
|
|
361
|
+
const body = { token };
|
|
362
|
+
if (reason !== undefined)
|
|
363
|
+
body.reason = reason;
|
|
364
|
+
const { ok: success, data } = await apiRequest("POST", "/revoke", body);
|
|
365
|
+
if (!success)
|
|
366
|
+
return err("Revoke failed", data);
|
|
367
|
+
return ok(data);
|
|
368
|
+
}
|
|
369
|
+
// ── Account ───────────────────────────────────────────────────────────────
|
|
370
|
+
case "fipsign_usage": {
|
|
371
|
+
const { ok: success, data } = await apiRequest("GET", "/usage");
|
|
372
|
+
if (!success)
|
|
373
|
+
return err("Usage request failed", data);
|
|
374
|
+
return ok(data);
|
|
375
|
+
}
|
|
376
|
+
// ── Certificate Authority ─────────────────────────────────────────────────
|
|
377
|
+
case "fipsign_ca_issue": {
|
|
378
|
+
const { subject, publicKey, expiresInSeconds, meta } = args;
|
|
379
|
+
if (!subject || typeof subject !== "string") {
|
|
380
|
+
return err('"subject" is required');
|
|
381
|
+
}
|
|
382
|
+
if (!publicKey || typeof publicKey !== "string") {
|
|
383
|
+
return err('"publicKey" is required — generate one with fipsign_generate_key_pair');
|
|
384
|
+
}
|
|
385
|
+
if (typeof expiresInSeconds !== "number") {
|
|
386
|
+
return err('"expiresInSeconds" is required and must be a number (min 60, max 157680000)');
|
|
387
|
+
}
|
|
388
|
+
const body = { subject, publicKey, expiresInSeconds };
|
|
389
|
+
if (meta !== undefined)
|
|
390
|
+
body.meta = meta;
|
|
391
|
+
const { ok: success, data } = await apiRequest("POST", "/ca/issue", body);
|
|
392
|
+
if (!success)
|
|
393
|
+
return err("CA issue failed", data);
|
|
394
|
+
return ok(data);
|
|
395
|
+
}
|
|
396
|
+
case "fipsign_ca_revoke_cert": {
|
|
397
|
+
const { certId, reason } = args;
|
|
398
|
+
if (!certId || typeof certId !== "string") {
|
|
399
|
+
return err('"certId" is required');
|
|
400
|
+
}
|
|
401
|
+
const body = { certId };
|
|
402
|
+
if (reason !== undefined)
|
|
403
|
+
body.reason = reason;
|
|
404
|
+
const { ok: success, data } = await apiRequest("POST", "/ca/revoke", body);
|
|
405
|
+
if (!success)
|
|
406
|
+
return err("CA revoke failed", data);
|
|
407
|
+
return ok(data);
|
|
408
|
+
}
|
|
409
|
+
case "fipsign_ca_get_cert": {
|
|
410
|
+
const { certId } = args;
|
|
411
|
+
if (!certId || typeof certId !== "string") {
|
|
412
|
+
return err('"certId" is required');
|
|
413
|
+
}
|
|
414
|
+
const { ok: success, data } = await apiRequest("GET", `/ca/certificate/${encodeURIComponent(certId)}`);
|
|
415
|
+
if (!success)
|
|
416
|
+
return err("CA get cert failed", data);
|
|
417
|
+
return ok(data);
|
|
418
|
+
}
|
|
419
|
+
case "fipsign_ca_get_crl": {
|
|
420
|
+
const { ok: success, data } = await apiRequest("GET", "/ca/crl");
|
|
421
|
+
if (!success)
|
|
422
|
+
return err("CA get CRL failed", data);
|
|
423
|
+
return ok(data);
|
|
424
|
+
}
|
|
425
|
+
// ── Webhooks ──────────────────────────────────────────────────────────────
|
|
426
|
+
case "fipsign_webhooks_register": {
|
|
427
|
+
const { url, events } = args;
|
|
428
|
+
if (!url || typeof url !== "string") {
|
|
429
|
+
return err('"url" is required');
|
|
430
|
+
}
|
|
431
|
+
const body = { url };
|
|
432
|
+
if (events !== undefined)
|
|
433
|
+
body.events = events;
|
|
434
|
+
const { ok: success, data } = await apiRequest("POST", "/webhooks", body);
|
|
435
|
+
if (!success)
|
|
436
|
+
return err("Webhook register failed", data);
|
|
437
|
+
return ok(data);
|
|
438
|
+
}
|
|
439
|
+
case "fipsign_webhooks_get": {
|
|
440
|
+
const { ok: success, data } = await apiRequest("GET", "/webhooks");
|
|
441
|
+
if (!success)
|
|
442
|
+
return err("Webhook get failed", data);
|
|
443
|
+
return ok(data);
|
|
444
|
+
}
|
|
445
|
+
case "fipsign_webhooks_delete": {
|
|
446
|
+
const { ok: success, data } = await apiRequest("DELETE", "/webhooks");
|
|
447
|
+
if (!success)
|
|
448
|
+
return err("Webhook delete failed", data);
|
|
449
|
+
return ok(data);
|
|
450
|
+
}
|
|
451
|
+
case "fipsign_webhooks_test": {
|
|
452
|
+
const { ok: success, data } = await apiRequest("POST", "/webhooks/test");
|
|
453
|
+
if (!success)
|
|
454
|
+
return err("Webhook test failed", data);
|
|
455
|
+
return ok(data);
|
|
456
|
+
}
|
|
457
|
+
default:
|
|
458
|
+
return err(`Unknown tool: ${name}`);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
// ─── Server setup ─────────────────────────────────────────────────────────────
|
|
462
|
+
const server = new Server({
|
|
463
|
+
name: "fipsign-mcp",
|
|
464
|
+
version: "0.1.0",
|
|
465
|
+
}, {
|
|
466
|
+
capabilities: {
|
|
467
|
+
tools: {},
|
|
468
|
+
},
|
|
469
|
+
});
|
|
470
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
471
|
+
tools: TOOLS,
|
|
472
|
+
}));
|
|
473
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
474
|
+
const { name, arguments: args = {} } = request.params;
|
|
475
|
+
try {
|
|
476
|
+
return await handleTool(name, args);
|
|
477
|
+
}
|
|
478
|
+
catch (error) {
|
|
479
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
480
|
+
return err(`Unexpected error in tool '${name}': ${message}`);
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
// ─── Start ────────────────────────────────────────────────────────────────────
|
|
484
|
+
const transport = new StdioServerTransport();
|
|
485
|
+
await server.connect(transport);
|
|
486
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,iFAAiF;AAEjF,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;AAClD,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,yBAAyB,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAEhG,iFAAiF;AAEjF,KAAK,UAAU,UAAU,CACvB,MAAc,EACd,IAAY,EACZ,IAAc;IAEd,MAAM,OAAO,GAA2B;QACtC,cAAc,EAAE,kBAAkB;KACnC,CAAC;IACF,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC;IACjC,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,IAAI,EAAE,EAAE;QACjD,MAAM;QACN,OAAO;QACP,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;QAC3D,MAAM,E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AO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,OAAO,GAAG,CAAC,6BAA6B,IAAI,MAAM,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,iFAAiF;AAEjF,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fipsign/mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for FIPSign — post-quantum signing via ML-DSA-65 (NIST FIPS 204)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"dev": "tsc --watch",
|
|
14
|
+
"prepublishOnly": "npm run build"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"mcp",
|
|
18
|
+
"model-context-protocol",
|
|
19
|
+
"fipsign",
|
|
20
|
+
"post-quantum",
|
|
21
|
+
"ml-dsa",
|
|
22
|
+
"signing",
|
|
23
|
+
"cryptography",
|
|
24
|
+
"nist",
|
|
25
|
+
"fips-204"
|
|
26
|
+
],
|
|
27
|
+
"author": "FIPSign",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/fipsign/fipsign-mcp.git"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://fipsign.dev",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@modelcontextprotocol/sdk": "^1.15.0",
|
|
36
|
+
"@noble/post-quantum": "^0.6.1"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^22.19.20",
|
|
40
|
+
"typescript": "^5.5.0"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18"
|
|
44
|
+
}
|
|
45
|
+
}
|